-
Notifications
You must be signed in to change notification settings - Fork 162
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
With gcc 8.2 won't built due to __x86.get_pc_thunk.bx discarded #50
Comments
Thanks for the report, and for taking a stab at fixing it. I'm unsure of how to proceed though. The issues I have with the proposed solutions:
What I think is that this issue should be solved in the outer project that includes this library. That project should either export |
As it is, you can't build benchmark nor test_base64. That doesn't sound alright. As I understand I believe |
On x86_64 even |
Let's take this one step at a time. So this library is intended to be included and built by some outer project. As I see it, the outer project is responsible for supplying any environment That the benchmarks and the tests don't build is a problem, but as I see it, the way to fix that is by making these benchmarks and tests proper users of the library. The tests and benchmarks should be set up as users of the library like any other. They should set their own Moving on, I tried to reproduce this bug with the GCC 9.1.0 on my machine and couldn't, everything works as normal. It looks like GCC might have reverted the earlier puzzling and very un-C-like behavior where functions depend on "hidden" symbols that need to be in the global namespace. All in all I'm still not sure of whether this should be fixed, and if so, what way would be best. I'm inclined to write it off as GCC weirdness, and tell people to avoid building with GCC 8.2. |
GCC 8.2 is the compiler on Yocto Thud. |
I expect that this will be fixed in #54, by changing the way that symbol visibility is handled. |
@htot Is this issue still relevant? |
Ah very good question. I currently don't see any issues building on / for x86_64 neither with Ubuntu 22.04 nor for Yocto Honnister. |
After struggling a bit I built with Yocto Honister for i686 and found no issues. |
With gcc 8.2 with a i686 target the following error is generated:
I found 2 ways to fix this:
-fno-pie
toCFLAGS
inMakefile
__x86.get_pc_thunk.bx
toexports.txt
With 1 we get:
but no address space layout randomization (ASLR)
and with 2:
My vote goes to 1.
The text was updated successfully, but these errors were encountered: