-
Notifications
You must be signed in to change notification settings - Fork 28
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
LowFat with link-time optimizations not working #18
Comments
Thanks for the report. I am not sure if LowFat has ever been tested with LTO before, so I am not surprised something breaks. Unfortunately the error message here is not very helpful. |
Yeah I understand. It would be nice to get it to work though, the instrumentation should not break with LTO in principle. I'm not sure how to approach fixing this in the build script, though. Could you give me some pointers on that? |
By chance I was looking into LTO for a different project. I don't think the For the former you need to compile+install the gold linker and point |
Ah, of course. Come to think of it, I'm doing this for another project as well... I will try to get this working tomorrow and let you know if it works. |
@GJDuck did you get this to work? I tried to get it to compile with the same binutils setup I have working in another setup but the lowfat compiler breaks with a syntax error in the lowfat.ld linker script (unexpected STRING). |
No, I was using LTO for something else. I am not sure if |
Hmm, I do need the full instrumentation. It seems like LTO is not going to work, then. |
Looked into this a bit, the problem is the INSERT AFTER command in the linker script which tells ld to augment the default linker script. gold does not have a default linker script and does not support the command. One would have to extend the linker script with ld's default script instead of using INSERT AFTER. See also this thread: https://bugzilla.redhat.com/show_bug.cgi?id=927573 |
I am trying to compile benchmarks with link-time optimizations by adding -flto to CFLAGS and LDFLAGS. To have these options available, I added -DLLVM_ENABLE_LTO=ON to build.sh on line 76. This breaks the build script with the following error:
See the complete output of the build script here: https://gist.github.com/taddeus/7c2babd439e2846abb7a598ec12a029a
The text was updated successfully, but these errors were encountered: