1.1 --- a/gcc-fat.sh Thu Jul 14 12:33:48 2011 -0700
1.2 +++ b/gcc-fat.sh Sun Aug 14 21:14:29 2011 -0400
1.3 @@ -2,31 +2,7 @@
1.4 #
1.5 # Build Universal binaries on Mac OS X, thanks Ryan!
1.6 #
1.7 -# Usage: ./configure CC="sh gcc-fat.sh" && make && rm -rf ppc ppc64 x86 x64
1.8 -
1.9 -# PowerPC 32-bit compiler flags (10.4 runtime compatibility)
1.10 -GCC_COMPILE_PPC32="gcc-4.0 -arch ppc -mmacosx-version-min=10.4 \
1.11 --DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
1.12 --nostdinc \
1.13 --F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \
1.14 --I/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1/include \
1.15 --isystem /Developer/SDKs/MacOSX10.4u.sdk/usr/include"
1.16 -
1.17 -GCC_LINK_PPC32="\
1.18 --L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1 \
1.19 --Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk"
1.20 -
1.21 -# PowerPC 64-bit compiler flags (10.5 runtime compatibility)
1.22 -GCC_COMPILE_PPC64="gcc-4.0 -arch ppc64 -mmacosx-version-min=10.5 \
1.23 --DMAC_OS_X_VERSION_MIN_REQUIRED=1050 \
1.24 --nostdinc \
1.25 --F/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks \
1.26 --I/Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1/include \
1.27 --isystem /Developer/SDKs/MacOSX10.5.sdk/usr/include"
1.28 -
1.29 -GCC_LINK_PPC64="\
1.30 --L/Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1/ppc64 \
1.31 --Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk"
1.32 +# Usage: ./configure CC="sh gcc-fat.sh" && make && rm -rf x86 x64
1.33
1.34 # Intel 32-bit compiler flags (10.4 runtime compatibility)
1.35 GCC_COMPILE_X86="gcc-4.0 -arch i386 -mmacosx-version-min=10.4 \
1.36 @@ -63,9 +39,7 @@
1.37 -V) exec gcc $1;;
1.38 -print-prog-name=*) exec gcc $1;;
1.39 -print-search-dirs) exec gcc $1;;
1.40 - -E) GCC_COMPILE_PPC32="$GCC_COMPILE_PPC32 -E"
1.41 - GCC_COMPILE_PPC64="$GCC_COMPILE_PPC64 -E"
1.42 - GCC_COMPILE_X86="$GCC_COMPILE_X86 -E"
1.43 + -E) GCC_COMPILE_X86="$GCC_COMPILE_X86 -E"
1.44 GCC_COMPILE_X64="$GCC_COMPILE_X64 -E"
1.45 compile=no; link=no;;
1.46 -c) link=no;;
1.47 @@ -75,8 +49,6 @@
1.48 shift
1.49 done
1.50 if test x$link = xyes; then
1.51 - GCC_COMPILE_PPC32="$GCC_COMPILE_PPC32 $GCC_LINK_PPC32"
1.52 - GCC_COMPILE_PPC64="$GCC_COMPILE_PPC64 $GCC_LINK_PPC64"
1.53 GCC_COMPILE_X86="$GCC_COMPILE_X86 $GCC_LINK_X86"
1.54 GCC_COMPILE_X64="$GCC_COMPILE_X64 $GCC_LINK_X64"
1.55 fi
1.56 @@ -88,52 +60,6 @@
1.57 fi
1.58 fi
1.59
1.60 -# Compile PPC 32-bit
1.61 -if test x"$output" != x; then
1.62 - dir=ppc/`dirname $output`
1.63 - if test -d $dir; then
1.64 - :
1.65 - else
1.66 - mkdir -p $dir
1.67 - fi
1.68 -fi
1.69 -set -- $args
1.70 -while test x$1 != x; do
1.71 - if test -f "ppc/$1" && test "$1" != "$output"; then
1.72 - ppc_args="$ppc_args ppc/$1"
1.73 - else
1.74 - ppc_args="$ppc_args $1"
1.75 - fi
1.76 - shift
1.77 -done
1.78 -$GCC_COMPILE_PPC32 $ppc_args || exit $?
1.79 -if test x"$output" != x; then
1.80 - cp $output ppc/$output
1.81 -fi
1.82 -
1.83 -# Compile PPC 64-bit
1.84 -if test x"$output" != x; then
1.85 - dir=ppc64/`dirname $output`
1.86 - if test -d $dir; then
1.87 - :
1.88 - else
1.89 - mkdir -p $dir
1.90 - fi
1.91 -fi
1.92 -set -- $args
1.93 -while test x$1 != x; do
1.94 - if test -f "ppc64/$1" && test "$1" != "$output"; then
1.95 - ppc64_args="$ppc64_args ppc64/$1"
1.96 - else
1.97 - ppc64_args="$ppc64_args $1"
1.98 - fi
1.99 - shift
1.100 -done
1.101 -$GCC_COMPILE_PPC64 $ppc64_args || exit $?
1.102 -if test x"$output" != x; then
1.103 - cp $output ppc64/$output
1.104 -fi
1.105 -
1.106 # Compile X86 32-bit
1.107 if test x"$output" != x; then
1.108 dir=x86/`dirname $output`
1.109 @@ -181,5 +107,5 @@
1.110 fi
1.111
1.112 if test x"$output" != x; then
1.113 - lipo -create -o $output ppc/$output ppc64/$output x86/$output x64/$output
1.114 + lipo -create -o $output x86/$output x64/$output
1.115 fi