Bug 238514 - Adding -flto into compilation/link lines causes the error: /usr/bin/ld: unrecognized option '-plugin'
Summary: Adding -flto into compilation/link lines causes the error: /usr/bin/ld: unrec...
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 12.0-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-toolchain (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-12 06:29 UTC by Yuri Victorovich
Modified: 2020-06-03 11:16 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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