Bug 203751 - lang/gcc : backport fstack-protector-strong (from lang/gcc48)
Summary: lang/gcc : backport fstack-protector-strong (from lang/gcc48)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Gerald Pfeifer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-13 21:07 UTC by Antoine Brodin
Modified: 2015-11-09 08:33 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (gerald)


Attachments
patch (13.10 KB, patch)
2015-10-13 21:08 UTC, Antoine Brodin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Brodin freebsd_committer freebsd_triage 2015-10-13 21:07:45 UTC
In FreeBSD head, fstack-protector-strong is now default.

The exp-run was done with fstack-protector-all, so the fact that lang/gcc didn't know about fstack-protector-strong was missed.

This breaks a few ports that have USE_GCC=yes and use bsd.*.mk

The attached patch backports fstack-protector-strong from lang/gcc48 to lang/gcc
Comment 1 Antoine Brodin freebsd_committer freebsd_triage 2015-10-13 21:08:27 UTC
Created attachment 161999 [details]
patch
Comment 2 Pedro F. Giffuni freebsd_committer freebsd_triage 2015-10-16 01:23:55 UTC
(comment #0)

I should clarify: I don't think the exp-run with -stack-protector-strong would have caught anything different: USE_GCC was turned on in the reported situation because the platform (powerpc64) doesn't support well clang at this time. I think the affected  ports also shouldn't be depending on the system flags.

Backporting the patch to lang/gcc is a good idea though.
Comment 3 Antoine Brodin freebsd_committer freebsd_triage 2015-10-16 05:41:31 UTC
(In reply to Pedro F. Giffuni from comment #2)
It would have shown 3 new failures on amd64/i386
Comment 4 Pedro F. Giffuni freebsd_committer freebsd_triage 2015-10-17 14:09:26 UTC
Alternatively, this Code differential should "fix" it:

https://reviews.freebsd.org/D3924
Comment 5 Enji Cooper freebsd_committer freebsd_triage 2015-10-17 20:44:29 UTC
(In reply to Antoine Brodin from comment #1)

LGTM!
Comment 6 commit-hook freebsd_committer freebsd_triage 2015-11-09 08:28:05 UTC
A commit references this bug:

Author: gerald
Date: Mon Nov  9 08:27:41 UTC 2015
New revision: 401086
URL: https://svnweb.freebsd.org/changeset/ports/401086

Log:
  "Backport" the  -fstack-protector-strong patchset from lang/gcc48 to
  lang/gcc.

  PR:		203751, 186852 [1]
  Submitted by:	software-freebsd@interfasys.ch [1]

Changes:
  head/lang/gcc/files/patch-stackprotector-gcc
  head/lang/gcc/files/patch-stackprotector-gcc_c-family
  head/lang/gcc/files/patch-stackprotector-gcc_doc
  head/lang/gcc/files/patch-stackprotector-gcc_testsuite
Comment 7 Gerald Pfeifer freebsd_committer freebsd_triage 2015-11-09 08:33:38 UTC
(In reply to Pedro F. Giffuni from comment #4)
> Alternatively, this Code differential should "fix" it:
>
> https://reviews.freebsd.org/D3924

I understand this has happened now, but in addition it still made
sense to "backport" the -fstack-protector-strong patchset, which I
just committed.