Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/Makefile.in: Do not add --enable-debug flag.
@ 2015-03-11 17:03 Johan Oudinet
  2015-03-11 20:42 ` Thomas Petazzoni
  0 siblings, 1 reply; 3+ messages in thread
From: Johan Oudinet @ 2015-03-11 17:03 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com>
---
 package/Makefile.in | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/package/Makefile.in b/package/Makefile.in
index 803b162..2995222 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -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
 
-- 
2.1.0

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

* [Buildroot] [PATCH 1/1] package/Makefile.in: Do not add --enable-debug flag.
  2015-03-11 17:03 [Buildroot] [PATCH 1/1] package/Makefile.in: Do not add --enable-debug flag Johan Oudinet
@ 2015-03-11 20:42 ` Thomas Petazzoni
  2015-03-12 13:01   ` Johan Oudinet
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2015-03-11 20:42 UTC (permalink / raw)
  To: buildroot

Dear Johan Oudinet,

On Wed, 11 Mar 2015 18:03:21 +0100, Johan Oudinet wrote:
> 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.
> 
> Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com>

I am personally in favor of this change, so thanks for bringing it up.

> -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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH 1/1] package/Makefile.in: Do not add --enable-debug flag.
  2015-03-11 20:42 ` Thomas Petazzoni
@ 2015-03-12 13:01   ` Johan Oudinet
  0 siblings, 0 replies; 3+ messages in thread
From: Johan Oudinet @ 2015-03-12 13:01 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On Wed, Mar 11, 2015 at 9:42 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
>> -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?

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.

>
> 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.

-- 
Johan Oudinet

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

end of thread, other threads:[~2015-03-12 13:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-11 17:03 [Buildroot] [PATCH 1/1] package/Makefile.in: Do not add --enable-debug flag Johan Oudinet
2015-03-11 20:42 ` Thomas Petazzoni
2015-03-12 13:01   ` Johan Oudinet

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