public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Debugging flags
@ 1998-06-24 17:23 Daniel Egger
  1998-06-25  9:19 ` Manfred Hollstein
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Egger @ 1998-06-24 17:23 UTC (permalink / raw)
  To: egcs

Hiho!

 I don't know exactly how but my defined CFLAGS are overridden by
 the made Makefiles in gcc and subdirs. Behause of the inheritance of
 variables that are defined in Makefiles it should be enough to define
 them in the topdir of the tree but they are defined in every single subdir.

 Further we have a nice autoconfig screict which figures out what
 options to use to compile the whole thing. But they will be only used
 if we substitute all CFLAGS and CXXFLAGS with @CFLAGS@ and
 @CXXFLAGS@. This will also allow to remove the whole debugging
 thing simply by a added option to the autoconf script which will follow
 in the next days. 
 But first here's the patch to remove hardcoded CFLAGS:

 *** libstdc++/Makefile.in.temp	Wed Jun 24 14:24:17 1998
--- libstdc++/Makefile.in	Wed Jun 24 14:24:57 1998
***************
*** 54,61 ****
  CLEAN_JUNK = $(LIBS)
  
  # Remove these for public releases.
! CXXFLAGS = -g -O -Wpointer-arith -Wnested-externs -Woverloaded-virtual -Wbad-function-cast -Winline -Wwrite-strings -Weffc++
! CFLAGS = -g -O -Wpointer-arith -Wnested-externs
  
  .PHONY: libs
  libs: $(LIBS)
--- 54,61 ----
  CLEAN_JUNK = $(LIBS)
  
  # Remove these for public releases.
! CXXFLAGS = @CXXFLAGS@ -Wpointer-arith -Wnested-externs -Woverloaded-virtual -Wbad-function-cast -Winline -Wwrite-strings -Weffc++
! CFLAGS = @CFLAGS@ -Wpointer-arith -Wnested-externs
  
  .PHONY: libs
  libs: $(LIBS)
*** gcc/Makefile.in.temp	Wed Jun 24 14:27:01 1998
--- gcc/Makefile.in	Wed Jun 24 14:29:43 1998
***************
*** 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 = @CFLAGS@
  BOOT_CFLAGS = -O2 $(CFLAGS)
  WARN_CFLAGS = -W -Wall
  # These exists to be overridden by the x-* and t-* files, respectively.
*** gcc/cp/Makefile.in.temp	Wed Jun 24 14:33:11 1998
--- gcc/cp/Makefile.in	Wed Jun 24 14:33:24 1998
***************
*** 45,51 ****
  # to the stage2 and stage3 compilations
  # XCFLAGS is used for most compilations but not when using the GCC just built.
  XCFLAGS =
! CFLAGS = -g
  BOOT_CFLAGS = -O $(CFLAGS)
  # These exists to be overridden by the x-* and t-* files, respectively.
  X_CFLAGS =
--- 45,51 ----
  # to the stage2 and stage3 compilations
  # XCFLAGS is used for most compilations but not when using the GCC just built.
  XCFLAGS =
! CFLAGS = @CFLAGS@
  BOOT_CFLAGS = -O $(CFLAGS)
  # These exists to be overridden by the x-* and t-* files, respectively.
  X_CFLAGS =
*** libio/dbz/Makefile.in.temp	Sat Sep 27 04:06:59 1997
--- libio/dbz/Makefile.in	Wed Jun 24 14:37:02 1998
***************
*** 1,5 ****
  srcdir = .
! CFLAGS = -g
  C_FLAGS = $(CFLAGS) -I$(srcdir) -I.. -I$(srcdir)/.. -DDBZ_FINISH='_IO_flush_all()'
  CC = `if [ -f ../../../gcc/gcc ] ; \
  	then echo ../../../gcc/gcc -B../../../gcc/ ; \
--- 1,5 ----
  srcdir = .
! CFLAGS = @CFLAGS@
  C_FLAGS = $(CFLAGS) -I$(srcdir) -I.. -I$(srcdir)/.. -DDBZ_FINISH='_IO_flush_all()'
  CC = `if [ -f ../../../gcc/gcc ] ; \
  	then echo ../../../gcc/gcc -B../../../gcc/ ; \
*** libio/testsuite/Makefile.in.temp	Tue Aug 26 18:28:23 1997
--- libio/testsuite/Makefile.in	Wed Jun 24 14:38:42 1998
***************
*** 17,25 ****
  
  srcdir = libio.tests
  
! CFLAGS = -g
  C_FLAGS = $(CFLAGS) -I. -I.. -I$(srcdir) -I$(srcdir)/..
! CXXFLAGS = -g
  CC = gcc
  CXX = gcc
  
--- 17,25 ----
  
  srcdir = libio.tests
  
! CFLAGS = @CFLAGS@
  C_FLAGS = $(CFLAGS) -I. -I.. -I$(srcdir) -I$(srcdir)/..
! CXXFLAGS = @CXXFLAGS@
  CC = gcc
  CXX = gcc
  
*** Makefile.in.temp	Mon Jun 22 21:22:02 1998
--- Makefile.in	Wed Jun 24 14:40:04 1998
***************
*** 70,77 ****
  HOST_PREFIX_1 = loser-
  
  # These flag values are normally overridden by the configure script.
! CFLAGS = -g
! CXXFLAGS = -g -O2
  
  LIBCFLAGS = $(CFLAGS)
  CFLAGS_FOR_TARGET = $(CFLAGS)
--- 70,77 ----
  HOST_PREFIX_1 = loser-
  
  # These flag values are normally overridden by the configure script.
! CFLAGS = @CFLAGS@
! CXXFLAGS = @CXXFLAGS@
  
  LIBCFLAGS = $(CFLAGS)
  CFLAGS_FOR_TARGET = $(CFLAGS)
 


--

Servus,
       Daniel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1998-06-28 12:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-06-24 17:23 Debugging flags Daniel Egger
1998-06-25  9:19 ` Manfred Hollstein
1998-06-25 12:07   ` Joe Buck
1998-06-26 13:32   ` Daniel Egger
1998-06-26 22:48     ` Mumit Khan
1998-06-27  7:22     ` Manfred Hollstein
1998-06-28 12:37       ` Daniel Egger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).