-
Notifications
You must be signed in to change notification settings - Fork 255
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
Building a library with ffreestanding flag. #1117
Comments
you've given given that the library you're building here is Android's cpufeatures, i can tell you that that definitely doesn't need if you have other code which does need |
@enh-google I was wondering, is there a case where I have no clue why GCC did not complain about that flag but Clang did.
|
the only time you need -ffreestanding is when you (a) can't call the C library or (b) don't even have a standard C library. the most common use is the kernel. the C library's startup code (which needs to avoid calling anything that isn't set up yet) is another case. an Android app developer should never need |
Description
I'm trying a build a library with --ffreestanding flag on Android NDK r19c, and I'm getting
use of undeclared identifier "LONG_BIT"
error.I know that (from #352),
--ffreestanding
is the cause but it's a requirement for the library.
I'm testing on
API LEVEL = 19
and using llvmClang toolchain
with the right target.Environment Details
Not all of these will be relevant to every bug, but please provide as much
information as you can.
The text was updated successfully, but these errors were encountered: