[LLVMdev] Building 64-bit libraries on OS X

Jack Howarth howarth at bromo.med.uc.edu
Mon Feb 9 16:50:26 PST 2009


Does llvm (not llvm-gcc-4.2) understand the
x86_64-apple-darwin target? I am not sure if
patches for x86_64-apple-darwin as a target
are present in gcc 4.2.1. I do know we only
added the full multilib support for the
x86_64-apple-darwin target in gcc 4.4.
                     Jack


On Mon, Feb 09, 2009 at 04:25:44PM -0800, Dale Johannesen wrote:
> 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
> 
> _______________________________________________
> 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