description Apple's version of gcc 4.0
long_description Apple's version of the GNU compiler collection, \
version 4.0. Supports C and Objective-C only.
homepage http://opensource.apple.com/
master_sites http://opensource.apple.com/tarballs/gcc_40
distname gcc_40-${version}
checksums sha1 07574623e23103cb4024410ca48481fbb5da322e \
rmd160 d7a5d15d312b9d7295564cf3862ec63296e769a3 \
sha256 86b9c1d48c30042ba23d181a58ceeb3afb850b595206d976f78c985baea4b5ad
ui_error "$name is not supported on Mavericks or later."
error "unsupported platform"
post-extract { file mkdir ${workpath}/build }
set nprefix ${prefix}/lib/${name}
# try to avoid non-Apple programs at all costs (rather volatile build)
configure.dir ${workpath}/build
configure.cmd ${worksrcpath}/configure
configure.pre_args --prefix=${nprefix}
configure.args --enable-languages=c,objc \
--program-suffix=-apple-4.0
configure.env PATH="/bin:/usr/bin:/sbin:/usr/sbin"
patchfiles patch-c-incpath.c.diff \
patchfiles patch-config-darwin.h
build.dir ${configure.dir}
destroot.dir ${build.dir}
# STAGE1_CFLAGS="-O2 -fkeep-inline-functions" : from configure.ac
# BOOT_CFLAGS="-O2 -g" : from Makefile.tpl
# -std=gnu89 : for building with compilers that default to c99 (clang)
# -D_FORTIFY_SOURCE=0 : The built compiler might not understand newer builtins
# exposed in libc headers for fortified string functions.