This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

PATCH to keep Jason from pointing out what a fool I am



This patch enables "-W -Wall" even for stage1 builds, if the native
compiler is GCC.  It's handy if you're building a cross-compiler, or,
if like me, you tend to just type `make' when making a small change to
the C++ front-end.  Jeff?

-- 
Mark Mitchell 			mark@markmitchell.com
Mark Mitchell Consulting	http://www.markmitchell.com

Index: configure.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/configure.in,v
retrieving revision 1.138
diff -c -p -r1.138 configure.in
*** configure.in	1998/08/14 09:23:45	1.138
--- configure.in	1998/08/25 20:13:49
*************** AC_CANONICAL_SYSTEM
*** 177,182 ****
--- 177,193 ----
  
  # Find the native compiler
  AC_PROG_CC
+ 
+ # If the native compiler is GCC, we can enable warnings even in stage1.  
+ # That's useful for people building cross-compilers, or just running a
+ # quick `make'.
+ if test "x$GCC" = "xyes"; then 
+   stage1_warn_cflags="-W -Wall"
+ else
+   stage1_warn_cflags=""
+ fi
+ AC_SUBST(stage1_warn_cflags)
+ 
  AC_PROG_MAKE_SET
  
  # Find some useful tools
Index: Makefile.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/Makefile.in,v
retrieving revision 1.157
diff -c -p -r1.157 Makefile.in
*** Makefile.in	1998/08/18 10:26:35	1.157
--- Makefile.in	1998/08/25 20:13:59
*************** ALLOCA_FINISH = true
*** 61,67 ****
  # TCFLAGS is used for compilations with the GCC just built.
  XCFLAGS =
  TCFLAGS =
! CFLAGS = -g
  BOOT_CFLAGS = -O2 $(CFLAGS)
  WARN_CFLAGS = -W -Wall
  # These exists to be overridden by the x-* and t-* files, respectively.
--- 61,67 ----
  # TCFLAGS is used for compilations with the GCC just built.
  XCFLAGS =
  TCFLAGS =
! CFLAGS = -g @stage1_warn_cflags@
  BOOT_CFLAGS = -O2 $(CFLAGS)
  WARN_CFLAGS = -W -Wall
  # These exists to be overridden by the x-* and t-* files, respectively.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]