Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

32-bit+ arithmetic instructions produce undefined external errors #4

Open
ricky26 opened this issue May 27, 2021 · 1 comment
Open

Comments

@ricky26
Copy link
Owner

ricky26 commented May 27, 2021

Example output:

warning: 2 warnings emitted

    Finished release [optimized] target(s) in 1.23s
ld.lld: error: undefined symbol: __mulsi3
>>> referenced by megatowerdefense.6uq4eb4f-cgu.7
>>>               megatowerdefense-0046ae851cb5cf2f.megatowerdefense.6uq4eb4f-cgu.7.rcgu.o:(main) in archive /rust-mega-drive/target/m68k-none-eabi/release/libmegatowerdefense.a
>>> referenced by compiler_builtins.7qw4kudv-cgu.1
>>>               compiler_builtins-800f79487148fff1.compiler_builtins.7qw4kudv-cgu.1.rcgu.o:(_$LT$u32$u20$as$u20$compiler_builtins..int..Int$GT$::wrapping_mul::h8b3963512e7a373d) in archive /rust-mega-drive/target/m68k-none-eabi/release/libmegatowerdefense.a
>>> referenced by compiler_builtins.7qw4kudv-cgu.1
>>>               compiler_builtins-800f79487148fff1.compiler_builtins.7qw4kudv-cgu.1.rcgu.o:(_$LT$u16$u20$as$u20$compiler_builtins..int..HInt$GT$::zero_widen_mul::h727d78071ecd5889) in archive /rust-mega-drive/target/m68k-none-eabi/release/libmegatowerdefense.a
>>> did you mean: __muldi3
>>> defined in: /rust-mega-drive/target/m68k-none-eabi/release/libmegatowerdefense.a(compiler_builtins-800f79487148fff1.compiler_builtins.7qw4kudv-cgu.12.rcgu.o)

This is almost certainly due to compiler-builtins expecting 32-bit as a minimum standard and not having implementations for these functions. 😢

@Serentty
Copy link

Rust officially targets 16-bit platforms such as the MSP430. This is probably worth opening an issue over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants