FW: Patch to add -O2 to top level CFLAGS_FOR_TARGET
Kaveh R. Ghazi
ghazi@caip.rutgers.edu
Wed Jun 12 07:52:00 GMT 2002
I'm forwarding this patch to the top level Makefile.in which got
checked into the gcc tree.
--Kaveh
2002-06-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (CFLAGS_FOR_TARGET): Add -O2.
diff -rup orig/egcc-CVS20020608/Makefile.in egcc-CVS20020608/Makefile.in
--- orig/egcc-CVS20020608/Makefile.in 2002-05-31 21:43:44.000000000 -0400
+++ egcc-CVS20020608/Makefile.in 2002-06-08 22:46:56.018329484 -0400
@@ -100,7 +100,11 @@ CXXFLAGS = -g -O2
LDFLAGS =
LIBCFLAGS = $(CFLAGS)
CFLAGS_FOR_BUILD = $(CFLAGS)
-CFLAGS_FOR_TARGET = $(CFLAGS)
+# During gcc bootstrap, if we use some random cc for stage1 then
+# 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)
LDFLAGS_FOR_TARGET =
LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
PICFLAG =
More information about the Binutils
mailing list