libcrypto: compile all PIC objects with -DOPENSSL_PIC -fPIC

This change modifies the libcrypto PIC objects to always compile with
`-DOPENSSL_PIC -fPIC` to restore parity with the upstream build process.
This ensures that the legacy provider is built with parity to the
upstream legacy provider.

MFC after:              12 days
Tested with:		`make check` (legacy provider), `make universe`
Fixes:			14b9955e
Differential Revision:  https://reviews.freebsd.org/D44896
This commit is contained in:
Enji Cooper
2026-03-21 17:39:16 -07:00
parent 1ba29614c4
commit 3797fe720a
2 changed files with 3 additions and 6 deletions
-6
View File
@@ -687,12 +687,6 @@ SUBDIR.${MK_TESTS}= tests
.include <bsd.lib.mk>
.if ${MACHINE} == "powerpc"
# Work around "relocation R_PPC_GOT16 out of range" errors
PICFLAG= -fPIC
.endif
PICFLAG+= -DOPENSSL_PIC
.if defined(ASM_${MACHINE_CPUARCH})
.PATH: ${SRCTOP}/sys/crypto/openssl/${MACHINE_CPUARCH}
.if defined(ASM_amd64)
+3
View File
@@ -12,6 +12,9 @@ CFLAGS+= -I${LCRYPTO_SRC}/providers/common/include
CFLAGS+= -I${LCRYPTO_SRC}/providers/fips/include
CFLAGS+= -I${LCRYPTO_SRC}/providers/implementations/include
PICFLAG= -fPIC
PICFLAG+= -DOPENSSL_PIC
.SUFFIXES: .pc
.PATH.pc: ${LCRYPTO_SRC}/exporters