[LLVMdev] Building 64-bit libraries on OS X
Dale Johannesen
dalej at apple.com
Mon Feb 9 16:25:44 PST 2009
To build 64-bit libraries (i.e. 'file <library>' shows x86_64) try
'make EXTRA_OPTIONS=-m64"
Either 32-bit or 64-bit libraries are able to generate code for either
32-bit or 64-bit, try -m32 or -m64 at runtime
On Feb 9, 2009, at 4:16 PMPST, Jan Rehders wrote:
> Hi,
>
> how do I compile LLVM for 64-bit on OS X? I want to get 64-bit
> libraries which generate x86_64 to link them into a 64-bit
> application. All my attempts ended up with either 32-bit libraries or
> errors. My machine is an Intel Xeon quad core, 'sysctl
> hw.cpu64bit_capable' returns 1 so I think the machine is fine.
>
> - './configure && make' yields 32-bit libraries and executables
> - I've tried various variations of ./configure --host X and ./
> configure --target X. I am not sure which target triple to use (the
> getting started guide says "The values of these options must be legal
> target triples that your GCC compiler supports."). Unfortunately I
> couldn't figure out which target triples to use. I've tried a few but
> until now I either get an error when calling configure or I simply end
> up with 32-bit libraries. For instance "i686_x86-apple-darwin9.0.0"
> results in "Invalid configuration `i686_x86-apple-darwin9.0.0':
> machine `i686_x86-apple' not recognized". "x86_64-apple-darwin9.0.0"
> configures and builds fine but all libraries are 32-bit ("file
> libLTO.dylib" says "libLTO.dylib: Mach-O dynamically linked shared
> library i386").
>
> So, how can I build a 64-bit version for OS X? (Unfortunately prebuild
> executables are not an option for me)
>
> Jan
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list