[Bug 223391] /Mk/bsd.port.mk should add SSP_LDFLAGS?=

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Nov 3 03:06:06 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223391

            Bug ID: 223391
           Summary: /Mk/bsd.port.mk should add SSP_LDFLAGS?=
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Ports Framework
          Assignee: portmgr at FreeBSD.org
          Reporter: dewayne at heuristicsystems.com.au
                CC: freebsd-ports-bugs at FreeBSD.org

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

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the freebsd-ports-bugs mailing list