When linking, $(LDFLAGS) should always be used. This allows for the user or the package management system to add additional linker flags.
As an example, we are building pwauth with Poky from the Yocto Project. Poky specifies -Wl,--hash-style=gnu in LDFLAGS and then proceeds to verify that everything that is built actually uses the GNU hash. This causes an error for pwauth since it currently does not use $(LDFLAGS) when linking:
ERROR: QA Issue: No GNU_HASH in the elf binary: 'tmp/work/cortexa9-vfp-neon-poky-linux-gnueabi/pwauth/2.3.11-r0/packages-split/pwauth/usr/sbin/pwauth'
Please find attached a patch that corrects the Makefile.
Status: New
Labels:
Type-Defect
Priority-Medium