rdrand_rng: Build with -fPIC on i386 when using GCC.

ld.bfd requires an R_386_PLT32 relocation for calls to ifuncs
rather than R_386_PC32.  (lld permits R_386_PC32.)

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D40811
This commit is contained in:
John Baldwin 2023-07-01 12:23:00 -07:00
parent cc4f247fb9
commit da3096a92d

View File

@ -8,4 +8,9 @@ SRCS+= bus_if.h device_if.h
CFLAGS+= -I${SRCTOP}/sys
# ld.bfd doesn't support ifuncs invoked non-PIC
.if ${MACHINE_CPUARCH} == "i386"
CFLAGS.gcc= -fPIC
.endif
.include <bsd.kmod.mk>