* [Buildroot] [PATCH 0/3] package/pkg-cmake.mk: host: build shared as default
@ 2020-09-16 10:02 Michael Nosthoff
2020-09-16 10:02 ` [Buildroot] [PATCH 1/3] package/doxygen: disable shared libs for host Michael Nosthoff
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Michael Nosthoff @ 2020-09-16 10:02 UTC (permalink / raw
To: buildroot
this is a follow-up to this discussion/investigation
http://lists.busybox.net/pipermail/buildroot/2020-September/291494.html
first for doxygen and clangd/lld -DBUILD_SHARED_LIBS is enforced to =OFF.
finally the default flag -DBUILD_SHARED_LIBS=ON is set.
Michael Nosthoff (3):
package/doxygen: disable shared libs for host
package/{clang, lld}: host: disable shared_libs
package/pkg-cmake.mk: build host with shared libs
package/clang/clang.mk | 1 +
package/doxygen/doxygen.mk | 2 ++
package/lld/lld.mk | 3 +++
package/pkg-cmake.mk | 1 +
4 files changed, 7 insertions(+)
--
2.25.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/3] package/doxygen: disable shared libs for host
2020-09-16 10:02 [Buildroot] [PATCH 0/3] package/pkg-cmake.mk: host: build shared as default Michael Nosthoff
@ 2020-09-16 10:02 ` Michael Nosthoff
2020-09-17 20:33 ` Thomas Petazzoni
2020-09-16 10:02 ` [Buildroot] [PATCH 2/3] package/{clang, lld}: host: disable shared_libs Michael Nosthoff
2020-09-16 10:02 ` [Buildroot] [PATCH 3/3] package/pkg-cmake.mk: build host with shared libs Michael Nosthoff
2 siblings, 1 reply; 5+ messages in thread
From: Michael Nosthoff @ 2020-09-16 10:02 UTC (permalink / raw
To: buildroot
doxygen fails to build with BUILD_SHARED_LIBS=ON as it only
for some targets honors this flag and links the rest static.
So enforce BUILD_SHARED_LIBS=OFF for this package.
Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
---
package/doxygen/doxygen.mk | 2 ++
1 file changed, 2 insertions(+)
diff --git a/package/doxygen/doxygen.mk b/package/doxygen/doxygen.mk
index 6d8727208a..ee8ae4fde4 100644
--- a/package/doxygen/doxygen.mk
+++ b/package/doxygen/doxygen.mk
@@ -11,4 +11,6 @@ DOXYGEN_LICENSE = GPL-2.0
DOXYGEN_LICENSE_FILES = LICENSE
HOST_DOXYGEN_DEPENDENCIES = host-flex host-bison
+HOST_DOXYGEN_CONF_OPTS += -DBUILD_SHARED_LIBS=OFF
+
$(eval $(host-cmake-package))
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 2/3] package/{clang, lld}: host: disable shared_libs
2020-09-16 10:02 [Buildroot] [PATCH 0/3] package/pkg-cmake.mk: host: build shared as default Michael Nosthoff
2020-09-16 10:02 ` [Buildroot] [PATCH 1/3] package/doxygen: disable shared libs for host Michael Nosthoff
@ 2020-09-16 10:02 ` Michael Nosthoff
2020-09-16 10:02 ` [Buildroot] [PATCH 3/3] package/pkg-cmake.mk: build host with shared libs Michael Nosthoff
2 siblings, 0 replies; 5+ messages in thread
From: Michael Nosthoff @ 2020-09-16 10:02 UTC (permalink / raw
To: buildroot
similar to the llvm package disable shared libs for host build.
Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
---
package/clang/clang.mk | 1 +
package/lld/lld.mk | 3 +++
2 files changed, 4 insertions(+)
diff --git a/package/clang/clang.mk b/package/clang/clang.mk
index d740af5322..ceb7de9afa 100644
--- a/package/clang/clang.mk
+++ b/package/clang/clang.mk
@@ -33,6 +33,7 @@ CLANG_CONF_OPTS += -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON
# By setting BUILD_SHARED_LIBS to OFF, we generate multiple static
# libraries (the same way as host's clang build) and finally
# libclang.so to be installed on the target.
+HOST_CLANG_CONF_OPTS += -DBUILD_SHARED_LIBS=OFF
CLANG_CONF_OPTS += -DBUILD_SHARED_LIBS=OFF
# Default is Debug build, which requires considerably more disk space
diff --git a/package/lld/lld.mk b/package/lld/lld.mk
index ea09c5d340..cd1a03c1d3 100644
--- a/package/lld/lld.mk
+++ b/package/lld/lld.mk
@@ -19,6 +19,9 @@ HOST_LLD_DEPENDENCIES = host-llvm
# https://reviews.llvm.org/D57264
HOST_LLD_CONF_OPTS += -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON
+# build as static libs as is done in llvm & clang
+HOST_LLD_CONF_OPTS += -DBUILD_SHARED_LIBS=OFF
+
# GCC looks for tools in a different path from LLD's default installation path
define HOST_LLD_CREATE_SYMLINKS
mkdir -p $(HOST_DIR)/$(GNU_TARGET_NAME)/bin
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 3/3] package/pkg-cmake.mk: build host with shared libs
2020-09-16 10:02 [Buildroot] [PATCH 0/3] package/pkg-cmake.mk: host: build shared as default Michael Nosthoff
2020-09-16 10:02 ` [Buildroot] [PATCH 1/3] package/doxygen: disable shared libs for host Michael Nosthoff
2020-09-16 10:02 ` [Buildroot] [PATCH 2/3] package/{clang, lld}: host: disable shared_libs Michael Nosthoff
@ 2020-09-16 10:02 ` Michael Nosthoff
2 siblings, 0 replies; 5+ messages in thread
From: Michael Nosthoff @ 2020-09-16 10:02 UTC (permalink / raw
To: buildroot
CMake offers the BUILD_SHARED_LIBS flag as a default parameter
and most packages honor them.
Similar to pkg-autotools.mk build host packages always with
BUILD_SHARED_LIBS=ON.
Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
---
package/pkg-cmake.mk | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
index 57bfea9be5..dc545caed9 100644
--- a/package/pkg-cmake.mk
+++ b/package/pkg-cmake.mk
@@ -146,6 +146,7 @@ define $(2)_CONFIGURE_CMDS
-DBUILD_TEST=OFF \
-DBUILD_TESTS=OFF \
-DBUILD_TESTING=OFF \
+ -DBUILD_SHARED_LIBS=ON \
$$(CMAKE_QUIET) \
$$($$(PKG)_CONF_OPTS) \
)
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/3] package/doxygen: disable shared libs for host
2020-09-16 10:02 ` [Buildroot] [PATCH 1/3] package/doxygen: disable shared libs for host Michael Nosthoff
@ 2020-09-17 20:33 ` Thomas Petazzoni
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2020-09-17 20:33 UTC (permalink / raw
To: buildroot
On Wed, 16 Sep 2020 12:02:09 +0200
Michael Nosthoff via buildroot <buildroot@busybox.net> wrote:
> doxygen fails to build with BUILD_SHARED_LIBS=ON as it only
> for some targets honors this flag and links the rest static.
> So enforce BUILD_SHARED_LIBS=OFF for this package.
>
> Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
> ---
> package/doxygen/doxygen.mk | 2 ++
> 1 file changed, 2 insertions(+)
Thanks, series applied!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-09-17 20:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-16 10:02 [Buildroot] [PATCH 0/3] package/pkg-cmake.mk: host: build shared as default Michael Nosthoff
2020-09-16 10:02 ` [Buildroot] [PATCH 1/3] package/doxygen: disable shared libs for host Michael Nosthoff
2020-09-17 20:33 ` Thomas Petazzoni
2020-09-16 10:02 ` [Buildroot] [PATCH 2/3] package/{clang, lld}: host: disable shared_libs Michael Nosthoff
2020-09-16 10:02 ` [Buildroot] [PATCH 3/3] package/pkg-cmake.mk: build host with shared libs Michael Nosthoff
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.