[haiku-commits] haiku: hrev44430 - build/scripts

  • From: alex@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 29 Jul 2012 22:08:37 +0200 (CEST)

hrev44430 adds 1 changeset to branch 'master'
old head: 1ac528017de1a6b9ce049005babd52fc41c11ac2
new head: e715eca04c1f99684b5972dd7db4514b56e37b60

----------------------------------------------------------------------------

e715eca: Worked around broken GCC 2 on OS X hosts.
  
  GCC 2 built for OS X 10.7/10.8 was broken, the Haiku build would fail
  with some strange errors. Forcing compilation of GCC 2 in 32-bit mode
  results in a working GCC.

                                      [ Alex Smith <alex@xxxxxxxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev44430
Commit:      e715eca04c1f99684b5972dd7db4514b56e37b60
URL:         http://cgit.haiku-os.org/haiku/commit/?id=e715eca
Author:      Alex Smith <alex@xxxxxxxxxxxxxxxx>
Date:        Sun Jul 29 20:03:14 2012 UTC

----------------------------------------------------------------------------

1 file changed, 7 insertions(+)
build/scripts/build_cross_tools |    7 +++++++

----------------------------------------------------------------------------

diff --git a/build/scripts/build_cross_tools b/build/scripts/build_cross_tools
index 3f773a7..ea442b5 100755
--- a/build/scripts/build_cross_tools
+++ b/build/scripts/build_cross_tools
@@ -130,11 +130,18 @@ copy_headers $haikuSourceDir/headers/posix 
$tmpIncludeDir/posix
 
 # configure gcc
 cd $gccObjDir
+case `uname` in
+       Darwin)
+               # GCC 2 compiled for x86_64 OS X is broken, compile for i386.
+               export CC="gcc -arch i386"
+       ;;
+esac
 CFLAGS="-O2 -U_FORTIFY_SOURCE" CXXFLAGS="-O2" $buildToolsDir/gcc/configure \
        --prefix=$installDir \
        --target=i586-pc-haiku --disable-nls --enable-shared=yes \
        --enable-languages=c,c++ --with-headers=$tmpIncludeDir \
        --with-libs=$tmpLibDir || exit 1
+unset CC
 
 # hack the Makefile to avoid trouble with stuff we don't need anyway
 sedExpr=


Other related posts:

  • » [haiku-commits] haiku: hrev44430 - build/scripts - alex