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

Fix llvmlibc sample, by adding -lm to the link command. #69

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

statham-arm
Copy link
Contributor

The sample program calls two libm functions (lround and atanf) to turn a floating-point number into decimal digits. But libm.a is built as a separate library from libc.a, so linking the sample program fails because the compile command doesn't use the -lm option. Easily fixed.

The sample program calls two libm functions (lround and atanf) to turn
a floating-point number into decimal digits. But libm.a is built as a
separate library from libc.a, so linking the sample program fails
because the compile command doesn't use the -lm option. Easily fixed.
Copy link
Contributor

@pratlucas pratlucas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@statham-arm statham-arm merged commit 27f7d55 into arm:arm-software Feb 4, 2025
@statham-arm statham-arm deleted the llvmlibc-sample-fix branch February 4, 2025 15:58
simpal01 pushed a commit to simpal01/arm-toolchain that referenced this pull request Feb 28, 2025
The sample program calls two libm functions (lround and atanf) to turn a
floating-point number into decimal digits. But libm.a is built as a
separate library from libc.a, so linking the sample program fails
because the compile command doesn't use the -lm option. Easily fixed.
simpal01 pushed a commit that referenced this pull request Feb 28, 2025
The sample program calls two libm functions (lround and atanf) to turn a
floating-point number into decimal digits. But libm.a is built as a
separate library from libc.a, so linking the sample program fails
because the compile command doesn't use the -lm option. Easily fixed.
@pratlucas pratlucas mentioned this pull request Feb 28, 2025
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

Successfully merging this pull request may close these issues.

2 participants