-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
GCC /dev/null conversion #1840
Comments
So, i think the goal is to prevent msys2 from converting this path. msys2/MSYS2-packages#84 and https://sourceforge.net/p/msys2/wiki/Porting/ seem relevant here. Looks like setting |
And indeed it does:
You can probably add it to the |
@Mistuke it would have to be patched in GCC sources. |
I found that the MSYS2 file/path conversion exclusion didn't work:
What I did do to handle this was create an empty file with a filename that's removed in the mostlyclean make target:
Which then I was able to get a working gcc:
Links for the changes to GCC: Is it portable to use /dev/null as input? All GCC targets supports this? |
@rallenh It was talked about on IRC.
I think it's fine on all POSIX targets. On Windows it's ok until you add |
@mati865 Ah. I see. I didn't catch that. Thanks for the clarification. I don't understand why you'd ask xgcc to build an assembly file from /dev/null (or an empty for that matter). Is the s-selftest target just to confirm it produces an assembly file with .file and .ident directives and doesn't emit errors on invocation? |
@mati865 Sorry I promised to look into this, but have been dealing with some issues with my apartment and hadn't had the chance. Anyway, the bug is a tiny one, should be easy to fix. What is happening is that: The MSYS shell is converting
Now this is great, because it means the test IS portable. The driver thus receives You can confirm this by seeing what the driver makes a call to
Now there's the error. When you add This is why the test breaks only when using Portable workaround is to change the test to explicitly give an output file.
Because the driver won't touch the name then. GCC sources should be patch to correctly treat I'll see if I can find some time tonight to whip up a patch. If I do, it likely won't be posted until sometime next week. |
Sorry, I've had my coffee now. GCC isn't treating the |
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78196 is the upstream report. |
@Mistuke no problem. I've also been very busy lately. |
I've committed the patches upstream. GCC should build now. |
Hi. I'm attempting to compile gcc 7.1.0. The build goes well until I reach |
GCC 7 (master branch) introduced selftest in gcc/Makefile.in https://github.com/gcc-mirror/gcc/blob/master/gcc/Makefile.in#L1876
It revealed bug in our GCC:
Minimal test case:
gcc -x c /dev/null -S
Interesting thing is that replacing
-S
with-c
hides this error.Removing
-S
also hides this issue (fails on linking):Part of discussion with @Mistuke:
@Alexpux and @mingwandroid, you were creating patches. Do you have any clue?
The text was updated successfully, but these errors were encountered: