Re: CFLAGS / debug
On Wed, Dec 10, 2008 at 1:25 PM, Michael Banck <mbanck@debian.org> wrote:
> On Wed, Dec 10, 2008 at 09:31:01AM +0100, Mathieu Malaterre wrote:
>> On Tue, Dec 9, 2008 at 8:58 PM, David Paleino <d.paleino@gmail.com> wrote:
>> > On Tue, 9 Dec 2008 16:34:07 +0100, Mathieu Malaterre wrote:
>> >> Do you think this is a valid change to apply to gdcm debian package:
>> > No:
>> >
>> >> $ svn di
>> >> Index: rules
>> >> ===================================================================
>> >> --- rules (revision 4863)
>> >> +++ rules (working copy)
>> >> @@ -21,7 +21,10 @@
>> >> DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
>> >> DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
>> >>
>> >> -CFLAGS = -g
>> >> +ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
>
> Please see the Debian Policy manual, section 4.9.1 on the correct set of
> default CFLAGS and handling of DEB_BUILD_OPTIONS (debug is not one of
> the currently used DEB_BUILD_OPTIONS).
>
>> Where is it documented that strip (removing of symbols via strip)
>> should be binded to the -g of gcc ? You should be able to strip a
>> release build (gcc -03 ... ), right ?
>
> It's not related indeed.
Thanks for the link ! Because gdcm is mostly a c++ project it would
make sense to repeat the value of CFLAGS to CXXFLAGS (this is an env
var inspected by cmake at conf. time).
So this time again, does it makes sense to add:
Index: rules
===================================================================
--- rules (revision 2756)
+++ rules (working copy)
@@ -29,6 +29,10 @@
endif
export CFLAGS
+# Repeat for C++ compilation flags
+CXXFLAGS = $(CFLAGS)
+export CXXFLAGS
+
# set the number of build jobs
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
JOBS := -j$(patsubst parallel=%,%,$(filter
parallel=%,$(DEB_BUILD_OPTIONS)))
--
Mathieu
Reply to: