From: Nadav Har'El <[email protected]>
Committer: Nadav Har'El <[email protected]>
Branch: master
tests makefile: clean up non-fpic compilation
The "LD" line printed when compiling the non-fpic test was wrong ($* was
not defined). This fixes this, but furthermore avoids the duplication of
the entirely separate rule for the non-fpic compilation. This is just a
normal compilation with a slightly different CXXFLAGS - and completely
normal linking.
Signed-off-by: Nadav Har'El <[email protected]>
---
diff --git a/modules/tests/Makefile b/modules/tests/Makefile
--- a/modules/tests/Makefile
+++ b/modules/tests/Makefile
@@ -60,12 +60,7 @@ $(out)/tests/rofs/%.o: $(src)/tests/%.c
$(out)/%.so: $(out)/%.o
$(call quiet, $(CXX) $(CXXFLAGS) -shared -o $@ $< $(LIBS), LD $*.so)
-NON_FPIC_CXXFLAGS = $(autodepend) $(INCLUDES) -g -O2 -mcmodel=large
-fno-pie -DBOOST_TEST_DYN_LINK \
- -U _FORTIFY_SOURCE -D_KERNEL -D__OSV__ -DCONF_debug_memory=0 \
- -Wall -Wno-pointer-arith -Wformat=0 -Wno-format-security
-$(out)/tests/tst-non-fpic.so: $(src)/tests/tst-non-fpic.cc
- $(makedir)
- $(call quiet, $(CXX) -shared $(NON_FPIC_CXXFLAGS) -o $@ $<, LD $*.so)
+$(out)/tests/tst-non-fpic.o: CXXFLAGS:=$(subst
-fPIC,-mcmodel=large,$(CXXFLAGS))
# The rofs test image mounts /tmp as ramfs and 4 tests that exercise file
system
# fail due to some unresolved bugs or other shortcomings of the ramfs
implementation
--
You received this message because you are subscribed to the Google Groups "OSv
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.