summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorFilippo ARCIDIACONO <filippo.arcidiacono@st.com>2012-01-23 15:44:14 +0100
committerCarmelo Amoroso <carmelo.amoroso@st.com>2012-02-07 12:07:37 +0100
commit72215487c0f7d4311e8ebe831fa69a6fbdb22e70 (patch)
treea561fe31a610f462924ce2620afd606207d9501e /test
parentc697912b3a9126390cb67099f94406239c370c79 (diff)
tests: add OMIT logic to remove compilation flag.
Add OMIT logic to remove compilation flags when compiling libraries, binaries( both host and target) Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Diffstat (limited to 'test')
-rw-r--r--test/Test.mak12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/Test.mak b/test/Test.mak
index dd3fcc387..dbed09624 100644
--- a/test/Test.mak
+++ b/test/Test.mak
@@ -99,12 +99,14 @@ $(MAKE_SRCS): Makefile $(TESTDIR)Makefile $(TESTDIR)Rules.mak $(TESTDIR)Test.mak
$(U_TARGETS): $(U_TARGET_SRCS) $(MAKE_SRCS)
$(showlink)
- $(Q)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(notdir $(CURDIR))) $(CFLAGS_$@) -c $@.c -o $@.o
+ $(Q)$(CC) $(filter-out $(CFLAGS-OMIT-$@),$(CFLAGS)) $(EXTRA_CFLAGS) $(CFLAGS_$(notdir $(CURDIR))) $(CFLAGS_$@) -c $@.c -o $@.o
$(Q)$(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LDFLAGS) $(LDFLAGS_$@)
$(G_TARGETS): $(U_TARGET_SRCS) $(MAKE_SRCS)
$(showlink)
- $(Q)$(HOSTCC) $(HOST_CFLAGS) $(CFLAGS_$(notdir $(CURDIR))) $(CFLAGS_$(patsubst %_glibc,%,$@)) -c $(patsubst %_glibc,%,$@).c -o $@.o
+ $(Q)$(HOSTCC) $(filter-out $(HOST_CFLAGS-OMIT-$(patsubst %_glibc,%,$@)),$(HOST_CFLAGS)) \
+ $(CFLAGS_$(notdir $(CURDIR))) $(CFLAGS_$(patsubst %_glibc,%,$@)) \
+ -c $(patsubst %_glibc,%,$@).c -o $@.o
$(Q)$(HOSTCC) $(HOST_LDFLAGS) $@.o -o $@ $(EXTRA_LDFLAGS) $(LDFLAGS_$(patsubst %_glibc,%,$@))
@@ -117,9 +119,11 @@ shell_%:
%.so: %.c
$(showlink)
$(Q)$(CC) \
- $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(patsubst %_glibc,%,$@)) \
+ $(filter-out $(CFLAGS-OMIT-$<),$(CFLAGS)) $(EXTRA_CFLAGS) \
+ $(CFLAGS_$(patsubst %_glibc,%,$@)) \
-fPIC -shared $< -o $@ -Wl,-soname,$@ \
- $(LDFLAGS) $(EXTRA_LIBS) $(LDFLAGS_$(patsubst %_glibc,%,$@))
+ $(filter-out $(LDFLAGS-OMIT-$<),$(LDFLAGS)) $(EXTRA_LIBS) \
+ $(LDFLAGS_$(patsubst %_glibc,%,$@))
clean:
$(showclean)