From 0115d17f1600133128c5c3eed87e89408242a2d3 Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Mon, 21 Nov 2011 00:41:12 +0000 Subject: static-object.mk (c_flags-$o): Save c_flags. * static-object.mk (c_flags-$o): Save c_flags. ($(base)$(objext)): Use it. From-SVN: r181544 --- libgcc/ChangeLog | 5 +++++ libgcc/static-object.mk | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 9a69320..dbe5f06 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,8 @@ +2011-11-20 Hans-Peter Nilsson + + * static-object.mk (c_flags-$o): Save c_flags. + ($(base)$(objext)): Use it. + 2011-11-18 Steve Ellcey * Makefile.in (c_flags): Set to -fno-exceptions to build libunwind. diff --git a/libgcc/static-object.mk b/libgcc/static-object.mk index ab75d32..930f009 100644 --- a/libgcc/static-object.mk +++ b/libgcc/static-object.mk @@ -6,10 +6,15 @@ iter-items := $(filter-out $o,$(iter-items)) 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 -- cgit v1.1