From: Tom Hughes Date: Tue, 17 May 2005 16:13:15 +0000 (+0000) Subject: Pass an explicit "-m32" or "-m64" in the C flags on x86/amd64 systems X-Git-Tag: svn/VALGRIND_3_0_0~557 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=194bedbca97878e2997e05e8fc1da29fea1fedc1;p=thirdparty%2Fvalgrind.git Pass an explicit "-m32" or "-m64" in the C flags on x86/amd64 systems so that we get the right compiler when --host is used to ask for an x86 build on amd64 or vice versa. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3761 --- diff --git a/configure.in b/configure.in index 11f2073f12..2b414b9d5f 100644 --- a/configure.in +++ b/configure.in @@ -96,9 +96,9 @@ case "${host_cpu}" in AC_MSG_RESULT([ok (${host_cpu})]) VG_ARCH="x86" KICKSTART_BASE="0xb0000000" - ARCH_CORE_AM_CFLAGS="@PREFERRED_STACK_BOUNDARY@ -DELFSZ=32" - ARCH_TOOL_AM_CFLAGS="@PREFERRED_STACK_BOUNDARY@" - ARCH_CORE_AM_CCASFLAGS="" + ARCH_CORE_AM_CFLAGS="-m32 @PREFERRED_STACK_BOUNDARY@ -DELFSZ=32" + ARCH_TOOL_AM_CFLAGS="-m32 @PREFERRED_STACK_BOUNDARY@" + ARCH_CORE_AM_CCASFLAGS="-m32" ;; x86_64) @@ -108,15 +108,15 @@ case "${host_cpu}" in # quantities; therefore going above 0x7fffffff doesn't work... this is # a problem. KICKSTART_BASE="0x70000000" - ARCH_CORE_AM_CFLAGS="-fomit-frame-pointer @PREFERRED_STACK_BOUNDARY@ -DELFSZ=64" + ARCH_CORE_AM_CFLAGS="-m64 -fomit-frame-pointer @PREFERRED_STACK_BOUNDARY@ -DELFSZ=64" # XXX: need to use -fpic, otherwise when linking tools I get this error # message: # relocation R_X86_64_32 can not be used when making a shared object; # recompile with -fPIC # # I don't understand... --njn - ARCH_TOOL_AM_CFLAGS="-fomit-frame-pointer @PREFERRED_STACK_BOUNDARY@ -fpic" - ARCH_CORE_AM_CCASFLAGS="" + ARCH_TOOL_AM_CFLAGS="-m64 -fomit-frame-pointer @PREFERRED_STACK_BOUNDARY@ -fpic" + ARCH_CORE_AM_CCASFLAGS="-m64" ;; arm*)