Skip to content

Commit 2536c91

Browse files
committed
fix: complete libffi duplicate symbol fix for dynamic builds
This commit completes the fix for duplicate libffi symbol errors that occur with dynamic builds (DYNAMIC=1). The previous commit only guarded one of two RTS_LIBFFI_SYMBOLS usages in rts/RtsSymbols.c. Changes: 1. Guard the second RTS_LIBFFI_SYMBOLS usage at line 1199 with #if !defined(INTERNAL_LIBFFI) 2. Update libffi-clib submodule to include -Wno-error in cc-options, fixing java_raw_api.c deprecated function warnings treated as errors When INTERNAL_LIBFFI is defined (default: using libffi-clib package), the RTS should not register libffi symbols as built-ins since the libffi-clib package provides them. This prevents GHCi runtime linker from finding duplicate definitions when loading libffi-clib.
1 parent c0add30 commit 2536c91

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

libraries/libffi-clib

rts/RtsSymbols.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,7 +1196,9 @@ RtsSymbolVal rtsSyms[] = {
11961196
RTS_LIBGCC_SYMBOLS
11971197
RTS_ARCH_LIBGCC_SYMBOLS
11981198
RTS_FINI_ARRAY_SYMBOLS
1199+
#if !defined(INTERNAL_LIBFFI)
11991200
RTS_LIBFFI_SYMBOLS
1201+
#endif
12001202
RTS_ARM_OUTLINE_ATOMIC_SYMBOLS
12011203
RTS_SYMBOLS_PRIM
12021204
SymI_HasDataProto(nonmoving_write_barrier_enabled)

0 commit comments

Comments
 (0)