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

-fsigned-char breaks binary compatibility on ARM #74

Open
stefand opened this issue Dec 29, 2015 · 1 comment
Open

-fsigned-char breaks binary compatibility on ARM #74

stefand opened this issue Dec 29, 2015 · 1 comment

Comments

@stefand
Copy link

stefand commented Dec 29, 2015

android.toolchain.cmake adds -fsigned-char to the build options (line 1237), but ARM is using unsigned chars by default. This breaks library calls, e.g. as described here:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47275

I am running into exactly the problem described in the above bug report with Apitrace on ARM Android. I'll report the issue to Apitrace too, but I don't think it can do much when the build tool unconditionally sets an incompatible ABI.

@stefand
Copy link
Author

stefand commented Dec 29, 2015

char.txt

This test program shows the issue. Compile it with -fsigned-char and -funsigned-char (or no option at all) and compare the output. The exact symptom of the wrong setting depends on various factors like the selected C++ runtime library implementation and program behavior. My test program happens to work with gnustl with both char versions, but apitrace writes a bad stream. My test program doesn't write the 255 char with -fsigned-char with the default C++ library (libstdc++ I think).

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