seltzered / ccons

Automatically exported from code.google.com/p/ccons
MIT License
0 stars 0 forks source link

Needs to specify i386 in the CMAKE_C_FLAGS and CMAKE_CXX_FLAGS on 64-bit OS #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
On the newer version of OS X, gcc's default arch is x86_64. This causes a 
problem—because the 
current LLVM and clang's build arch is i386. But because ccons never specifies 
the arch on OS X, it 
builds incompatible binaries (i.e. ld complains that no x86_64 LLVM libraries 
are available).

The diff attached below specifies arch i386 in CMAKE_C_FLAGS and 
CMAKE_CXX_FLAGS which 
should mitigate the problem. Am not sure if this would break the build on other 
platforms, though.

Original issue reported on code.google.com by lukh...@gmail.com on 7 May 2009 at 6:38

Attachments:

GoogleCodeExporter commented 9 years ago
Hmm, I guess we should be getting that information out of llvm-config 
--host-target

Original comment by Alexei.Svitkine@gmail.com on 12 Jul 2009 at 12:06

GoogleCodeExporter commented 9 years ago
I've committed a change to CMakeLists.txt that uses llvm-config to get the host 
target that is used when 
building ccons. I believe this should fix the issue you were seeing.

Original comment by Alexei.Svitkine@gmail.com on 12 Jul 2009 at 12:18