aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2002-06-12 15:04:45 +0000
committerDJ Delorie <dj@redhat.com>2002-06-12 15:04:45 +0000
commit6c5e141af0700087c5aad165966a730cd32bd94d (patch)
tree2bb7102837cb18d26f3cb9112db15e2cb739cb6a
parent814b3ba08769fdfe80223acc2b6226d2966d808d (diff)
downloadgdb-6c5e141af0700087c5aad165966a730cd32bd94d.zip
gdb-6c5e141af0700087c5aad165966a730cd32bd94d.tar.gz
gdb-6c5e141af0700087c5aad165966a730cd32bd94d.tar.bz2
* Makefile.in (CFLAGS_FOR_TARGET): Add -O2.
-rw-r--r--ChangeLog4
-rw-r--r--Makefile.in6
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ca2d693..27ac092 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2002-06-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * Makefile.in (CFLAGS_FOR_TARGET): Add -O2.
+
2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
* configure.in (vax-*-netbsd*): Re-enable gas.
diff --git a/Makefile.in b/Makefile.in
index 9d3d677..4a76109 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -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 =