Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] Use TARGET_LDFLAGS for cmake shared and module libraries
@ 2018-07-12  6:52 Damien Thébault
  2018-07-19  7:44 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Damien Thébault @ 2018-07-12  6:52 UTC (permalink / raw)
  To: buildroot

With cmake packages, we are only using TARGET_LDFLAGS for executables
and not for shared libraries.

This patch adds CMAKE_SHARED_LINKER_FLAGS and CMAKE_MODULE_LINKER_FLAGS
to the cmake toolchain file so that buildroot TARGET_LDFLAGS are used
for shared and module libraries.

Signed-off-by: Damien Th?bault <damien.thebault@vitec.com>
---
 support/misc/toolchainfile.cmake.in | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/support/misc/toolchainfile.cmake.in b/support/misc/toolchainfile.cmake.in
index 1f5d2371ed..6f3c8ca971 100644
--- a/support/misc/toolchainfile.cmake.in
+++ b/support/misc/toolchainfile.cmake.in
@@ -45,6 +45,8 @@ set(CMAKE_BUILD_TYPE @@CMAKE_BUILD_TYPE@@ CACHE STRING "Buildroot build configur
 set(CMAKE_C_FLAGS "@@TARGET_CFLAGS@@" CACHE STRING "Buildroot CFLAGS")
 set(CMAKE_CXX_FLAGS "@@TARGET_CXXFLAGS@@" CACHE STRING "Buildroot CXXFLAGS")
 set(CMAKE_EXE_LINKER_FLAGS "@@TARGET_LDFLAGS@@" CACHE STRING "Buildroot LDFLAGS for executables")
+set(CMAKE_SHARED_LINKER_FLAGS "@@TARGET_LDFLAGS@@" CACHE STRING "Buildroot LDFLAGS for shared libraries")
+set(CMAKE_MODULE_LINKER_FLAGS "@@TARGET_LDFLAGS@@" CACHE STRING "Buildroot LDFLAGS for module libraries")
 
 set(CMAKE_INSTALL_SO_NO_EXE 0)
 
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-07-19  7:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-12  6:52 [Buildroot] [PATCH] Use TARGET_LDFLAGS for cmake shared and module libraries Damien Thébault
2018-07-19  7:44 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox