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]

Re: Ping! Unreviewed patch (hot/cold partitioning update)


Caroline Tice wrote:
        * Makefile.in (STAGEFEEDBACK_FLAGS_TO_PASS) Add
        "-freorder-blocks-and-partition" to the flags used in second
        stage of profiledbootstrap.

This breaks profiledbootstrap on linux, and any other target that defaults to DWARF2 debug info.


There is a warning emitted in opts.c if -g is used with
-freorder-blocks-and-partition, and the current debug info format is DWARF2. -g is a default option for BOOT_CFLAGS. STAGE2_FLAGS_TO_PASS includes -Werror, which turns warnings into errors. So the stage2 build includes the combination -g -freorder-blocks-and-partition -Werror which is an error for any target that defaults to DWARF2 debug info.


I think the right fix here is to remove -freorder-blocks-and-partition from STAGEFEEDBACK_FLAGS_TO_PASS in Makefile.in, until such time as we have complete support for it, i.e. DWARF2 support.

By the way, the fact that your patch uses DWARF_DEBUG is also a bug, as the dwarf v1 support is now gone. However, this is a different problem. I see we still have quite a few DWARF_DEBUG and DWARF_DEBUGGING_INFO references floating around in various files, all of which are now obsolete. If this stuff was gone, you would have noticed the problem before checking in your patch. We can deal with this problem in a separate patch.

The attached patch was tested with an x86_64 make profiledbootstrap. It dies while building the -fprofile-use dwarf2out.o file, but that is a lot farther than it gets without this patch.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com


2004-08-23  James E Wilson  <wilson@specifixinc.com>

	* Makefile.in (STAGEFEEDBACK_FLAGS_TO_PASS): Remove
	-freorder-blocks-and-partition.

Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.1352
diff -p -p -r1.1352 Makefile.in
*** Makefile.in	18 Aug 2004 22:41:53 -0000	1.1352
--- Makefile.in	24 Aug 2004 02:43:31 -0000
*************** STAGEPROFILE_FLAGS_TO_PASS = \
*** 3601,3607 ****
  # Files never linked into the final executable produces warnings about missing
  # profile.
  STAGEFEEDBACK_FLAGS_TO_PASS = \
! 	CFLAGS="$(BOOT_CFLAGS) -fprofile-use -freorder-blocks-and-partition"
  
  # Only build the C compiler for stage1, because that is the only one that
  # we can guarantee will build with the native compiler, and also it is the
--- 3601,3607 ----
  # Files never linked into the final executable produces warnings about missing
  # profile.
  STAGEFEEDBACK_FLAGS_TO_PASS = \
! 	CFLAGS="$(BOOT_CFLAGS) -fprofile-use"
  
  # Only build the C compiler for stage1, because that is the only one that
  # we can guarantee will build with the native compiler, and also it is the

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