package/Makefile.in: Do not add --enable-debug flag.
PATCH 1/1 package/Makefile.in: Do not add --enable-debug flag.
Adding this flag when BR2_ENABLE_DEBUG is activated make several packages to produce binaries that do not work as expected (e.g., dhcp, lame, nano). Moreover, the help message of BR2_ENABLE_DEBUG does not say it is adding this flag. It is supposed to build packages with debugging symbols enabled. So, let it do that only.
--- package/Makefile.in | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
package/Makefile.in +1 -3
@@ -387,9 +387,7 @@ ifneq ($(BR2_INSTALL_LIBSTDCPP),y) TARGET_CONFIGURE_OPTS += CXX=false endif -ifeq ($(BR2_ENABLE_DEBUG),y) -ENABLE_DEBUG := --enable-debug -else +ifneq ($(BR2_ENABLE_DEBUG),y) ENABLE_DEBUG := --disable-debug endif
Signature · 1 line
2.1.0
PATCH 1/1 package/Makefile.in: Do not add --enable-debug flag.
Dear Johan Oudinet,
Quoted 7 lines · Johan Oudinet
Adding this flag when
BR2_ENABLE_DEBUGis activated make several packages to produce binaries that do not work as expected (e.g., dhcp, lame, nano). Moreover, the help message ofBR2_ENABLE_DEBUGdoes not say it is adding this flag. It is supposed to build packages with debugging symbols enabled. So, let it do that only.Signed-off-by Johan Oudinet <[email protected]>
I am personally in favor of this change, so thanks for bringing it up.
package/Makefile.in ifneq ($(BR2_INSTALL_LIBSTDCPP),y) · line 392
Quoted 6 lines
package/Makefile.in +1
-3-ifeq ($(BR2_ENABLE_DEBUG),y) -ENABLE_DEBUG := --enable-debug -else +ifneq ($(BR2_ENABLE_DEBUG),y) ENABLE_DEBUG := --disable-debug endif
So if we have BR2_ENABLE_DEBUG enabled, then we don't pass --disable-debug. And when BR2_ENABLE_DEBUG is disabled, we're passing it. I'm not sure to understand the logic here.
Shouldn't we simply unconditionally pass --disable-debug, or not pass anything at all?
Also, a number of packages had workarounds in their specific .mk file to avoid --enable-debug. It would be good to get rid of such workarounds as well.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 package/Makefile.in: Do not add --enable-debug flag.
Thomas, All,
Quoted 11 lines · Thomas Petazzoni
package/Makefile.in ifneq ($(BR2_INSTALL_LIBSTDCPP),y) · line 392
Quoted 6 lines
package/Makefile.in +1
-3-ifeq ($(BR2_ENABLE_DEBUG),y) -ENABLE_DEBUG := --enable-debug -else +ifneq ($(BR2_ENABLE_DEBUG),y) ENABLE_DEBUG := --disable-debug endifSo if we have
BR2_ENABLE_DEBUGenabled, then we don't pass --disable-debug. And whenBR2_ENABLE_DEBUGis disabled, we're passing it. I'm not sure to understand the logic here.
Quoted 2 lines
Shouldn't we simply unconditionally pass --disable-debug, or not pass anything at all?
I felt bad in passing --disable-debug when BR2_ENABLE_DEBUG is set, and I didn't want to remove it otherwise (in case a package expects it). Still, the result is not logic. Actually, there is no good reason for a package to depends on a --disable-debug flag to produce a version without debugging information (see for example
http://stackoverflow.com/a/4680578/1448926)
I'm going to remove --disable-debug too.
Quoted 4 lines
Also, a number of packages had workarounds in their specific .mk file to avoid --enable-debug. It would be good to get rid of such workarounds as well.
Indeed, I'm going to get rid of such workarounds and send another version for this patch.
Thanks for the quick review.
Signature · 1 line
Johan Oudinet