Message ID | 20210806125047.1832422-1-tomi.valkeinen@ideasonboard.com |
---|---|
State | Accepted |
Headers | show |
Series | [1/2] package/kmsxx: remove erroneous use of static-libc option | expand |
Tomi, All, On 2021-08-06 15:50 +0300, Tomi Valkeinen spake thusly: > For some reason the build file sets -Dstatic-libc=true option when > BR2_STATIC_LIBS is set. This is not correct, or at least I cannot figure > out the reason for this, so remove it. Well, the reasonning was probably that: "if BR2_STATIC_LIBS is set, then we want to do a fully-static build, so let's use that option that looks like its name means exactly that." But static-libc is not about the C library; it is about statically linking against libgcc and libstdc++. Which should not happen, because we are doing a full static build. The issue that I can see, however, is that for pre-built toolchins, we bulk-install their sysroot, and so we end up with our staging that may contain shared libraries, and thus this be have been an attempt at forcing the use of the static libgcc and libstdc++. But in Buildroot, we force the use of -static in CFLAGS, CXXFLAGS, and LDFLAGS (and any similar mechanism in all packages infras), and this should be enough to link everything statically. In the end, that does not seem to be necessary at all, indeed. I just did a static-only build, and the sizes of the utils or the libs are strictly identical with or without that option. So, I've applied this patch to next, after expanding the commit log with a summary of the above. Regards, Yann E. MORIN. > Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> > --- > > Re-sending, as first attempt was rejected as I was not subscribed to the > list. > > package/kmsxx/kmsxx.mk | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/package/kmsxx/kmsxx.mk b/package/kmsxx/kmsxx.mk > index fd40ff8e73..871ecaf85c 100644 > --- a/package/kmsxx/kmsxx.mk > +++ b/package/kmsxx/kmsxx.mk > @@ -17,12 +17,6 @@ KMSXX_CONF_OPTS = \ > -Duse-system-fmt=true \ > -Duse-system-pybind11=true > > -ifeq ($(BR2_STATIC_LIBS),y) > -KMSXX_CONF_OPTS += -Dstatic-libc=true > -else > -KMSXX_CONF_OPTS += -Dstatic-libc=false > -endif > - > ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y) > KMSXX_CXXFLAGS += $(TARGET_CXXFLAGS) -O0 > endif > -- > 2.25.1 > > _______________________________________________ > buildroot mailing list > buildroot@busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot
diff --git a/package/kmsxx/kmsxx.mk b/package/kmsxx/kmsxx.mk index fd40ff8e73..871ecaf85c 100644 --- a/package/kmsxx/kmsxx.mk +++ b/package/kmsxx/kmsxx.mk @@ -17,12 +17,6 @@ KMSXX_CONF_OPTS = \ -Duse-system-fmt=true \ -Duse-system-pybind11=true -ifeq ($(BR2_STATIC_LIBS),y) -KMSXX_CONF_OPTS += -Dstatic-libc=true -else -KMSXX_CONF_OPTS += -Dstatic-libc=false -endif - ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y) KMSXX_CXXFLAGS += $(TARGET_CXXFLAGS) -O0 endif
For some reason the build file sets -Dstatic-libc=true option when BR2_STATIC_LIBS is set. This is not correct, or at least I cannot figure out the reason for this, so remove it. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> --- Re-sending, as first attempt was rejected as I was not subscribed to the list. package/kmsxx/kmsxx.mk | 6 ------ 1 file changed, 6 deletions(-)