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

godbolt build requires -lm #16

Closed
DBJDBJ opened this issue Apr 17, 2021 · 1 comment
Closed

godbolt build requires -lm #16

DBJDBJ opened this issue Apr 17, 2021 · 1 comment

Comments

@DBJDBJ
Copy link

DBJDBJ commented Apr 17, 2021

https://godbolt.org/z/T43nexEdr

Without -lm , ld will not link and it will complain about not finding sqrt ...

I seem to remember I solved this one a few months ago?

ps: If someone wishes me to be exact: using -std=c17 -pedantic, UBENCH will not compile on Godbolt.

Issue is POSIX time "shenanigans", and asm becoming an "undeclared identifier"; all a lot of "fun".

-std=gnu17 or lower makes UBENCH compile.

Thus it is apparently enough to use: -lm, for UBENCH to compile, as -std=gnu17 is the current default for GCC (and clang).

@DBJDBJ
Copy link
Author

DBJDBJ commented Aug 12, 2021

No response from the author or anyone else ...

@DBJDBJ DBJDBJ closed this as completed Aug 12, 2021
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

1 participant