Hi, On Sun, Nov 29, 2009 at 03:59:37PM +0100, Julien Cristau wrote: > On Sun, Nov 29, 2009 at 15:32:00 +0100, Sebastian Harl wrote: > > collectd uses net-snmp-config(1)'s --cflags option to determine the > > flags used to build the snmp plugin. net-snmp-config(1) is a shell > > script included in the Arch: all package libsnmp-base. That script is > > created at net-snmp build time and includes the CFLAGS that are used to > > build net-snmp itself (and which are then returned by 'net-snmp-config > > --cflags'). Now, net-snmp's CFLAGS include the output of 'perl > > -MExtUtils::Embed -e ccopts' (which is required for the embedded perl > > stuff), which, in turn, includes '-fstack-protector' on *some* > > architectures (presumably, on those that support that flag). > > > I'm pretty sure exporting random cflags used to build net-snmp to other > packages is wrong.
Right. However, those CFLAGS are not entirely random. The perl CFLAGS are required when using libnetsnmpagent according to #502806. I don't think it's reasonable to "filter" (e.g. remove -fstack-protector) those flags before adding them to the net-snmp CFLAGS. However, it would be nice to let net-snmp-config return different flags for e.g. libnetsnmp and libnetsnmpagent (see my follow-up to #502806). Also, it could be argued that perl should not include flags like -fstack-protector in the output of ccopts. I don't have a strong opinion on that, though. Cheers, Sebastian -- Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/ Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin
signature.asc
Description: Digital signature