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]
Other format: [Raw text]

[vta] no -gtoggle for crtstuff et al


Turns out that, on ppc and probably on other arches, crtstuff is
sufficiently fragile that compiling it with -gtoggle causes failure to
assemble debug info, because of references to symbols that are
removed.  It's a bit of a loss to lose -gtoggle, but since -g2 is the
default, using -g0 instead of -gtoggle for -fcompare-debug would
probably get us about as much coverage, so that's what I do in the
patch below.

for  ChangeLog.vta
from  Alexandre Oliva  <aoliva@redhat.com>

	* config/bootstrap-debug-lib.mk (STAGE1_TFLAGS, STAGE3_TFLAGS):
	Don't use -gtoggle for crtstuff and target libs.

Index: config/bootstrap-debug-lib.mk
===================================================================
--- config/bootstrap-debug-lib.mk	(revision 141037)
+++ config/bootstrap-debug-lib.mk	(working copy)
@@ -5,8 +5,9 @@
 STAGE4_CFLAGS += -fcompare-debug=-fvar-tracking-assignments-toggle
 # This might be enough after testing:
 # TFLAGS += -fcompare-debug=-g0
-STAGE1_TFLAGS += -gtoggle -fcompare-debug=
+# Don't use -gtoggle for target libs, this breaks crtstuff on ppc.
+STAGE1_TFLAGS += -fcompare-debug=
 STAGE2_TFLAGS += -fcompare-debug=-fvar-tracking-assignments-toggle
-STAGE3_TFLAGS += -fcompare-debug=-gtoggle
+STAGE3_TFLAGS += -fcompare-debug=-g0
 STAGE4_TFLAGS += -fcompare-debug=-fvar-tracking-assignments-toggle
 do-compare = $(SHELL) $(srcdir)/contrib/compare-debug $$f1 $$f2
-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}
FSFLA Board Member       ÂSÃ Libre! => http://www.fsfla.org/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}

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