Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ NO_AS_NEEDED= @NO_AS_NEEDED@
LDLAST= @LDLAST@
SGI_ABI= @SGI_ABI@
CCSHARED= @CCSHARED@
# LINKFORSHARED are the flags passed to the $(CC) command that links
# the python executable -- this is only needed for a few systems
LINKFORSHARED= @LINKFORSHARED@
ARFLAGS= @ARFLAGS@
# Extra C flags added for building the interpreter object files.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
``python-config --ldflags`` no longer includes flags of the
``LINKFORSHARED`` variable. The ``LINKFORSHARED`` variable must only be used
to build executables.
2 changes: 0 additions & 2 deletions Misc/python-config.in
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ for opt in opt_flags:
if opt == '--ldflags':
if not getvar('Py_ENABLE_SHARED'):
libs.insert(0, '-L' + getvar('LIBPL'))
if not getvar('PYTHONFRAMEWORK'):
libs.extend(getvar('LINKFORSHARED').split())
print(' '.join(libs))

elif opt == '--extension-suffix':
Expand Down
7 changes: 1 addition & 6 deletions Misc/python-config.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ ABIFLAGS="@ABIFLAGS@"
LIBS="-lpython${VERSION}${ABIFLAGS} @LIBS@ $SYSLIBS"
BASECFLAGS="@BASECFLAGS@"
LDLIBRARY="@LDLIBRARY@"
LINKFORSHARED="@LINKFORSHARED@"
OPT="@OPT@"
PY_ENABLE_SHARED="@PY_ENABLE_SHARED@"
LDVERSION="@LDVERSION@"
Expand Down Expand Up @@ -89,15 +88,11 @@ do
echo "$LIBS"
;;
--ldflags)
LINKFORSHAREDUSED=
if [ -z "$PYTHONFRAMEWORK" ] ; then
LINKFORSHAREDUSED=$LINKFORSHARED
fi
LIBPLUSED=
if [ "$PY_ENABLE_SHARED" = "0" ] ; then
LIBPLUSED="-L$LIBPL"
fi
echo "$LIBPLUSED -L$libdir $LIBS $LINKFORSHAREDUSED"
echo "$LIBPLUSED -L$libdir $LIBS"
;;
--extension-suffix)
echo "$SO"
Expand Down