On 1/6/26 8:53 AM, Wes Hardaker wrote:
Bart Van Assche via Net-snmp-coders
<[email protected]> writes:

How about realizing this with the patch below?

I like it in general, but:

+           -fsanitize*)
+               echo -n "$cflag ";;

Why is that given special exception?  IMHO, it is a developer specific
thing and people using our needed flags should make their own compiling
choices for all -f or -W like options.

-fsanitize is special. It is the only -f flag I know of that causes
additional libraries to be linked. If -fsanitize is treated in the same
way as other -f flags (filtered out) then ld complains about undefined
references:

$ ./configure 'CFLAGS=-fsanitize=address -fsanitize=pointer-compare -fsanitize=pointer-subtract -fsanitize=leak -fsanitize=undefined' 'LDFLAGS= -fsanitize=address -fsanitize=pointer-compare -fsanitize=pointer-subtract -fsanitize=leak -fsanitize=undefined'
$ make
[ ... ]
$ ci/net-snmp-run-tests
[ ... ]
mkdir testing/fulltests/snmpv3
/usr/bin/ld: /usr/local/google/home/bvanassche/software/net-snmp/snmplib/.libs/libnetsnmp.so: undefined reference to `__asan_report_store4' /usr/bin/ld: /usr/local/google/home/bvanassche/software/net-snmp/snmplib/.libs/libnetsnmp.so: undefined reference to `__asan_stack_free_7'
[ ... ]

Thanks,

Bart.


_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to