From 635477dc4b9579dac2fc0fb332dcf2e0e48dd418 Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Tue, 2 Sep 2014 02:08:00 +1000 Subject: [PATCH] automake: check if the linker supports --dynamic-list As older versions of gnu ld did not support --dynamic-list check to see if it is supported before using it. Non gnu linkers such the apple one likely lack this option as well. Fixes the build on OpenBSD which has binutils 2.15 and 2.17. The --dynamic-list option seems to been have introduced sometime after binutils 2.17 was released as it is present in 2.18. Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Jonathan Gray Reviewed-by: Emil Velikov --- configure.ac | 18 ++++++++++++++++++ src/gallium/targets/dri/Makefile.am | 6 +++++- src/gallium/targets/vdpau/Makefile.am | 6 +++++- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 9d2ddb4ab00..f7525fe77a4 100644 --- a/configure.ac +++ b/configure.ac @@ -357,6 +357,24 @@ AC_LINK_IFELSE( LDFLAGS=$save_LDFLAGS AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes") +dnl +dnl Check if linker supports dynamic list files +dnl +AC_MSG_CHECKING([if the linker supports --dynamic-list]) +save_LDFLAGS=$LDFLAGS +LDFLAGS="$LDFLAGS -Wl,--dynamic-list=conftest.dyn" +cat > conftest.dyn <