This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch to libobjc/Makefile.in, set SHELL, use -O2 & -W*
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Cc: shebs at apple dot com
- Date: Fri, 10 May 2002 15:56:59 -0400 (EDT)
- Subject: Patch to libobjc/Makefile.in, set SHELL, use -O2 & -W*
This patch does three things in libobjc/Makefile.in:
1. Set SHELL = @SHELL@ instead of hardcoding /bin/sh. I.e. if the user
set CONFIG_SHELL prior to configuring, then honor it.
2. Add -O2 during compilation. CFLAGS gets set to -g in the top
level dir and gets passed down. Since we're always using gcc,
trust that it optimizes correctly.
3. Likewise we can always use -W* flags.
I'll start submitting fixes for the warnings this exposes if the patch
is accepted. Tested via full bootstrap on sparc-sun-solaris2.7.
Ok to install on the trunk?
Thanks,
--Kaveh
2002-05-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (SHELL): Set to @SHELL@.
(WARN_CFLAGS): New.
(ALL_CFLAGS): Add -O2 $(WARN_CFLAGS).
diff -rup orig/egcc-CVS20020509/libobjc/Makefile.in egcc-CVS20020509/libobjc/Makefile.in
--- orig/egcc-CVS20020509/libobjc/Makefile.in 2002-02-11 16:30:56.000000000 -0500
+++ egcc-CVS20020509/libobjc/Makefile.in 2002-05-10 11:48:41.623470000 -0400
@@ -22,7 +22,7 @@
#Makefile.in files. Some of this stuff may be unnecessary and
#worthless.
-SHELL = /bin/sh
+SHELL = @SHELL@
MAKEOVERRIDES=
#### Start of system configuration section. ####
@@ -67,8 +67,9 @@ RANLIB = @RANLIB@
CC = @CC@
CFLAGS = @CFLAGS@
+WARN_CFLAGS = -W -Wall -Wwrite-strings -Wstrict-prototypes
GTHREAD_FLAGS=@GTHREAD_FLAGS@
-ALL_CFLAGS = -I. -I$(srcdir) $(CPPFLAGS) $(DEFS) $(CFLAGS) \
+ALL_CFLAGS = -I. -I$(srcdir) $(CPPFLAGS) $(DEFS) $(CFLAGS) -O2 $(WARN_CFLAGS) \
$(GTHREAD_FLAGS) -DIN_GCC -DIN_TARGET_LIBS
# Libtool