diff options
author | James Le Cuirot <chewi@gentoo.org> | 2018-03-19 21:16:34 +0000 |
---|---|---|
committer | Matt Turner <mattst88@gentoo.org> | 2018-03-23 16:41:47 -0700 |
commit | 03a4991d9ae07d5273a73ae4556b5cd1007ab6ff (patch) | |
tree | 936e11da15184a36119290ac8f4f4c066b85683f /eclass | |
parent | net-misc/dropbear: stable 2017.75 for ia64, bug #619002 (diff) | |
download | gentoo-03a4991d9ae07d5273a73ae4556b5cd1007ab6ff.tar.gz gentoo-03a4991d9ae07d5273a73ae4556b5cd1007ab6ff.tar.bz2 gentoo-03a4991d9ae07d5273a73ae4556b5cd1007ab6ff.zip |
cmake-utils.eclass: Make the new ASM-ATT rules actually work
The previous attempt actually broke ASM in media-libs/vulkan-loader
entirely so that it fell back to C code. After much experimentation
and combing through strace output, I found that -x assembler is needed
to handle non-standard file extentions and linking is done as a
separate step. CMAKE_ASM-ATT_LINK_FLAGS therefore needs to be defined
with -nostdlib to avoid errors about undefined main symbols.
Closes: https://bugs.gentoo.org/625844
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/cmake-utils.eclass | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass index f8853be502a1..f6952ec09efd 100644 --- a/eclass/cmake-utils.eclass +++ b/eclass/cmake-utils.eclass @@ -520,7 +520,8 @@ cmake-utils_src_configure() { fi cat > "${build_rules}" <<- _EOF_ || die SET (CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> <DEFINES> ${includes} ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "ASM compile command" FORCE) - SET (CMAKE_ASM-ATT_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> <DEFINES> ${includes} ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "ASM compile command" FORCE) + SET (CMAKE_ASM-ATT_COMPILE_OBJECT "<CMAKE_ASM-ATT_COMPILER> <DEFINES> ${includes} ${CPPFLAGS} <FLAGS> -o <OBJECT> -c -x assembler <SOURCE>" CACHE STRING "ASM-ATT compile command" FORCE) + SET (CMAKE_ASM-ATT_LINK_FLAGS "-nostdlib" CACHE STRING "ASM-ATT link flags" FORCE) SET (CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> ${includes} ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C compile command" FORCE) SET (CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <DEFINES> ${includes} ${CPPFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "C++ compile command" FORCE) SET (CMAKE_Fortran_COMPILE_OBJECT "<CMAKE_Fortran_COMPILER> <DEFINES> ${includes} ${FCFLAGS} <FLAGS> -o <OBJECT> -c <SOURCE>" CACHE STRING "Fortran compile command" FORCE) |