Skip to content

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.
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