Brad King wrote:
> On 06/11/2013 07:35 AM, Stephen Kelly wrote:
>> # CMake workarounds
>> set(CMAKE_EXE_LINKER_FLAGS ${CMAKE_TOOLCHAIN_LINK_FLAGS} CACHE INTERNAL
>> "exe link flags") set(CMAKE_MODULE_LINKER_FLAGS
>> ${CMAKE_TOOLCHAIN_LINK_FLAGS} CACHE INTERNAL "module link flags")
>> set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_TOOLCHAIN_LINK_FLAGS} CACHE
>> INTERNAL "shared link flags")
> [snip]
>> The CMake workarounds are needed because I don't think there's a
>> convenient alternative way to specify the -L and -B flags that clang
>> needs.
>
> The LDFLAGS environment variable should put link flags everywhere.
Setting LDFLAGS is partly useful. It seems to have an equivalent effect as
setting CMAKE_EXE_LINKER_FLAGS.
However, even when LDFLAGS is set, the ABI compiler test fails, and the
triple is not automatically determined, or the implicit link dirs etc. Only
the patch to the CMakeDetermineCompilerABI.cmake file I posted helps with
that. Is that expected, or is there a bug somewhere there?
> Shouldn't you create a platform file that sets
> CMAKE_*_LINKER_FLAGS_INIT appropriately?
I don't follow your thinking. Would such a file live in the cmake tree? What
would it be called and what else would it contain?
Thanks,
Steve.
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers