summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-12-19 21:29:27 -0800
committerGuy Harris <guy@alum.mit.edu>2016-12-20 05:30:22 +0000
commit1656261b955503b8d246029d3c6aa0f42fe204bf (patch)
tree4cb9532ebc582532242304036a7f999918eab9aa /configure.ac
parent23d80b00122984535e47e5e2af8cbd4deb9b8a9e (diff)
downloadwireshark-1656261b955503b8d246029d3c6aa0f42fe204bf.tar.gz
Use -bbigtoc for libwireshark on AIX (if we're using GCC or Clang).
This will have to be done differently with xlc if it's necessary. While we're at it, fix the spelling of "Cygwin" (no InterCaps). Bug: 13262 Change-Id: If3084cfb58f4abd9048afafecdd24c13645c2776 Reviewed-on: https://code.wireshark.org/review/19355 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac19
1 files changed, 18 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 6ce81b1fcb..a1990893d4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1063,6 +1063,22 @@ fi
#
AC_MSG_CHECKING(for platform-specific linker flags)
case "$host_os" in
+aix*)
+ #
+ # If this is GCC or Clang, Add -Wl,-bbigtoc for big libraries.
+ # XXX - what if we're using xlc? Is that necessary? The
+ # xlc 7.0 manual says "Specifying -qpic=large has the same
+ # effect as passing -bbigtoc to ld"; do we need to tell xlc,
+ # when it's compiling, to generate different code for a large
+ # TOC, or is that just a linker flag? For that matter, do we
+ # have to tell GCC or Clang to generate different code for a
+ # large TOC?
+ #
+ if test "x$GCC" = "xyes" -o "x$CC" = "xclang" ; then
+ LDFLAGS_BIGSHAREDLIB="-Wl,-bbigtoc"
+ AC_MSG_RESULT([AIX linker with GCC or Clang - added -Wl,-bbigtoc to large shared library linker flags and -Wl,-headerpad_max_install_names -Wl,-search_paths_first and -Wl,-headerpad_max_install_names to all linker flags])
+ fi
+ ;;
darwin*)
#
# Add -Wl,-single_module to the LDFLAGS used with shared
@@ -1092,12 +1108,13 @@ cygwin*)
# undefined symbols.
#
WS_LDFLAGS="$WS_LDFLAGS -no-undefined"
- AC_MSG_RESULT(CygWin GNU ld - added -no-undefined)
+ AC_MSG_RESULT(Cygwin GNU ld - added -no-undefined)
;;
*)
AC_MSG_RESULT(none needed)
;;
esac
+AC_SUBST(LDFLAGS_BIGSHAREDLIB)
AC_SUBST(LDFLAGS_SHAREDLIB)
#