Skip to content

compiler-rt: Fix cmake check for _Float16 and __bf16 #83639

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

Closed
wants to merge 1 commit into from

Conversation

kraj
Copy link
Contributor

@kraj kraj commented Mar 2, 2024

When using check_c_source_compiles cmake function, main has to be provided, otherwise while compile step will be fine but linking step will fail as there will be no main function and test will fail and disable building HF builtins into compiler-rt

Fixes configure errors like below

aarch64-yoe-linux-ld.lld: error: undefined symbol: main
referenced by start.S:81 (../sysdeps/aarch64/start.S:81)
/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/compiler-rt/18.1.0/recipe-sysroot/usr/lib/Scrt1.o:(_start)
referenced by start.S:82 (../sysdeps/aarch64/start.S:82)
/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/compiler-rt/18.1.0/recipe-sysroot/usr/lib/Scrt1.o:(_start)
aarch64-yoe-linux-clang: error: linker command failed with exit code 1 (use -v to see invocation)

When using check_c_source_compiles cmake function, main has to be
provided, otherwise while compile step will be fine but linking step
will fail as there will be no main function and test will fail and
disable building HF builtins into compiler-rt

Fixes configure errors like below

aarch64-yoe-linux-ld.lld: error: undefined symbol: main
 referenced by start.S:81 (../sysdeps/aarch64/start.S:81)
               /mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/compiler-rt/18.1.0/recipe-sysroot/usr/lib/Scrt1.o:(_start)
 referenced by start.S:82 (../sysdeps/aarch64/start.S:82)
               /mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/compiler-rt/18.1.0/recipe-sysroot/usr/lib/Scrt1.o:(_start)
 aarch64-yoe-linux-clang: error: linker command failed with exit code 1 (use -v to see invocation)
@kraj kraj force-pushed the kraj/compiler-rt-float16 branch from 8e7a612 to 1e33936 Compare March 2, 2024 01:02
@kraj
Copy link
Contributor Author

kraj commented Mar 2, 2024

We will need this on release/18.x branch as well.

@kraj
Copy link
Contributor Author

kraj commented Aug 30, 2024

Another patch 68d8b38 ( newer than this ) has been merged so closing this PR.

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

Successfully merging this pull request may close these issues.

2 participants