diff mbox

Massive EH regressions after "[patch, ia64, libgcc] Patch to fix libunwind build on IA64"

Message ID 201111202004.pAKK4npJ003172@ignucius.se.axis.com
State New
Headers show

Commit Message

Hans-Peter Nilsson Nov. 20, 2011, 8:04 p.m. UTC
> From: Eric Botcazou <ebotcazou@adacore.com>
> Date: Sun, 20 Nov 2011 13:03:22 +0100

> You may need something like:
> 
> 2011-06-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
> 
> 	* shared-object.mk (c_flags-$o): Save c_flags.
> 	($(base)$(objext)): Use it.
> 	($(base)_s$(objext)): Likewise.
> 
> for static-object.mk.

Thanks, I can almost not believe I didn't see that.  Well ok, I
saw it but misinterpreted it.  Perhaps I can blame the lack of
an explanatory comment just a little bit: it looks somewhat like
a failed attempt at supporting source-specific compilation
options.  I'm going to commit the following as obvious after
verifying that it fixes the regressions and doesn't cause any.

libgcc:

2011-11-20  Hans-Peter Nilsson  <hp@axis.com>

	* shared-object.mk (c_flags-$o): Save c_flags.
	($(base)$(objext)): Use it.

brgds, H-P
diff mbox

Patch

Index: static-object.mk
===================================================================
--- static-object.mk	(revision 181531)
+++ static-object.mk	(working copy)
@@ -6,10 +6,15 @@  iter-items := $(filter-out $o,$(iter-ite
 
 base := $(basename $(notdir $o))
 
+# Copy c_flags to a rule-specific copy and use the copy, to avoid the
+# following rules being affected by later changes to c_flags in the
+# including file.
+c_flags-$o := $(c_flags)
+
 ifeq ($(suffix $o),.c)
 
 $(base)$(objext): $o
-	$(gcc_compile) $(c_flags) -c $< $(vis_hide)
+	$(gcc_compile) $(c_flags-$<) -c $< $(vis_hide)
 
 else