regen-makefile.sh: Put libraries in LINUX_LIBS, not LDFLAGS

Additional libraries to be linked should be in LINUX_LIBS (appended at
the end of the linker command), not part of LDFLAGS (prepended to
the beginning of the linker command).

On binutils 2.35.1 / Debian unstable, without this patch, I get

/usr/bin/ld: IPL4asp_PT.so: undefined reference to `sctp_bindx'
/usr/bin/ld: IPL4asp_PT.so: undefined reference to `sctp_connectx'

which is resolved by this patch

Change-Id: I8a339076f445e3c650e407ae982c7c2dc4a760b2
changes/48/20448/1
Harald Welte 2 years ago
parent 847a77e32f
commit 18ed23cda5
  1. 2
      mme/regen_makefile.sh
  2. 2
      msc/regen_makefile.sh
  3. 3
      regen-makefile.sh
  4. 2
      sgsn/regen_makefile.sh

@ -6,4 +6,4 @@ export CPPFLAGS_TTCN3=""
../regen-makefile.sh MME_Tests.ttcn $FILES
sed -i -e 's/^LINUX_LIBS = -lxml2/LINUX_LIBS = -lxml2 -lfftranscode -lgnutls/' Makefile
sed -i -e 's/^LINUX_LIBS = -lxml2 -lsctp/LINUX_LIBS = -lxml2 -lsctp -lfftranscode/' Makefile

@ -6,4 +6,4 @@ export CPPFLAGS_TTCN3="-DIPA_EMULATION_MGCP -DIPA_EMULATION_CTRL -DIPA_EMULATION
../regen-makefile.sh MSC_Tests.ttcn $FILES
sed -i -e 's/^LINUX_LIBS = -lxml2/LINUX_LIBS = -lxml2 -lfftranscode/' Makefile
sed -i -e 's/^LINUX_LIBS = -lxml2 -lsctp/LINUX_LIBS = -lxml2 -lsctp -lfftranscode/' Makefile

@ -45,7 +45,8 @@ ttcn3_makefilegen -g -p -l -U 5 -f $*
TITAN_VERSION=$(ttcn3_makefilegen -v 2>&1 |grep "Product number" |cut --delimiter="/" -f 2-| sed -e "s/[A-Z ]//g")
sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile
sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan -lsctp /' Makefile
sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan/' Makefile
sed -i -e 's/LINUX_LIBS = -lxml2/LINUX_LIBS = -lxml2 -lsctp/' Makefile
#sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile
# The -DMAKEDEPEND_RUN is a workaround for Debian packaging issue,

@ -6,4 +6,4 @@ export CPPFLAGS_TTCN3="-DIPA_EMULATION_GSUP -DIPA_EMULATION_CTRL -DUSE_MTP3_DIST
../regen-makefile.sh SGSN_Tests.ttcn $FILES
sed -i -e 's/^LINUX_LIBS = -lxml2/LINUX_LIBS = -lxml2 -lfftranscode/' Makefile
sed -i -e 's/^LINUX_LIBS = -lxml2 -lsctp/LINUX_LIBS = -lxml2 -lsctp -lfftranscode/' Makefile

Loading…
Cancel
Save