This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix bootstrap/25672
- From: PaweÅ Sikora <pluto at agmk dot net>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 5 May 2006 13:49:39 +0200
- Subject: Fix bootstrap/25672
- Anti-virus-scanned: Powered by AMaViS & Mks-Vir (www.mks.com.pl)
hi,
during crossbuild for ppc64 i get on an error
because xgcc pickups wrong cflags for target objects.
e.g.:
(...)
/home/users/pluto/rpm/BUILD/gcc-4_1-branch/obj-ppc64-pld-linux/./gcc/xgcc \
-B/home/users/pluto/rpm/BUILD/gcc-4_1-branch/obj-ppc64-pld-linux/./gcc/ \
-B/usr/ppc64-pld-linux/bin/ -B/usr/ppc64-pld-linux/lib/ \
-isystem /usr/ppc64-pld-linux/include -isystem /usr/ppc64-pld-linux/sys-include\
-O2 -O2 -march=x86-64 -O2 -pipe -Wall -DIN_GCC -DCROSS_COMPILE \
-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \
-Wold-style-definition -isystem ./include -I. -I. -I../../gcc \
-I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include \
-g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions \
-fno-zero-initialized-in-bss -fno-unit-at-a-time -Dinhibit_libc -msdata=none\
-c ../../gcc/crtstuff.c -DCRT_BEGIN \
-o crtbegin.o
cc1: error: unrecognized command line option "-march=x86-64"
attached patch fixes this bug for me.
--- gcc-4.1-20060106/Makefile.in.orig 2005-12-15 15:02:02.000000000 +0100
+++ gcc-4.1-20060106/Makefile.in 2006-01-08 19:27:18.406458250 +0100
@@ -329,9 +329,9 @@
# CFLAGS will be just -g. We want to ensure that TARGET libraries
# (which we know are built with gcc) are built with optimizations so
# prepend -O2 when setting CFLAGS_FOR_TARGET.
-CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
+CFLAGS_FOR_TARGET = -O2 $(SYSROOT_CFLAGS_FOR_TARGET)
SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
+CXXFLAGS_FOR_TARGET = -O2 $(SYSROOT_CFLAGS_FOR_TARGET)
LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
LDFLAGS_FOR_TARGET =