diff options
author | Jonathan Gray <[email protected]> | 2014-09-02 02:08:00 +1000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2014-09-05 14:20:42 +0100 |
commit | 635477dc4b9579dac2fc0fb332dcf2e0e48dd418 (patch) | |
tree | e16a056efb55d49e7786ada9846fe09d1dddad1f /configure.ac | |
parent | d3dee3df97e05f86792a1591a023f66ca195fb1c (diff) |
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: [email protected]
Signed-off-by: Jonathan Gray <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 9d2ddb4ab00..f7525fe77a4 100644 --- a/configure.ac +++ b/configure.ac @@ -358,6 +358,24 @@ 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 <<EOF +{ + radeon_drm_winsys_create; +}; +EOF +AC_LINK_IFELSE( + [AC_LANG_SOURCE([int main() { return 0;}])], + [have_ld_dynamic_list=yes;AC_MSG_RESULT(yes)], + [have_ld_dynamic_list=no; AC_MSG_RESULT(no)]) +LDFLAGS=$save_LDFLAGS +AM_CONDITIONAL(HAVE_LD_DYNAMIC_LIST, test "$have_ld_dynamic_list" = "yes") + +dnl dnl compatibility symlinks dnl case "$host_os" in |