Opened 8 months ago

Closed 8 months ago

Last modified 8 months ago

#5016 closed defect (fixed)

loader/Makefile.in does not respect LDFLAGS

Reported by: gdt Owned by: pramsey
Priority: medium Milestone: PostGIS 3.1.5
Component: postgis Version: 2.5.x
Keywords: Cc:

Description

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.

Change History (2)

comment:1 by robe, 8 months ago

Resolution: fixed
Status: newclosed

@gdt, I committed your patch to both master [2476f2978bef/git] and 3.1.5 [4f0242dc99/git]. If it doesn't fix your issues, I can reopen.

comment:2 by gdt, 8 months ago

Thanks. I had already applied in to the packaging control files, so we should be good on this.

Note: See TracTickets for help on using tickets.