Option for debug support in DirectFB package
Hi,
DirectFB provides two configure options for debug:
* --enable-debug (default is no)
* --enable-debug-support (default is yes)
The first one enables verbose mode in DirectFB, while the second one only provide the functions to print debug information, that might be used by an external DirectFB driver.
When these options are both disabled, the installation path is suffixed with -pure (i.e. /usr/lib/directfb-x.y.z-pure instead of /usr/lib/directfb-x.y.z).
Buildroot only gives the possibility to enable/disable the first one (with BR2_PACKAGE_DIRECTFB_DEBUG).
Some external DirectFB driver, when compiled in release mode, would expect debug support to be disabled, and would install in the -pure suffixed directory.
Therefore it would be helpful:
- either to have another option for debug support (and debug option would depend on debug support option, in Config.in)
- or to disable debug support when debug is disabled: the two options would always be forced to have the same value.
I believe the first solution is better, but let me know what you think... I can provide the patch if you agree with the suggestion.
That would also prevent DirectFB to compile some useless features in release mode.
Signature · 1 line
C?dric
Dear C?dric Marie,
Quoted 24 lines · C?dric Marie
DirectFB provides two configure options for debug:
* --enable-debug (default is no)
* --enable-debug-support (default is yes)
The first one enables verbose mode in DirectFB, while the second one only provide the functions to print debug information, that might be used by an external DirectFB driver.When these options are both disabled, the installation path is suffixed with -pure (i.e.
/usr/lib/directfb-x.y.z-pureinstead of/usr/lib/directfb-x.y.z).Buildroot only gives the possibility to enable/disable the first one (with
BR2_PACKAGE_DIRECTFB_DEBUG).Some external DirectFB driver, when compiled in release mode, would expect debug support to be disabled, and would install in the -pure suffixed directory.
Therefore it would be helpful:
- either to have another option for debug support (and debug option would depend on debug support option, in Config.in)
- or to disable debug support when debug is disabled: the two options would always be forced to have the same value.
Quoted 5 lines
I believe the first solution is better, but let me know what you think... I can provide the patch if you agree with the suggestion.
That would also prevent DirectFB to compile some useless features in release mode.
I am not sure I've made up my mind yet specifically about your question, but two informations:
* BR2_PACKAGE_DIRECTFB_DEBUG will most likely be removed, as part of a patch series I have to bump the entire DirectFB stack. See:
http://git.free-electrons.com/users/thomas-petazzoni/buildroot/log/?h=directfb-bump
* --enable-debug / --disable-debug used to be passed to all autotools packages, depending on the state of the BR2_ENABLE_DEBUG option. This is no longer the case since commit
http://git.buildroot.net/buildroot/commit/?id=0552a367dbdc27a211daaac3359d81dd537e384f.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
[Thomas Petazzoni]
Quoted 6 lines
I am not sure I've made up my mind yet specifically about your question, but two informations:
*
BR2_PACKAGE_DIRECTFB_DEBUGwill most likely be removed, as part of a patch series I have to bump the entire DirectFB stack. See:
Quoted 7 lines
http://git.free-electrons.com/users/thomas-petazzoni/buildroot/log/?h=directfb-bump
* --enable-debug / --disable-debug used to be passed to all autotools packages, depending on the state of the
BR2_ENABLE_DEBUGoption. This is no longer the case since commithttp://git.buildroot.net/buildroot/commit/?id=0552a367dbdc27a211daaac3359d81dd537e384f.
It sounds like a very good idea to avoid mixing two "features" in BR2_ENABLE_DEBUG.
We may need debugging symbols without wanting to add any overload in binaries.
But then, since it is already commited, is your removal of DirectFB specific debug option still relevant?
Or should we create another global option to enable debug (i.e. traces) in autotools packages (and similar things in other types of packages when possible)?
This is just a question, I have no personal need for this debug option...
[Arnout Vandecappelle]
Quoted 4 lines
That indeed sounds like a good solution. As mentioned by Thomas, the
BR2_PACKAGE_DIRECTFB_DEBUGoption will go away, so I'd suggest an optionBR2_PACKAGE_DIRECTFB_DEBUG_SUPPORTthat defaults to y.
It might sound strange to have an option for debug support (i.e. compile the functions to print debug info) and no option for debug (i.e. use these functions in DFB core).
Yet it seems to be the better idea, and the only way to force to compile with no debug feature at all and to install in -pure directory. Waiting for Thomas feedback...
Thank you.
Signature · 1 line
C?dric
Dear C?dric Marie,
Quoted 2 lines · C?dric Marie
But then, since it is already commited, is your removal of DirectFB specific debug option still relevant?
Well, maybe no.
Quoted 5 lines
Or should we create another global option to enable debug (i.e. traces) in autotools packages (and similar things in other types of packages when possible)?
This is just a question, I have no personal need for this debug option...
A global option is a bit problematic, because we have discovered that --enable-debug is clearly not used for the same thing in all packages. Some packages add -Werror, some add some other funky stuff, some simply enable debugging symbols. --enable-debug is not a standard, formalized option with a well-defined meaning. So I don't think a global option that applies to all autotools packages make sense here.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Le 2015-06-09 10:15, Thomas Petazzoni a ?crit?:
Quoted 6 lines
A global option is a bit problematic, because we have discovered that --enable-debug is clearly not used for the same thing in all packages. Some packages add -Werror, some add some other funky stuff, some simply enable debugging symbols. --enable-debug is not a standard, formalized option with a well-defined meaning. So I don't think a global option that applies to all autotools packages make sense here.
OK, I understand.
So I will provide the patch with BR2_PACKAGE_DIRECTFB_DEBUG_SUPPORT as suggested by Arnout.
Since BR2_PACKAGE_DIRECTFB_DEBUG is still present, I will make it depend on BR2_PACKAGE_DIRECTFB_DEBUG_SUPPORT (default yes). (--disable-debug-support is ignored if --enable-debug is set.) Of course it is still possible to remove BR2_PACKAGE_DIRECTFB_DEBUG later...
Signature · 1 line
C?dric
Quoted 20 lines · C?dric Marie
Hi,
DirectFB provides two configure options for debug:
* --enable-debug (default is no)
* --enable-debug-support (default is yes)
The first one enables verbose mode in DirectFB, while the second one only provide the functions to print debug information, that might be used by an external DirectFB driver.When these options are both disabled, the installation path is suffixed with -pure (i.e.
/usr/lib/directfb-x.y.z-pureinstead of/usr/lib/directfb-x.y.z).Buildroot only gives the possibility to enable/disable the first one (with
BR2_PACKAGE_DIRECTFB_DEBUG).Some external DirectFB driver, when compiled in release mode, would expect debug support to be disabled, and would install in the -pure suffixed directory.
Quoted 8 lines
Therefore it would be helpful:
- either to have another option for debug support (and debug option would depend on debug support option, in Config.in)
- or to disable debug support when debug is disabled: the two options would always be forced to have the same value.I believe the first solution is better, but let me know what you think... I can provide the patch if you agree with the suggestion.
That indeed sounds like a good solution. As mentioned by Thomas, theBR2_PACKAGE_DIRECTFB_DEBUG option will go away, so I'd suggest an option BR2_PACKAGE_DIRECTFB_DEBUG_SUPPORT that defaults to y.
Regards,
Arnout
Quoted 4 lines
That would also prevent DirectFB to compile some useless features in release mode.
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F