GDC/Installation/ArchLinux
Building GDC on Arch Linux from source
For any Arch Linux (and Manjaro Linux) package there is a matching entry in a GIT repository with the build script. For example, for GDC it is located here: https://aur.archlinux.org/cgit/aur.git/tree/?h=gdc
At any time you can download those, make any changes you need and run makepkg. Or just use the build() function from within the PKGBUILD script as a base for your own build script.