[coreboot] New patch to review for coreboot: 81f66e6 crossgcc: Fix buildgcc on Mac OS X
Stefan Reinauer (stefan.reinauer@coreboot.org)
gerrit at coreboot.org
Thu Dec 6 01:23:26 CET 2012
Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1967
-gerrit
commit 81f66e6553d210a4701a28064323e3b2d1b876b3
Author: Stefan Reinauer <reinauer at google.com>
Date: Wed Dec 5 16:18:32 2012 -0800
crossgcc: Fix buildgcc on Mac OS X
Once again, the compiler we use on Mac OS X had trouble compiling GCC.
Switch to llvm-gcc because that one works with Xcode 4.5.2 and gcc 4.7.2.
Also drop the -W flags not known to Xcode from the iasl Makefile, and
drop the --remove-destination option from the copy, because that does not
exist on Darwin.
Change-Id: I9f978f65b5ae7edee2ecdcab337772e7a692bd9b
Signed-off-by: Stefan Reinauer <reinauer at google.com>
---
util/crossgcc/buildgcc | 29 +++++++++++-----------
...nix-20121114_drop_cflags_unknown_to_xcode.patch | 20 +++++++++++++++
...cpica-unix-20121114_no_remove_destination.patch | 12 +++++++++
3 files changed, 46 insertions(+), 15 deletions(-)
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index 8689e1a..4424a4d 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -20,8 +20,8 @@
# Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
#
-CROSSGCC_DATE="November 15th, 2012"
-CROSSGCC_VERSION="1.19"
+CROSSGCC_DATE="December 4th, 2012"
+CROSSGCC_VERSION="1.20"
# default settings
TARGETDIR=`pwd`/xgcc
@@ -336,12 +336,11 @@ if [ `uname` = "Darwin" ]; then
OPTIONS="ABI=32"
fi
- # In Xcode 4 the default compiler was switched to gcc-llvm.
- # However, this compiler fails to compile gcc 4.6.x. As a
- # workaround it's possible to compile gcc with gcc-4.2 or
- # clang.
+ # In Xcode 4.5.2 the default compiler is clang.
+ # However, this compiler fails to compile gcc 4.7.x. As a
+ # workaround it's possible to compile gcc with llvm-gcc.
if $CC -v 2>&1 | grep -q LLVM; then
- CC=clang
+ CC=llvm-gcc
fi
fi
@@ -599,17 +598,17 @@ printf "Building IASL ${IASL_VERSION} ... "
(
cd $IASL_DIR/generate/unix
export PATH=$PATH:$DESTDIR$TARGETDIR/bin
- rm -f ../../source/compiler/.failed
+ rm -f .failed
CFLAGS="$HOSTCFLAGS"
- $MAKE CC="$CC" iasl || touch ../../source/compiler/.failed
- rm -f $DESTDIR$TARGETDIR/bin/iasl || touch ../../source/compiler/.failed
- if [ -d bin32 ]; then cp bin32/iasl $DESTDIR$TARGETDIR/bin || touch ../../source/compiler/.failed ; fi
- if [ -d bin64 ]; then cp bin64/iasl $DESTDIR$TARGETDIR/bin || touch ../../source/compiler/.failed ; fi
- if [ ! -f ../../source/compiler/.failed ]; then touch ../../source/compiler/.success; fi
+ $MAKE CC="$CC" iasl || touch .failed
+ rm -f $DESTDIR$TARGETDIR/bin/iasl || touch .failed
+ if [ -d bin32 ]; then cp bin32/iasl $DESTDIR$TARGETDIR/bin || touch .failed ; fi
+ if [ -d bin64 ]; then cp bin64/iasl $DESTDIR$TARGETDIR/bin || touch .failed ; fi
+ if [ ! -f .failed ]; then touch .success; fi
) > $IASL_DIR/source/compiler/crossgcc-build.log 2>&1
-test -r $IASL_DIR/source/compiler/.failed && printf "${RED}failed${NC}\n" || \
+test -r $IASL_DIR/generate/unix/.failed && printf "${RED}failed${NC}\n" || \
printf "${green}ok${NC}\n"
-test -r $IASL_DIR/source/compiler/.failed && exit 1
+test -r $IASL_DIR/generate/unix/.failed && exit 1
fi
if [ $SAVETEMPS -eq 0 ]; then
diff --git a/util/crossgcc/patches/acpica-unix-20121114_drop_cflags_unknown_to_xcode.patch b/util/crossgcc/patches/acpica-unix-20121114_drop_cflags_unknown_to_xcode.patch
new file mode 100644
index 0000000..a4d55da
--- /dev/null
+++ b/util/crossgcc/patches/acpica-unix-20121114_drop_cflags_unknown_to_xcode.patch
@@ -0,0 +1,20 @@
+diff -ur acpica-unix-20121114.orig/generate/unix/Makefile.config acpica-unix-20121114/generate/unix/Makefile.config
+--- acpica-unix-20121114.orig/generate/unix/Makefile.config 2012-11-14 08:22:38.000000000 -0800
++++ acpica-unix-20121114/generate/unix/Makefile.config 2012-12-05 15:53:35.000000000 -0800
+@@ -135,15 +135,11 @@
+ -Waggregate-return \
+ -Wchar-subscripts \
+ -Wempty-body \
+- -Wlogical-op \
+ -Wmissing-declarations \
+ -Wmissing-field-initializers \
+- -Wmissing-parameter-type \
+ -Wnested-externs \
+- -Wold-style-declaration \
+ -Wold-style-definition \
+- -Wredundant-decls \
+- -Wtype-limits
++ -Wredundant-decls
+
+ #
+ # Extra warning flags (possible future use)
diff --git a/util/crossgcc/patches/acpica-unix-20121114_no_remove_destination.patch b/util/crossgcc/patches/acpica-unix-20121114_no_remove_destination.patch
new file mode 100644
index 0000000..85a6f1b
--- /dev/null
+++ b/util/crossgcc/patches/acpica-unix-20121114_no_remove_destination.patch
@@ -0,0 +1,12 @@
+diff -ur acpica-unix-20121114.orig/generate/unix/Makefile.config acpica-unix-20121114/generate/unix/Makefile.config
+--- acpica-unix-20121114.orig/generate/unix/Makefile.config 2012-12-05 16:11:48.000000000 -0800
++++ acpica-unix-20121114/generate/unix/Makefile.config 2012-12-05 16:12:31.000000000 -0800
+@@ -57,7 +57,7 @@
+ #
+ COPYPROG = \
+ @mkdir -p ../$(BINDIR); \
+- cp --remove-destination $(PROG) ../$(BINDIR); \
++ cp $(PROG) ../$(BINDIR); \
+ echo "Copied $(PROG) to $(FINAL_PROG)";
+
+ #
More information about the coreboot
mailing list