Page MenuHomeFreeBSD

Add a KLD_SHARED variable to kmod.mk.
AcceptedPublic

Authored by markj on Oct 1 2019, 7:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 7:52 AM
Unknown Object (File)
Dec 1 2023, 3:57 AM
Unknown Object (File)
Nov 20 2023, 6:55 PM
Unknown Object (File)
Nov 7 2023, 12:11 PM
Unknown Object (File)
Nov 6 2023, 8:12 PM
Unknown Object (File)
Nov 5 2023, 1:16 AM
Unknown Object (File)
Oct 13 2023, 5:47 PM
Unknown Object (File)
Oct 11 2023, 6:28 AM
Subscribers
None

Details

Reviewers
kib
imp
jhb
emaste
Summary

This can be used to override the platform default, since a few of our
drivers contain non-PIC blobs. Set KLD_SHARED=no in the drivers which
require this.

Switch amd64 to KLD_SHARED by default.

Also set -fno-plt on platforms where KLDs are compiled as PIC. This
reduces the overhead of calls to global functions in KLDs by eliminating
PLT stubs.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 26839
Build 25170: arc lint + arc unit

Event Timeline

sys/modules/hptmv/Makefile
15–21

looks like we should switch this one to the same style used in the other makefiles (using $(MACHINE_CPUARCH)-elf.raid.o.uu > hptrr_lib.o) in a separate commit before or after

I wonder if it's worth committing all but actually switching amd64 to KLD_SHARED, then making that change separately.

Avoid changing the default in this diff.

markj marked an inline comment as done.Oct 2 2019, 6:02 PM

I wonder if it's worth committing all but actually switching amd64 to KLD_SHARED, then making that change separately.

Fair enough. I amended the diff to not change the default.

sys/modules/hptmv/Makefile
15–21

r353013

emaste added inline comments.
sys/conf/kmod.mk
103–107

comment should still say amd64 and mips for now

This revision is now accepted and ready to land.Oct 2 2019, 6:22 PM
markj marked an inline comment as done.

Update comment as well.

This revision now requires review to proceed.Oct 2 2019, 6:46 PM
This revision is now accepted and ready to land.Oct 2 2019, 7:41 PM