From dc08c78b46b207cba5b4729cbfa931d4f92d896e Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Tue, 9 Feb 2016 10:57:39 +0000 Subject: [PATCH] [build] another go at static libc++ --- Makefile.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.in b/Makefile.in index 292db6e..46e91fd 100644 --- a/Makefile.in +++ b/Makefile.in @@ -114,9 +114,9 @@ INCLUDES+=-I$(TOP_BUILDDIR) -I$(TOP_DIR) -I$(TOP_DIR)/thin-provisioning LIBS:=-laio -lexpat ifeq ("@STATIC_CXX@", "yes") -LIBS+=$(shell g++ -print-file-name=libstdc++.a) +CXXLIB+=-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -Wl,--as-needed else -LIBS+=-lstdc++ +CXXLIB+=-lstdc++ endif INSTALL:=@INSTALL@ @@ -157,7 +157,7 @@ lib/libpdata.a: $(OBJECTS) bin/pdata_tools: $(OBJECTS) @echo " [LD] $@" - $(V) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $+ $(LIBS) + $(V) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $+ $(LIBS) $(CXXLIB) #----------------------------------------------------------------