diff mbox series

[1/9] wmediumd: add -lstdc++ for SANITIZE=1

Message ID 20200625150754.5b773d0f5e50.I3d0915b84d33b5a770cef1c1273bd33ac4e72d7b@changeid
State New
Headers show
Series [1/9] wmediumd: add -lstdc++ for SANITIZE=1 | expand

Commit Message

Johannes Berg June 25, 2020, 1:08 p.m. UTC
From: Johannes Berg <johannes.berg@intel.com>

It appears that in some scenarios this is necessary to get
the right version of the library, otherwise some runtime
linking can fail. Add -lstdc++ as required by -lasan.

---
 wmediumd/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/wmediumd/Makefile b/wmediumd/Makefile
index f75c4e8b4e3e..fa94eb01fbc2 100644
--- a/wmediumd/Makefile
+++ b/wmediumd/Makefile
@@ -56,7 +56,7 @@  OBJECTS += lib/uds.o lib/vhost.o lib/wallclock.o
 ifeq ($(SANITIZE),1)
 CFLAGS += -fsanitize=undefined,address
 # apparently these have to come first for some reason
-override LDFLAGS := -lasan -lubsan $(LDFLAGS)
+override LDFLAGS := -lasan -lubsan -lstdc++ $(LDFLAGS)
 endif
 
 all: wmediumd