Attached patch removes propagating $NSC_LDFLAGS in net-snmp-config when this script is called with --libs, --netsnmp-libs, --external-libs, --agent-libs and --external-agent-libs
I fail to see how this won't break existing builds that use that script for compiling. The whole point of that script is to make it easy for people to link in all the needed libraries based on the build, especially when compiling agent modules. In other words, those libraries are in there intentionally.
If you need a different argument with less libraries that isn't there now, I'd be happy to consider adding a new option instead!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It does not break anything straight.
Simple for example if some SNMP client program will be using --libs output such binary will be linked with all librares whic libs SNMP client library.
By thi for example dependecies generators which will checking "objdump -x <snmp_client_dso> | grep NEEDED" will have all libraries on such list.
Of course it is possible to use in such case -Wl,--as-needed linker option but it will be nothing more like only trying to fix what net-nmp-configs --libs gives wringli.</snmp_client_dso>
If SNMP client program needs use libnetsnmp functions all what it needs is -lnetsnmp in linker options.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I fail to see how this won't break existing builds that use that script for compiling. The whole point of that script is to make it easy for people to link in all the needed libraries based on the build, especially when compiling agent modules. In other words, those libraries are in there intentionally.
If you need a different argument with less libraries that isn't there now, I'd be happy to consider adding a new option instead!
It does not break anything straight.
Simple for example if some SNMP client program will be using --libs output such binary will be linked with all librares whic libs SNMP client library.
By thi for example dependecies generators which will checking "objdump -x <snmp_client_dso> | grep NEEDED" will have all libraries on such list.
Of course it is possible to use in such case -Wl,--as-needed linker option but it will be nothing more like only trying to fix what net-nmp-configs --libs gives wringli.</snmp_client_dso>
If SNMP client program needs use libnetsnmp functions all what it needs is -lnetsnmp in linker options.
Wouldn't it just be better to use
net-snmp-config --netsnmp-libsin your example?