Bug 238514

Summary: Adding -flto into compilation/link lines causes the error: /usr/bin/ld: unrecognized option '-plugin'
Product: Base System Reporter: Yuri Victorovich <yuri>
Component: miscAssignee: freebsd-toolchain (Nobody) <toolchain>
Status: New ---    
Severity: Affects Some People CC: dch, dim
Priority: ---    
Version: 12.0-RELEASE   
Hardware: Any   
OS: Any   

Comment 1 Mark Linimon freebsd_committer freebsd_triage 2019-06-12 09:06:45 UTC
Assign to toolchain@, and thus, remove the now-redundant tag.
Comment 2 Dimitry Andric freebsd_committer freebsd_triage 2019-06-12 10:54:44 UTC
This is because 11.2 and 12.0 i386 are still on BFD ld 2.17.50, which neither supports LTO, nor plugins.  It's probably best to leave off -flto for these platforms, otherwise use lld or the binutils port.
Comment 3 Conrad Meyer freebsd_committer freebsd_triage 2019-06-12 14:35:11 UTC
[Not CURRENT]
Comment 4 commit-hook freebsd_committer freebsd_triage 2020-06-03 11:16:02 UTC
A commit references this bug:

Author: dch
Date: Wed Jun  3 11:15:31 UTC 2020
New revision: 537609
URL: https://svnweb.freebsd.org/changeset/ports/537609

Log:
  databases/couchdb3: accommodate compiler quirks in i386

  As reported in BZ, -flto passes unsupported parameters to /usr/bin/ld
  Fixes all 11.x and 12.x i386 & handles additional unused warnings on i386.

  PR:		238514
  Reported by:	pkg-fallout
  Sponsored by:	SkunkWerks, GmbH

Changes:
  head/databases/couchdb3/Makefile
  head/databases/couchdb3/files/extra-patch-src_jiffy_c__src_double-conversion_strtod.cc