> From: Eric Botcazou <ebotca...@adacore.com> > Date: Sun, 20 Nov 2011 13:03:22 +0100
> You may need something like: > > 2011-06-21 Rainer Orth <r...@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 <h...@axis.com> * shared-object.mk (c_flags-$o): Save c_flags. ($(base)$(objext)): Use it. 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 brgds, H-P