[llvm-commits] [llvm] r66315 - /llvm/trunk/Makefile.rules

Nick Lewycky nicholas at mxc.ca
Sat Mar 7 14:02:31 PST 2009


Hi Evan. This breaks the build on my system and I'm about to revert it.

My system has an x86_64 kernel with a 32-bit userspace. It works like this:

$ g++ x.cpp -o x
$ file x
x: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically 
linked (uses shared libs), for GNU/Linux 2.6.18, not stripped
$ g++ x.cpp -o x -m64
/usr/bin/ld: skipping incompatible 
/usr/lib/gcc/i486-linux-gnu/4.3.3/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible 
/usr/lib/gcc/i486-linux-gnu/4.3.3/libstdc++.a when searching for -lstdc++
/usr/bin/ld: skipping incompatible 
/usr/lib/gcc/i486-linux-gnu/4.3.3/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible 
/usr/lib/gcc/i486-linux-gnu/4.3.3/libstdc++.a when searching for -lstdc++
/usr/local/lib64/libstdc++.a: could not read symbols: Archive has no 
index; run ranlib to add one
collect2: ld returned 1 exit status
$

I'm not sure what that means for the ARCH variable. By way of example, 
to build llvm-gcc I force --host and --build=i686-pc-linux-gnu . If you 
think the right fix here is to force ARCH=i386 on a system like mine, 
I'll be happy to investigate how to do that.

Nick

Evan Cheng wrote:
> Author: evancheng
> Date: Fri Mar  6 19:40:17 2009
> New Revision: 66315
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=66315&view=rev
> Log:
> If ARCH is x86_64, pass -m64 to the host compiler. -m32 for i386. This makes sure the JIT work correctly.
> 
> Modified:
>     llvm/trunk/Makefile.rules
> 
> Modified: llvm/trunk/Makefile.rules
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=66315&r1=66314&r2=66315&view=diff
> 
> ==============================================================================
> --- llvm/trunk/Makefile.rules (original)
> +++ llvm/trunk/Makefile.rules Fri Mar  6 19:40:17 2009
> @@ -516,6 +516,14 @@
>  
>    # Building universal cannot compute dependencies automatically.
>    DISABLE_AUTO_DEPENDENCIES=1
> +else
> +  ifeq ($(ARCH),x86_64)
> +    CompileCommonOpts += -m64
> +  else
> +    ifeq ($(ARCH),i386)
> +      CompileCommonOpts += -m32
> +    endif
> +  endif
>  endif
>  
>  ifeq ($(OS),SunOS)
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 




More information about the llvm-commits mailing list