loader/Makefile.in does not respect LDFLAGS
|Reported by:||gdt||Owned by:||pramsey|
|Component:||postgis||Version:||2.5.x -- EOL|
While building 3.1.4 under pkgsrc, I got an error that RELRO was missing from shp2pgsql and pgsql2shp. Reading the build system, this appears to be because @LDFLAGS@ is not carried to the link line. There is $(LDFLAGS) on the link invocation, and many other LDFLAGS_FOO are set, but nowhere is LDFLAGS=@LDFLAG.
I added simply "LDFLAGS = @LDFLAGS@" (as a new stanza after the one that sets LIBTOOL), and this causes the RELRO LDFLAGS passed in from pkgsrc to make it to the link lines.
I'm leaving this as medium because this will cause postgis to fail to build in all packaging systems that apply hardening measures via LDFLAGS (which is common) and then check that they have taken effect, and silently fail to have the hardening measures in ones that don't check.