Building Apple GCC with GDC
David Friedman
dvdfrdmn at users.ess-eff.net
Wed Dec 6 18:22:01 PST 2006
Anders F Björklund wrote:
> I'm trying to build Apple's "Universal" gcc-5363,
> but somehow it always fails in the install phase ?
>
> gnumake install RC_OS=macos RC_ARCHS='i386 ppc' TARGETS='i386 ppc' \
> SRCROOT=`pwd` OBJROOT=`pwd`/build/obj \
> DSTROOT=`pwd`/build/dst SYMROOT=`pwd`/build/sym
>
> I added "d" to the --enable-languages in build_gcc,
> otherwise it is using the GCC settings Apple chose.
>
>
> Tried building GDC 0.19 with gcc-5341 earlier, but
> didn't have much luck with that effort either... :(
>
> Downloaded the GCC source code tarball from Apple,
> and added the "d" directory and ran "setup-gcc.sh"
>
> http://www.opensource.apple.com/darwinsource/tarballs/other/gcc-5363.tar.gz
> http://www.opensource.apple.com/darwinsource/tarballs/other/gcc-5341.tar.gz
>
>
> How did you build gdc-0.19-macos-universal.tar.bz2 ?
> I would like to build a compiler from GDC SVN trunk.
>
> --anders
I have only done Universal builds with gcc-5341 on MacOS Intel. The
build environment on my G5 seems to be messed up so that I can't make
i386 executables. gcc-5363 fails on x86_64 stuff. Hopefully,
installing Xcode 2.4.1 will fix these problems (downloading now).
Here are the build steps I use:
src=`pwd`/gcc-5341
tar xzf .../gcc-5341.tar.gz
cd $src/gcc
tar xzf .../gdc-src.tar.gz
cd $src
./gcc/d/setup-gcc.sh
mkdir -p build/obj build/dst build/sym
gnumake install RC_OS=macos RC_ARCHS='i386 ppc' TARGETS='i386 ppc' \
SRCROOT=`pwd` OBJROOT=`pwd`/build/obj DSTROOT=`pwd`/build/dst \
SYMROOT=`pwd`/build/sym >> build-log 2>&1 \
# To make the binary package...
cd $src/build/obj/obj-i686-i686
$src/gcc/d/package/simple.sh --macos \
--with-install-root=$src/build/dst
# The binary packages are left in /tmp
The setup-gcc.sh script will add 'd' to --enable-languages. If you did
this manually, the rest of the patching of build_gcc may have failed...
There is a bug in that lets this patch fail, but still says "GDC setup
complete."
If you still get errors, please send me a log.
David
More information about the D.gnu
mailing list