From c164024f38b4f41021ef36b92773f151fcc83f7d Mon Sep 17 00:00:00 2001 From: Stefan Wallentowitz Date: Thu, 18 Jan 2018 21:25:43 -0500 Subject: [PATCH] Remove c++filt and fix status code of Makefile, bug1265 In the generated Makefile the linker output is piped through c++filt which was very useful for older linkers. But unfortunately the status code is lost during the piping. So when the make process is embedded in a larger setup a failure will not manifest to the outside flow. As modern linkers do the job of c++filt, this removes it from the generated Makefile. It will also produce a proper status code then. Signed-off-by: Wilson Snyder --- Changes | 2 ++ src/V3EmitMk.cpp | 2 +- test_regress/Makefile_obj | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Changes b/Changes index 87733dc91..ad2abe5c8 100644 --- a/Changes +++ b/Changes @@ -6,6 +6,8 @@ The contributors that suggested a given feature are shown in []. Thanks! **** Fix compile error on public real parameters by suppressing, bug1261. [Alex Solomatnikov] +**** Remove c++filt, bug1265. [Stefan Wallentowitz] + * Verilator 3.918 2018-01-02 diff --git a/src/V3EmitMk.cpp b/src/V3EmitMk.cpp index 468a845f1..4dd964304 100644 --- a/src/V3EmitMk.cpp +++ b/src/V3EmitMk.cpp @@ -211,7 +211,7 @@ public: of.puts("\n### Link rules... (from --exe)\n"); of.puts(v3Global.opt.exeName()+": $(VK_USER_OBJS) $(VK_GLOBAL_OBJS) $(VM_PREFIX)__ALL.a\n"); - of.puts("\t$(LINK) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@ $(LIBS) $(SC_LIBS) 2>&1 | c++filt\n"); + of.puts("\t$(LINK) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@ $(LIBS) $(SC_LIBS)\n"); of.puts("\n"); } diff --git a/test_regress/Makefile_obj b/test_regress/Makefile_obj index f4f44c24e..ee0bd6106 100644 --- a/test_regress/Makefile_obj +++ b/test_regress/Makefile_obj @@ -59,7 +59,7 @@ endif #Default link, using normal make rules #$(VM_PREFIX): $(VK_GLOBAL_OBJS) $(VK_OBJS) -# $(LINK) $(LDFLAGS) -g $^ $(LOADLIBES) $(LDLIBS) -o $@ $(LIBS) 2>&1 | c++filt +# $(LINK) $(LDFLAGS) -g $^ $(LOADLIBES) $(LDLIBS) -o $@ $(LIBS) 2>&1 #Our own compile rules; Faster compile, all in one file $(VM_PREFIX)__ALLboth.cpp: $(VK_CLASSES_CPP) $(VK_SUPPORT_CPP) @@ -70,5 +70,5 @@ $(VM_PREFIX)__ALLboth.o: $(VM_PREFIX)__ALLboth.cpp ifneq ($(MAKE_MAIN),0) $(VM_PREFIX): $(VM_PREFIX)__ALLboth.o - $(LINK) $(LDFLAGS) -g $^ $(LOADLIBES) $(LDLIBS) -o $@ $(LIBS) 2>&1 | c++filt + $(LINK) $(LDFLAGS) -g $^ $(LOADLIBES) $(LDLIBS) -o $@ $(LIBS) 2>&1 endif