Permalink
Browse files

Rearrange compiler/linker flags for modpython.

This should fix some issues with --as-needed.

Thanks to wired for reporting this.
  • Loading branch information...
1 parent e746438 commit 299e1f1b4cd9ce0292a827b79c472f44be96fe73 Alexey Sokolov committed Apr 3, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 modules/modpython/Makefile.inc
@@ -1,11 +1,11 @@
# vim: filetype=make
ifeq "$(PYTHON_ON)" "yes"
-PYTHONCOMMON := $(PY_CFLAGS) $(PY_LDFLAGS)
+PYTHONCOMMON := $(PY_CFLAGS)
PYTHONCOMMON += -DSWIG_TYPE_TABLE=znc
PYTHONCOMMON += -Wno-missing-field-initializers -Wno-unused -Wno-shadow
PYTHONCOMMON += -Wno-missing-declarations -Wno-uninitialized
-modpythonFLAGS := $(PYTHONCOMMON) -I.
+modpythonFLAGS := $(PYTHONCOMMON) -I. $(PY_LDFLAGS)
PYTHONHOOK := modpython_install
CLEAN += modpython/_znc_core.so modpython/_znc_core.cpp modpython/znc_core.py modpython/znc_core.pyc
@@ -39,7 +39,7 @@ modpython/_znc_core.so: modpython/_znc_core.cpp Makefile modpython/functions.cpp
@mkdir -p modpython
@mkdir -p .depend
$(E) Building ZNC python bindings library...
- $(Q)$(CXX) $(MODFLAGS) $(LDFLAGS) $(MODLINK) -I$(srcdir) -MMD -MF .depend/modpython.library.dep $(PYTHONCOMMON) -o $@ $<
+ $(Q)$(CXX) $(MODFLAGS) $(LDFLAGS) $(MODLINK) -I$(srcdir) -MMD -MF .depend/modpython.library.dep $(PYTHONCOMMON) -o $@ $< $(PY_LDFLAGS)
ifneq "$(SWIG)" ""
modpython/swigpyrun.h:
@mkdir -p modpython
@@ -56,7 +56,7 @@ modpython/functions.cpp: modpython/functions.in
modpython/compiler: modpython/compiler.cpp Makefile
$(E) Building optimizer for python files...
- $(Q)$(CXX) $(PYTHONCOMMON) -o $@ $<
+ $(Q)$(CXX) $(PYTHONCOMMON) -o $@ $< $(PY_LDFLAGS)
modpython_install: create_install_dir modpython_all
-for i in *.pyc; do \

0 comments on commit 299e1f1

Please sign in to comment.