-
Notifications
You must be signed in to change notification settings - Fork 104
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
Stop using -static-libstdc++ #1513
Conversation
We'll ship the TC's STL instead, to avoid breaking the ODR.
I'm not even quite sure why we'd do that there in the first place...
Force-feeding absolute path is known to do weird shit with some binutils versions...
My idea is mildly spoiled by the fact that we only keep the SOVER variant of the library, which means we still need to help the linker a bit... Oh, well, at least that documents the often-forgotten -l: syntax ;).
Apparently, if you pass a relative path to target_link_libraries, it assumes it's a library name and just prpeends a -l...
Depends on koreader/libk2pdfopt#40 & koreader/crengine#488 |
This comment was marked as resolved.
This comment was marked as resolved.
Hey, it almost worked first try on Android ;o). |
There, fixed Android. Because it historically offered a choice of STL, everything is terrible:
The downside to that last point is that it's probably built w/ debug symbols in the prebuilt TC because it's ginormous (5.5M, compared to my ~1.5M on plain Linux). |
Oh, wait, I know why it was done this way. It's to deal with broken early (-ish) API levels where the dynamic loader is dumber than a bag of rocks (c.f., koreader/android-luajit-launcher#283). |
Bionic is my mortal enemy. |
Made sure to link xtext, cre.cpp & CRe to the STL on Android, juuust in case. (It doesn't get thrown out by --as-needed, so I'm assuming it's useful). Also implemented the PRIVATE/PUBLIC switch for CRe linking as discussed earlier ;). |
(Unfamiliar with CRe's API ;p).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 6 files at r1, 3 of 4 files at r5, 1 of 1 files at r6, 2 of 2 files at r7, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @poire-z)
c.f., koreader/koreader-base#1513 for the gory details ;).
Opting instead on shipping the TC's shared STL, as it's bound to be much, much saner.
Modified how Lua modules are linked to avoid passing absolute paths to shared libraries, because, depending on binutils version, this matters.
Also stopped lniking sdcv to a static libz outside of Android (where I'm not even sure why we do that for glib...).
This change is