[LLVMbugs] [Bug 18546] New: Implement MinGW(-w64) Clang Driver code
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Jan 19 06:22:32 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=18546
Bug ID: 18546
Summary: Implement MinGW(-w64) Clang Driver code
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Keywords: missing-feature, new-feature
Severity: normal
Priority: P
Component: Driver
Assignee: unassignedclangbugs at nondot.org
Reporter: vanboxem.ruben at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 11892
--> http://llvm.org/bugs/attachment.cgi?id=11892&action=edit
MinGW-w64 driver support
Currently, MinGW(-w64), more specifically, these targets:
i686-pc-mingw32
i686-w64-mingw32
x86_64-w64-mingw32
use the Generic_GCC Driver code, which uses a substandard directory search.
Attached is a patch that introduces a new ToolChain, MinGWToolChain, that
provides the necessary MinGW-w64 search paths and libraries.
Currently, this links in libgcc/libstdc++, and there is a small snippet of code
that implements cross GCC version detection through its library directory. I
cannot inherit the Generic_GCC version, because this would add unwanted search
directories that could conflict with the cross-compilation. InitHeaderSearch
was also adapted to this end.
Currently the patch does not cater for MinGW.org, but this can be added if I
know the search paths. I have tested this on Arch Linux with its mingw-w64-gcc
packages, and on Windows with my toolchains.
I have no idea how to write a test for this though, and looking at the existing
tests has made me none the wiser.
I believe that instead of calling collect2, one could directly call ld,
removing another GCC dependency.
The only issue I have run into is when creating a DLL (entry point
DllMainCRTStartup not found). It seems the wrong *crt*.o objects are used
(there are those by MinGW-w64 and those from GCC) I know too little of this
that I invite someone else to investigate this. Also, first creating an *.o
file, and then linking removes the warning.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140119/f9b48639/attachment.html>
More information about the llvm-bugs
mailing list