On Sat, 15 Feb 2014 22:33:15 +0000, Daniel Lintott wrote:
> > replace "dh $@" with "dh $@ --buildsystem=perl_makemaker" then dh
> > will use Makefile.PL etc. and everything looks good
> The only snag is still going to be the missing LDFLAGS (relro in
> particular) for Socket6.so
Hm, I'm not sure about that.
Neither lintian nor blhc complained when I tried this approach.
(And usually debhelper with compat level 9 just passes all required
flags, and they are used unless the upstream build system messes with
%Config in some crazy way).
How/where did you see the problem?
When I build it again (with --buildsystem and without the override) I
get:
dh_auto_build -O--buildsystem=perl_makemaker
make[1]: Entering directory `/tmp/buildd/libsocket6-perl-0.25'
cp Socket6.pm blib/lib/Socket6.pm
/usr/bin/perl /usr/share/perl/5.18/ExtUtils/xsubpp -noprototypes -typemap /usr/share/perl/5.18/ExtUtils/typemap Socket6.xs > Socket6.xsc && mv Socket6.xsc Socket6.c
cc -c -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -DVERSION=\"0.25\" -DXS_VERSION=\"0.25\" -fPIC "-I/usr/lib/perl/5.18/CORE" Socket6.c
Socket6.xs: In function 'XS_Socket6_getipnodebyname':
Socket6.xs:975:82: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
ST(0) = (SV *) not_here("getipnodebyname");
^
Socket6.xs: In function 'XS_Socket6_getipnodebyaddr':
Socket6.xs:1046:82: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
ST(0) = (SV *) not_here("getipnodebyaddr");
^
Running Mkbootstrap for Socket6 ()
chmod 644 Socket6.bs
rm -f blib/arch/auto/Socket6/Socket6.so
cc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wl,-z,relro -shared -L/usr/local/lib -fstack-protector Socket6.o -o blib/arch/auto/Socket6/Socket6.so \
\
chmod 755 blib/arch/auto/Socket6/Socket6.so
cp Socket6.bs blib/arch/auto/Socket6/Socket6.bs
chmod 644 blib/arch/auto/Socket6/Socket6.bs
Manifying blib/man3/Socket6.3pm
make[1]: Leaving directory `/tmp/buildd/libsocket6-perl-0.25'
which looks quite ok to me :)
-fstack-protector is there, and also -Wl,-z,relro.
> Would it be preferable to patch the config.pl.in and add all the
> LDDLFLAGS there as opposed to in the rules file?
If it's necessary that's an option. A bit more idiomatic would be an
override that just adds missing stuff, like (untested)
override_dh_auto_configure:
dh_auto_configure -- LDDLFLAGS="..."
Cheers,
gregor, who might well be missing something ...
--
.''`. Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
: :' : Debian GNU/Linux user, admin, and developer - http://www.debian.org/
`. `' Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
`- NP: Dire Straits: Calling Elvis
Attachment:
signature.asc
Description: Digital signature