summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Undheim <ruben.undheim@gmail.com>2018-08-19 23:03:51 +0200
committerRuben Undheim <ruben.undheim@gmail.com>2018-10-17 18:36:13 +0200
commit9038b599cf47fe0bee79619e8a9f4b81ac8e4e4e (patch)
tree1dc035dc3ac98d73957cf489d0cda6d5e000eec5
parent5ada783600daeadfbcd680b4450a2e4e985b4ae3 (diff)
Do not show g++ build flags in Version string
Gbp-Pq: Name 0011-Do-not-show-g-build-flags-in-Version-string.patch
-rw-r--r--Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index e7a9de1..5c381ff 100644
--- a/Makefile
+++ b/Makefile
@@ -504,8 +504,7 @@ libyosys.so: $(filter-out kernel/driver.o,$(OBJS))
$(Q) mkdir -p $(dir $@)
$(P) $(CXX) -o $@ -c $(CPPFLAGS) $(CXXFLAGS) $<
-YOSYS_VER_STR := Yosys $(YOSYS_VER) (git sha1 $(GIT_REV), $(notdir $(CXX)) $(shell \
- $(CXX) --version | tr ' ()' '\n' | grep '^[0-9]' | head -n1) $(filter -f% -m% -O% -DNDEBUG,$(CXXFLAGS)))
+YOSYS_VER_STR := Yosys $(YOSYS_VER) (git sha1 $(GIT_REV))
kernel/version_$(GIT_REV).cc: $(YOSYS_SRC)/Makefile
$(P) rm -f kernel/version_*.o kernel/version_*.d kernel/version_*.cc
@@ -519,8 +518,10 @@ CXXFLAGS_NOVERIFIC = $(CXXFLAGS)
LDLIBS_NOVERIFIC = $(LDLIBS)
endif
+CXXFLAGS_FOR_YOSYS_CONFIG := $(shell echo $(subst -I. -I"$(YOSYS_SRC)",-I"$(DATDIR)/include",$(CXXFLAGS_NOVERIFIC)) | sed 's/-fdebug-prefix[^ ]\+ //' | sed 's/-ffile-prefix-map[^ ]\+ //')
+
yosys-config: misc/yosys-config.in
- $(P) $(SED) -e 's#@CXXFLAGS@#$(subst -I. -I"$(YOSYS_SRC)",-I"$(DATDIR)/include",$(strip $(CXXFLAGS_NOVERIFIC)))#;' \
+ $(P) $(SED) -e 's#@CXXFLAGS@#$(CXXFLAGS_FOR_YOSYS_CONFIG)#;' \
-e 's#@CXX@#$(strip $(CXX))#;' -e 's#@LDFLAGS@#$(strip $(LDFLAGS) $(PLUGIN_LDFLAGS))#;' -e 's#@LDLIBS@#$(strip $(LDLIBS_NOVERIFIC))#;' \
-e 's#@BINDIR@#$(strip $(BINDIR))#;' -e 's#@DATDIR@#$(strip $(DATDIR))#;' < $< > yosys-config
$(Q) chmod +x yosys-config