-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Starting from nightly-2024-04-15
, there was an update to compiler_builtins
which changed the way that math functions are linked (rust-lang/compiler-builtins#577). As a consequence, programs combining converted objects fail to build and link with the DJGPP toolchain because it cannot find the various functions in compiler_builtins::math
.
I've been looking into this problem here and I'm thinking whether it would be best resolved at elf2djgpp
directly.
Would it make sense to also translate symbols in compiler_builtins::math
using this tool?
As it turns out, I could reproduce the same problem with the example project after a few changes:
cd example
./build-dos-lib.sh
Converting ELF objects to COFF-GO32...
[WARN] Replacing bad extern compiler_builtins::mem::memcpy::h812ddf986f30a505 with memcpy
[WARN] Replacing bad extern compiler_builtins::mem::memset::hf5e04de1043dcb43 with memset
[WARN] Replacing bad extern compiler_builtins::mem::memcmp::hccf529a20986adb3 with memcmp
[WARN] Replacing bad extern compiler_builtins::mem::bcmp::h08ab184912ed088e with bcmp
[WARN] Replacing bad extern compiler_builtins::mem::memmove::h1be8968bbec95ef8 with memmove
build/debug/librust_lib.a built
make debug
i686-pc-msdosdjgpp-gcc -g -O0 -o build/debug/example.exe example.c build/debug/librust_lib.a
/usr/lib/gcc/i686-pc-msdosdjgpp/14.1.0/../../../../i686-pc-msdosdjgpp/bin/ld: build/debug/librust_lib.a(compiler_builtins-959ba4b0dcda654e.compiler_builtins.25b58a9b9e6e87fe-cgu.1.rcgu.o):compiler_builtins.25b58a9b9e6e87fe-cgu.1:(.text+0xc): undefined reference to `compiler_builtins::math::round'
/usr/lib/gcc/i686-pc-msdosdjgpp/14.1.0/../../../../i686-pc-msdosdjgpp/bin/ld: build/debug/librust_lib.a(compiler_builtins-959ba4b0dcda654e.compiler_builtins.25b58a9b9e6e87fe-cgu.1.rcgu.o):compiler_builtins.25b58a9b9e6e87fe-cgu.1:(.text+0xc): undefined reference to `compiler_builtins::math::trunc'
/usr/lib/gcc/i686-pc-msdosdjgpp/14.1.0/../../../../i686-pc-msdosdjgpp/bin/ld: build/debug/librust_lib.a(compiler_builtins-959ba4b0dcda654e.compiler_builtins.25b58a9b9e6e87fe-cgu.1.rcgu.o):compiler_builtins.25b58a9b9e6e87fe-cgu.1:(.text+0xa): undefined reference to `compiler_builtins::math::asinf'
...
Metadata
Metadata
Assignees
Labels
No labels