On Thu, Nov 28, 2013 at 04:05:18PM +0100, Thomas Baag wrote:
> Hi folks,
> 
> i'm trying to cross compile a simple hello world on Scientific Linux 6.4 
> (amd64) using cmake version 2.8.4 and arm-none-eabi-gcc 4.8.1. I've 
> encountered the well known "-rdynamic" problem[1], but couldn't manage to 
> apply a nice workaround.
> 
> I DONT want to disable simple compiler checks. The problem seems to be in the 
> "__linux_compiler_gnu" macro in "Modules/Platform/Linux-GNU.cmake".
> 
> Until now i tried 
> SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
> SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
> before and after "PROJECT(...)", but it didn't work.
> After that, I added this on top of my CMakeList.txt:
> SET(__LINUX_COMPILER_GNU 1)
> MACRO(__linux_compiler_gnu lang)
>  SET(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "")
> ENDMACRO()
> But it also didnt work.
> 
> Now i'm somehow out of ideas. Could anyone pls help?
> 
> 
> Greetings
> Thomas
> 
> [1] http://www.cmake.org/Bug/view.php?id=9985
> 
> 
> ================
> # Minimal CMakeList.txt:
> CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
> 
> SET(__LINUX_COMPILER_GNU 1)
> MACRO(__linux_compiler_gnu lang)
>  SET(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "")
> ENDMACRO()
> 
> PROJECT(Build-Example)
> 
> ================
> # Minimal toolchain file:
> SET(CMAKE_SYSTEM_NAME Linux)
> SET(CMAKE_SYSTEM_PROCESSOR "armv7")
> SET(CMAKE_C_COMPILER arm-none-eabi-gcc)

The only way I found around this was

    set(CMAKE_SYSTEM_NAME Generic )

but I think that is exactly what you want to avoid given your comment
about "I DONT want to disable simple compiler checks."

/M

-- 
Magnus Therning                      OpenPGP: 0xAB4DFBA4 
email: [email protected]   jabber: [email protected]
twitter: magthe               http://therning.org/magnus

Unix is the answer, but only if you phrase the question very
carefully.
     -- Unknown

Attachment: pgpBDnZcXAf0H.pgp
Description: PGP signature

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to