[OpenSIPS-Users] debian packaging and compiler options

Bogdan-Andrei Iancu bogdan at voice-system.ro
Tue Jul 13 09:13:14 CEST 2010


Hi Kennard,

I personally use the the defaults from debian/rules .  If you want to 
take full advantage of all special flags that are pushed by Makefile, 
you can try to prevent the debian/rules to set a the flags by removing 
the lines:

CFLAGS = -Wall -g

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0
else
    CFLAGS += -O2
endif


By doing this, the CFLAGS env var will be empty and the Makefile will 
set the flags by itself.

Regards,
Bogdan

Kennard_White at logitech.com wrote:
>
> Folks,
>
> I have a question about how folks compile opensips with debian 
> packaging. The basic question is which are the "correct" CFLAGS values?
>
> When doing a debian build (opensips Makefile deb target), the 
> debian/rules sets CFLAGS to "-Wall -g -O2".
>
> The opensips Makefile.defs around line 725 has much more extensive 
> CFLAGS values for my architecture (x86_64,gcc,4.x). These more 
> extensive values include:
> -O9 -funroll-loops -Wcast-align $(PROFILE) -Wall \
> -minline-all-stringops \
> -falign-loops -ftree-vectorize -mtune=$(CPU_TYPE) \
> -Wold-style-definition -Wmissing-field-initializers -Wredundant-decls
> The above defs don't get set when I build a debian package.
>
> The "problem" is on Makefile.defs line 630-633 which allows external 
> CFLAGS to override. Alternatively, the problem is in debian/rules 
> which goes to great lengths to setup CFLAGS.
>
> For those who compile their own debian packages (from trunk), which 
> CFLAGS options do you use? Do you accept the "lesser" debian/rules 
> setting, or somehow enable the "greater" settings in Makefile.defs? If 
> the later, how to do you enable this?
>
> Thanks,
> Kennard
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   


-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
20 - 24 September 2010, Frankfurt, Germany
www.voice-system.ro




More information about the Users mailing list