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
Issue 21488 - Always compile dmd with -fPIC on POSIX targets #12798
Conversation
Thanks for your pull request, @ibuclaw! Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "stable + dmd#12798" |
@WalterBright seems that there's something not right with string literals and -fPIC on 32-bit. Looks like a missing null terminator? https://auto-tester.puremagic.com/show-run.ghtml?projectid=14&runid=4884149&isPull=true |
Really ? What I see is:
Looks like the assignment ends up with an extra |
I shouldn't be attempting to triage at 3am in the morning, what I thought I saw was
Backend is still guilty until proven innocent. |
Both druntime and phobos are now built with shared (dlang/phobos#8154, dlang/druntime#3505), let's see if errors were caused by mixing PIC and non-PIC... |
I think you need a rebase |
I rebased against the wrong branch. :D |
I need something more specific than that. If there's a code gen bug, please file a bug report. |
There would be something more specific if it were reproducible in a i386/ubuntu:16.04 container. |
Also, bug from last year. https://issues.dlang.org/show_bug.cgi?id=21374 |
Thank you. An assert fail in the code generator is clearly a codegen bug. But there's nothing anyone can do about at one time, something went wrong somewhere. |
0f77738
to
dfeae8e
Compare
@WalterBright looks like the EBX has an address which is not pointing to GOT when calling into thunks. Enabling this disabled code fixes the dll test on 32-bit here locally. |
Which means #2278 introduced a regression. |
Remaining issue in pipeline is due a PIC bug in the host compiler (2.079.0), fixed in 2.090 by #10696. |
18448e6
to
1dfe589
Compare
3de65cc
to
468ef58
Compare
This should really be pulled as soon as, because the longer it's left, the harder/longer it'll be to wean off ubuntu 14.04/16.04. DMD has already shot itself by not doing this 2-3 years ago with 64bit Linux. |
Segmentation faults or linker errors occur on 32-bit PIE platforms if any object is not compiled with -fPIC.