mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s3:configure: add support for Solaris' ld -z ignore
try linker flags for ignoring unused libs in this order: -Wl,--as-needed (gcc like + binutils) -Wl,-z,ignore (gcc like + Solaris linker) -z ignore (old Sun C)
This commit is contained in:
parent
f96f8f9c77
commit
4243e6e3a9
@ -1758,22 +1758,18 @@ fi
|
||||
|
||||
AC_MSG_RESULT($BLDSHARED)
|
||||
|
||||
if test x"${ac_cv_prog_gnu_ld}" = x"yes"; then
|
||||
for flags in "-Wl,--as-needed" "-Wl,-z,ignore" "-z ignore" ; do
|
||||
saved_ldflags="$LDFLAGS"
|
||||
AC_MSG_CHECKING([if --as-needed works])
|
||||
LDFLAGS="--as-needed $saved_ldflags"
|
||||
AC_MSG_CHECKING([if $flags works])
|
||||
LDFLAGS="$flags $saved_ldflags"
|
||||
AC_TRY_LINK([],[],
|
||||
[AC_MSG_RESULT([yes])
|
||||
LD_AS_NEEDED_FLAG=--as-needed],
|
||||
AC_MSG_RESULT([no]))
|
||||
AC_MSG_CHECKING([if -Wl,--as-needed works])
|
||||
LDFLAGS="-Wl,--as-needed $saved_ldflags"
|
||||
AC_TRY_LINK([],[],
|
||||
[AC_MSG_RESULT([yes])
|
||||
LD_AS_NEEDED_FLAG=-Wl,--as-needed],
|
||||
LD_AS_NEEDED_FLAG=$flags
|
||||
ld_as_needed_flag_found=yes],
|
||||
AC_MSG_RESULT([no]))
|
||||
LDFLAGS="$LD_AS_NEEDED_FLAG $saved_ldflags"
|
||||
fi
|
||||
test x"$ld_as_needed_flag_found" = xyes && break
|
||||
done
|
||||
|
||||
# for historical reasons almost all linkers don't complain about unresolved
|
||||
# symbols in shared libs. Except for the internal samba modules we want to get
|
||||
|
Loading…
Reference in New Issue
Block a user