Bug 230200 - [Mk/bsd.gcc.mk]: USE_GCC - filter unsupported flags
Summary: [Mk/bsd.gcc.mk]: USE_GCC - filter unsupported flags
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Gerald Pfeifer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-30 21:20 UTC by Ivan Rozhuk
Modified: 2018-08-05 20:22 UTC (History)
1 user (show)

See Also:


Attachments
fix (434 bytes, patch)
2018-07-30 21:20 UTC, Ivan Rozhuk
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Rozhuk 2018-07-30 21:20:34 UTC
Created attachment 195658 [details]
fix

/etc/make.conf
# Retpoline speculative execution vulnerability mitigation (CVE-2017-5715)
CFLAGS+=-mretpoline
CXXFLAGS+=-mretpoline
COPTFLAGS+=-mretpoline


Now all ports with USE_GCC fail.
Patch fix it.
Comment 1 Gerald Pfeifer freebsd_committer freebsd_triage 2018-08-05 13:01:01 UTC
Got it, and thanks for proposing a patch.  

I'm looking into putting this at a slightly different location of
bsd.port.mk since at one point in the future we may need to make 
this (and similar ones) specific to the version of GCC chosen.

For now I have improved the debugging output provided by `make test-gcc`
and plan on committing your patch, which I already tested, only later
in the flow of bsd.gcc.mk.
Comment 2 commit-hook freebsd_committer freebsd_triage 2018-08-05 13:31:01 UTC
A commit references this bug:

Author: gerald
Date: Sun Aug  5 13:30:30 UTC 2018
New revision: 476413
URL: https://svnweb.freebsd.org/changeset/ports/476413

Log:
  Filter -mretpoline, which is specific to clang and not supported by
  GCC, from CFLAGS and CXXFLAGS.

  This also establishes a good place where to add any additional such
  cases in the future.

  PR:		230200
  Submitted by:	rozhuk.im@gmail.com

Changes:
  head/Mk/bsd.gcc.mk
Comment 3 Gerald Pfeifer freebsd_committer freebsd_triage 2018-08-05 13:33:00 UTC
This commit should do the job.  Please advise if you see anything we
should look into still.

Thank you for the solid report and patch!
Comment 4 Ivan Rozhuk 2018-08-05 20:22:37 UTC
Thanks, looks works fine.