5416735dea
lld 19 has become more strict about 32-bit relocations that require PIC,
resulting in link errors when building emulators/mupen64plus-core:
LD libmupen64plus.so.2.0.0
ld: error: relocation R_386_32 cannot be used against symbol '__gxx_personality_v0'; recompile with -fPIC
>>> defined in /usr/lib/libcxxrt.so
>>> referenced by oglft_c.cpp
>>> _obj/osd/oglft_c.o:(.eh_frame+0xFA63)
ld: error: relocation R_386_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in _obj/osd/oglft_c.o
>>> referenced by oglft_c.cpp
>>> _obj/osd/oglft_c.o:(.eh_frame+0xFA81)
ld: error: relocation R_386_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in _obj/osd/oglft_c.o
>>> referenced by oglft_c.cpp
>>> _obj/osd/oglft_c.o:(.eh_frame+0xFAB1)
ld: error: relocation R_386_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in _obj/osd/oglft_c.o
>>> referenced by oglft_c.cpp
>>> _obj/osd/oglft_c.o:(.eh_frame+0xFAE1)
[...more of these...]
Make it compile with -fPIC even on i386, by adjusting the PIC make
variable. This also removes the need to use -Wl,-znotext as a workaround.
PR: 281906
Approved by: maintainer timeout (2 weeks)
MFH: 2024Q4
32 lines
673 B
Makefile
32 lines
673 B
Makefile
PORTNAME= mupen64plus
|
|
PORTVERSION?= 2.6.0.${RELEASE_DATE}
|
|
PORTREVISION?= 0
|
|
CATEGORIES= emulators
|
|
PKGNAMESUFFIX?= -core
|
|
DIST_SUBDIR= ${PORTNAME}
|
|
|
|
MAINTAINER?= acm@FreeBSD.org
|
|
COMMENT?= Fork of Mupen64 Nintendo 64 emulator
|
|
WWW= https://www.mupen64plus.org/
|
|
|
|
USE_GITHUB= yes
|
|
GH_ACCOUNT= ${PORTNAME}
|
|
GH_PROJECT= ${PORTNAME}${PKGNAMESUFFIX}
|
|
GH_TAGNAME?= b0d68c20f49b8f833afa21450e0e8874c87c13c4
|
|
|
|
USES+= gl gmake pkgconfig sdl
|
|
USE_GL?= glu
|
|
USE_SDL?= sdl2
|
|
USE_LDCONFIG?= yes
|
|
ONLY_FOR_ARCHS= i386 amd64
|
|
|
|
RELEASE_DATE?= 20240714
|
|
OPTFLAGS= #
|
|
|
|
MAKE_ENV+= OPTFLAGS="${OPTFLAGS}"
|
|
|
|
OPTIONS_DEFINE= DOCS
|
|
|
|
.include "${.CURDIR}/../mupen64plus-core/Makefile.common"
|
|
.include <bsd.port.mk>
|