diff --git a/swig/Python/Makefile b/swig/Python/Makefile index c4aa5cbc..e55ed020 100644 --- a/swig/Python/Makefile +++ b/swig/Python/Makefile @@ -35,7 +35,7 @@ else CXX := g++ PYINC := $(shell python-config --cflags) PYLIBS := $(shell python-config --ldflags) - SWIGFLAGS := -shared + SWIGFLAGS := -Wl,-O1,--as-needed -shared CXXFLAGS += -std=c++0x # Make sure you have Atlas installed. You can statically link Atlas if you # would like to be able to move the library to a machine without Atlas. diff --git a/swig/Python3/Makefile b/swig/Python3/Makefile index 5bf8b15d..901db1a0 100644 --- a/swig/Python3/Makefile +++ b/swig/Python3/Makefile @@ -39,7 +39,7 @@ else CXX := g++ PYINC := $(shell python3-config --cflags) PYLIBS := $(shell python3-config --ldflags) - SWIGFLAGS := -shared + SWIGFLAGS := -Wl,-O1,--as-needed -shared CXXFLAGS += -std=c++0x # Make sure you have Atlas installed. You can statically link Atlas if you # would like to be able to move the library to a machine without Atlas.