]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix -Ttext-segment configure check.
authorMark Wielaard <mark@klomp.org>
Wed, 17 Apr 2013 19:11:05 +0000 (19:11 +0000)
committerMark Wielaard <mark@klomp.org>
Wed, 17 Apr 2013 19:11:05 +0000 (19:11 +0000)
Explicitly test together with -static -nodefaultlibs -nostartfiles to mimic
what the tools linking script does. At least on s390 the test might fail for
a non-static AC_LINK, while it does work when using those other flags too.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13371

configure.in

index 424f8e6bd3de0d422d642af6a20047245c3df73d..9a1db0c378c7db741e803b7ce2f57523e31ce31b 100644 (file)
@@ -1718,10 +1718,10 @@ CFLAGS=$safe_CFLAGS
 AC_MSG_CHECKING([if the linker accepts -Wl,-Ttext-segment])
 
 safe_CFLAGS=$CFLAGS
-CFLAGS="-Wl,-Ttext-segment=$valt_load_address_pri_norml"
+CFLAGS="-static -nodefaultlibs -nostartfiles -Wl,-Ttext-segment=$valt_load_address_pri_norml"
 
 AC_LINK_IFELSE(
-[AC_LANG_PROGRAM([ ], [return 0;])],
+[AC_LANG_SOURCE([int _start () { return 0; }])],
 [
   linker_using_t_text="no"
   AC_SUBST([FLAG_T_TEXT], ["-Ttext-segment"])