summaryrefslogtreecommitdiff
path: root/m4/gcc4_visibility.m4
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2025-11-22 14:50:27 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2025-11-22 14:50:27 +0100
commit811c5336e00e3357afeb0909a4d182d0c3bb6ad4 (patch)
treefe10b6cb9309bef50e7458c5c203905b43529d24 /m4/gcc4_visibility.m4
parent62ac2dd91f81d8584d5ab585639dfe29eefc3e20 (diff)
parent80101a458f40cc35f39e890baba1a891a83009e7 (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'm4/gcc4_visibility.m4')
-rw-r--r--m4/gcc4_visibility.m421
1 files changed, 21 insertions, 0 deletions
diff --git a/m4/gcc4_visibility.m4 b/m4/gcc4_visibility.m4
index 708d42b..e58a0d7 100644
--- a/m4/gcc4_visibility.m4
+++ b/m4/gcc4_visibility.m4
@@ -19,3 +19,24 @@ AC_DEFUN([CHECK_GCC_FVISIBILITY], [
CFLAGS="$saved_CFLAGS"
AC_LANG_POP([C])
])
+
+AC_DEFUN([CHECK_LD_SYMVERS], [
+ AC_MSG_CHECKING([linker support for symbol maps])
+ echo '{global:*;};' >conftest.map
+ saved_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
+ AC_LINK_IFELSE([AC_LANG_SOURCE([ int main() { return 0; } ])],
+ [with_ldsym=yes], [with_ldsym=no])
+ LDFLAGS="$saved_LDFLAGS"
+ rm conftest.map
+ AM_CONDITIONAL([WITH_LDSYM], [test "$with_ldsym" = yes])
+ AS_IF([test -n "$LD" && $LD -z help >/dev/null 2>/dev/null], [with_sun_ld=yes], [with_sun_ld=no])
+ AM_CONDITIONAL([WITH_SUN_LD], [test "$with_sun_ld" = yes])
+ AS_IF([test "$with_ldsym" = yes], [
+ AC_MSG_RESULT([-Wl,--version-script])
+ ], [test "$with_sun_ld" = yes], [
+ AC_MSG_RESULT([-M])
+ ], [
+ AC_MSG_RESULT([no])
+ ])
+])