From: Mark Wielaard Date: Wed, 17 Apr 2013 19:11:05 +0000 (+0000) Subject: Fix -Ttext-segment configure check. X-Git-Tag: svn/VALGRIND_3_9_0~313 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc14d93e0045f9a78e69ef3ff1dd545c50a23c89;p=thirdparty%2Fvalgrind.git Fix -Ttext-segment configure check. 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 --- diff --git a/configure.in b/configure.in index 424f8e6bd3..9a1db0c378 100644 --- a/configure.in +++ b/configure.in @@ -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"])