-
Notifications
You must be signed in to change notification settings - Fork 41
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
libucontext not functional under Gentoo (-DEXPORT_UNPREFIXED disabled when alternate CFLAGS present) #39
Comments
libucontext-1.1-unprefixed.patch.txt Edit: A revised patch was attached with better names. |
That patch is not acceptable, fix it so that Gentoo's CFLAGS are merged with the ones chosen by the build system. |
I'll work on modifying the Gentoo ebuild to invoke make as CFLAGS="<...>" make -j12 then, which should hopefully make it so that gmake doesn't replace / override the Makefile CFLAGS. |
Here are two potential solutions: I've attached both ideas to this post. Gentoo would prefer for -Ggdb3 not to be added if we specify our own CFLAGS (since it's for a release build). libucontext-concat.patch.txt |
Update: Gentoo has merged the set cflags if unset patch downstream. I'll close this as the problem has now been addressed and, even if no patches from above are merged here, the new Gentoo ebuild will not directly override libucontext's CFLAGS, so it should work normally. |
I merged the set cflags if unset patch. It will be in libucontext 1.2. |
Under Gentoo, it is common practice to include custom CFLAGS, particularly "-march=native" in /etc/portage/make.conf.
libucontext's Makefile appears to encounter problems when this is the case, with a telltale sign of these problems being -DEXPORT_UNPREFIXED not being correctly applied, and the resulting libucontext.so thus not containing any unprefixed weak symbols.
I am unaware of exactly what the issue is with the Makefile, however for the time being this can be worked around by using "<...> -DEXPORT_UNPREFIXED" as one's CFLAGS or hardcoding the desired CFLAGS into the Makefile.
The text was updated successfully, but these errors were encountered: