Opened 2 years ago

Closed 2 years ago

Last modified 2 years 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 -- EOL
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, 2 years 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, 2 years 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.