diff options
author | Peter Foley <pefoley2@pefoley.com> | 2014-09-17 21:27:31 -0400 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-09-26 08:22:39 +0000 |
commit | bf00789dacf66488cb4f92819acf6953ed96164b (patch) | |
tree | 876336f969c2e80941f132bbb29699d5b4875888 /configure.ac | |
parent | 3dcb47d0d082696c8170411187e5b262840dc774 (diff) |
Properly handle the hash-style linker check when cross-compiling
Currently the hash-style check fails when cross-compiling,
use AC_RUN_IFELSE to properly handle this case.
checking for --hash-style gcc linker support ...
./configure: line 12119: ./conftest: cannot execute binary file
Change-Id: I77c2d6a859c1c2e6ba42f31b527a9507127d0644
Reviewed-on: https://gerrit.libreoffice.org/11496
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 499d765d21a2..c4367d9c1dd7 100644 --- a/configure.ac +++ b/configure.ac @@ -4906,16 +4906,17 @@ if test "$GCC" = "yes"; then hash_style_ldflags_save=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,--hash-style=$hash_style" - AC_LINK_IFELSE([AC_LANG_PROGRAM( + AC_RUN_IFELSE([AC_LANG_PROGRAM( [ #include <stdio.h> ],[ printf (""); ])], - [ if ./conftest$EXEEXT; then + [ HAVE_LD_HASH_STYLE=TRUE WITH_LINKER_HASH_STYLE=$hash_style - fi], + ], + [HAVE_LD_HASH_STYLE=FALSE], [HAVE_LD_HASH_STYLE=FALSE]) LDFLAGS=$hash_style_ldflags_save done |