Date: Sun, 20 Oct 2024 10:01:37 GMT From: Dimitry Andric <dim@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org Subject: git: fd6294088c03 - 2024Q4 - emulators/mupen64plus-core: fix build with clang and lld 19 Message-ID: <202410201001.49KA1bnr011819@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch 2024Q4 has been updated by dim: URL: https://cgit.FreeBSD.org/ports/commit/?id=fd6294088c037ae77d6bcd0efa50c585d97c8d08 commit fd6294088c037ae77d6bcd0efa50c585d97c8d08 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2024-10-06 21:40:43 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2024-10-20 10:01:20 +0000 emulators/mupen64plus-core: fix build with clang and lld 19 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 (cherry picked from commit 5416735dea6160ac4efb3cd847936a3213ab1502) --- emulators/mupen64plus-core/Makefile | 1 - .../files/patch-projects_unix_Makefile | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/emulators/mupen64plus-core/Makefile b/emulators/mupen64plus-core/Makefile index 0193eebc1d44..eef7478a88da 100644 --- a/emulators/mupen64plus-core/Makefile +++ b/emulators/mupen64plus-core/Makefile @@ -19,7 +19,6 @@ USE_GL?= glu USE_SDL?= sdl2 USE_LDCONFIG?= yes ONLY_FOR_ARCHS= i386 amd64 -LDFLAGS_i386= -Wl,-znotext RELEASE_DATE?= 20240714 OPTFLAGS= # diff --git a/emulators/mupen64plus-core/files/patch-projects_unix_Makefile b/emulators/mupen64plus-core/files/patch-projects_unix_Makefile new file mode 100644 index 000000000000..6445ad2a0454 --- /dev/null +++ b/emulators/mupen64plus-core/files/patch-projects_unix_Makefile @@ -0,0 +1,20 @@ +--- projects/unix/Makefile.orig 2024-10-06 21:34:50 UTC ++++ projects/unix/Makefile +@@ -61,7 +61,7 @@ ifneq ("$(filter x86_64 amd64,$(HOST_CPU))","") + CPU := X86 + ifeq ("$(BITS)", "32") + ARCH_DETECTED := 64BITS_32 +- PIC ?= 0 ++ PIC ?= 1 + else + ARCH_DETECTED := 64BITS + PIC ?= 1 +@@ -70,7 +70,7 @@ ifneq ("$(filter pentium i%86,$(HOST_CPU))","") + ifneq ("$(filter pentium i%86,$(HOST_CPU))","") + CPU := X86 + ARCH_DETECTED := 32BITS +- PIC ?= 0 ++ PIC ?= 1 + endif + ifneq ("$(filter ppc macppc socppc powerpc,$(HOST_CPU))","") + CPU := PPC
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202410201001.49KA1bnr011819>