Page MenuHomeFreeBSD

remove -fPIC from linux modules link commandline
ClosedPublic

Authored by emaste on Feb 25 2016, 4:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 13 2024, 6:41 PM
Unknown Object (File)
Dec 22 2023, 9:27 PM
Unknown Object (File)
Oct 4 2023, 3:56 PM
Unknown Object (File)
Sep 19 2023, 5:40 PM
Unknown Object (File)
Aug 5 2023, 1:22 AM
Unknown Object (File)
Aug 5 2023, 1:21 AM
Unknown Object (File)
Aug 5 2023, 1:21 AM
Unknown Object (File)
Aug 5 2023, 1:19 AM
Subscribers
None

Details

Summary

It has no effect on linking, but seems to be ignored by GNU ld.bfd. It causes ld.lld to terminate with an invalid argument error.

(Perhaps it was intended to be passed to ${CC} not through -Wl, but it is currently not being compassed to the compiler driver and I don't think it's necessary anyway.)

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste retitled this revision from to remove -fPIC from linux modules link commandline.
emaste updated this object.
emaste edited the test plan for this revision. (Show Details)
emaste added reviewers: dchagin, kib.

Assembler can generate different object with and without -fPIC. I would prefer that -fPIC moved out of -Wl instead of removal.

emaste edited edge metadata.

pass -fPIC to the assembler, not linker

In effect we have been building without -fPIC so removing it won't break anything, but it should be passed to the assembler (compiler driver) .

kib edited edge metadata.
This revision is now accepted and ready to land.Feb 25 2016, 6:13 PM
dchagin edited edge metadata.
This revision was automatically updated to reflect the committed changes.