From 2f36c829822a4b016ba075575c720ad9cb3c6463 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Sun, 13 Jul 2003 18:41:04 +0000 Subject: Relevant BUGIDs: 643357 Purpose of commit: bugfix Commit summary: --------------- Patch from Sam Hartman to fix handling of module linking on Linux: modules should be linked against libpam if they call any functions from the library, since not all platforms will correctly resolve symbol references otherwise. Also, make sure we use gcc, not ld, when linking, since there's additional linker glue that gcc will pull in for us. --- configure.in | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 3c498a7c..a7a298c7 100644 --- a/configure.in +++ b/configure.in @@ -42,7 +42,7 @@ SHLIBMODE=755 ; AC_SUBST(SHLIBMODE) dnl These are most likely platform specific - I think HPUX differs USESONAME=yes ; AC_SUBST(USESONAME) -SOSWITCH=-soname ; AC_SUBST(SOSWITCH) +SOSWITCH='-Xlinker -soname -Xlinker ' ; AC_SUBST(SOSWITCH) NEEDSONAME=no ; AC_SUBST(NEEDSONAME) LDCONFIG=/sbin/ldconfig ; AC_SUBST(LDCONFIG) @@ -282,9 +282,7 @@ AC_SUBST(CRACKLIB_DICTPATH) dnl Set FLAGS, linker options etc. depending on C compiler. dnl gcc is tested and much preferred; others less so, if at all dnl -dnl If compiling with gcc, linking is also supposed to be done with gcc; -dnl since we use linker-specific arguments, we may not gain anything by -dnl switching LD_L over, but I think we can use LD_D as-is. +dnl If compiling with gcc, linking is also supposed to be done with gcc dnl dnl For the moment, gcc is enforced above at "CC=gcc". dnl @@ -309,8 +307,8 @@ if test "$GCC" = yes; then WARNINGS="$GCC_WARNINGS" PIC="-fPIC" DYNTYPE=so - LD=ld - LD_L="$LD -x -shared" + LD=gcc + LD_L="$LD -Xlinker -x -shared" RANLIB=ranlib STRIP=strip CC_STATIC="-Xlinker -export-dynamic" -- cgit v1.2.3