Date: Sat, 1 Jul 2023 19:23:22 GMT From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: da3096a92d2c - main - rdrand_rng: Build with -fPIC on i386 when using GCC. Message-ID: <202307011923.361JNMtJ070354@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=da3096a92d2c1c06b25613444d9b369475d50321 commit da3096a92d2c1c06b25613444d9b369475d50321 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2023-07-01 19:23:00 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2023-07-01 19:23:00 +0000 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 --- sys/modules/rdrand_rng/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/modules/rdrand_rng/Makefile b/sys/modules/rdrand_rng/Makefile index 7f14c080a260..3fdecd64f78f 100644 --- a/sys/modules/rdrand_rng/Makefile +++ b/sys/modules/rdrand_rng/Makefile @@ -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>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202307011923.361JNMtJ070354>