Bug 223391 - Mk/bsd.ssp.mk should add SSP_LDFLAGS?=
Summary: Mk/bsd.ssp.mk should add SSP_LDFLAGS?=
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-03 03:06 UTC by dewayne
Modified: 2019-09-06 08:51 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dewayne 2017-11-03 03:06:06 UTC
Unfortunately for internet facing applications we use -fstack-protector-strong, so I modified my bsd.port.mk to accommodate.  Perhaps you would consider the same.

My change is basically, add one line & change one line:

--- /usr/ports/Mk/bsd.ssp.mk    (revision 453385)
+++ /usr/ports/Mk/bsd.ssp.mk    (working copy)
@@ -7,8 +7,9 @@
     (${ARCH} == i386 || ${ARCH} == amd64)
 # Overridable as a user may want to use -fstack-protector-all
 SSP_CFLAGS?=   -fstack-protector
+SSP_LDFLAGS?=  -fstack-protector
 CFLAGS+=       ${SSP_CFLAGS}
-LDFLAGS+=      -fstack-protector
+LDFLAGS+=      ${SSP_LDFLAGS}
 # -lssp_nonshared is needed on i386 where /usr/lib/libc.so is not an ldscript
 # This is currently unused XXX
 .      if defined(SSP_NEED_NONSHARED)

And air gap machines
SSP_CFLAGS= -fno-stack-protector
SSP_LDFLAGS= -fno-stack-protector
Comment 1 dewayne 2017-11-03 03:09:13 UTC
(In reply to dewayne from comment #0)
Apologies I was working on a few different things as I wrote the original PR, I modified bsd.ssp.mk not bsd.port.mk for the additional SSP_LDFLAGS statement.
Comment 2 Baptiste Daroussin freebsd_committer 2019-09-06 08:51:20 UTC
see https://svnweb.freebsd.org/ports?view=revision&revision=499897