[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Re: Initial implementation of _FORTIFY_SOURCE
From:       Alexander Leidinger <Alexander () Leidinger ! net>
Date:       2024-05-15 12:39:44
Message-ID: fc68c3ee9085d4b0c81ae1b40ca96220 () Leidinger ! net
[Download RAW message or body]


Am 2024-05-15 01:15, schrieb Kyle Evans:

> I've confirmed that this patch fixes libfido2, will commit shortly.

I can confirm too.

If I want to test this on more ports, I have to add -D_FORTIFY_SOURCE=2 
to the CFLAGS / CSSFLAGS? Or rather do this:
---snip---
diff --git a/Mk/Features/ssp.mk b/Mk/Features/ssp.mk
index 4213e6d668a..545e74bfa05 100644
--- a/Mk/Features/ssp.mk
+++ b/Mk/Features/ssp.mk
@@ -7,8 +7,10 @@ SSP_Include_MAINTAINER=        portmgr@FreeBSD.org
  .  if !defined(SSP_UNSAFE) && \
      (! ${ARCH:Mmips*})
  # Overridable as a user may want to use -fstack-protector-all
-SSP_CFLAGS?=   -fstack-protector-strong
+SSP_CFLAGS?=   -fstack-protector-strong -D_FORTIFY_SOURCE=2
+SSP_LDFLAGS?=  -fstack-protector-strong
  CFLAGS+=       ${SSP_CFLAGS}
-LDFLAGS+=      ${SSP_CFLAGS}
+CXXFLAGS+=     ${SSP_CFLAGS}
+LDFLAGS+=      ${SSP_LDFLAGS}
  .  endif
  .endif
---snip---

Bye,
Alexander.

-- 
http://www.Leidinger.net Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF
http://www.FreeBSD.org    netchild@FreeBSD.org  : PGP 0x8F31830F9F2772BF

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic