[cfe-dev] Clang on Windows targeting gcc requirements

Edward Diener eldlistmailingz at tropicsoft.com
Thu Jun 25 18:20:35 PDT 2015


On 6/25/2015 8:38 PM, Nikola Smiljanic wrote:
>
>     Why is it "uncommitted" and not a part of clang source ?
>
>
> Because it hasn't been reviewed.

Does it normally take 9 months or more to review a fix ?

>
>     What does supporting mingw-64 have to do with the hardcoded path
>     c:\mingw ?
>
>
> Clang driver has no official support for mingw. Just a bunch of
> hardcoded paths in the current driver. They break whenever new version
> of mingw is released as version numbers are hardcoded as well.

The hardcoded paths clang currently uses all appear to be off of c:\mingw.

It does not appear to be the case that version numbers are hardcoded. I 
can test the clang binaries for clang-3.4.1, clang-3.5.2, clang-3.6.1, 
and the latest clang-3.7 built from source all against the latest mingw 
distribution, which uses gcc-4.8.1, and is linked to from c:\mingw 
without any problems. If each clang release hardcoded the mingw version, 
by which I am guessing you mean of course the gcc version, it is 
doubtful that all the different clang releases I mentioned would work 
with the gcc-4.8.1 release.

If this fix removes the hardcoded c:\mingw path when searching for a gcc 
distro to use, how does the end-user tell clang where the gcc distro he 
wants to use with clang resides ?

> They also
> don't work for mingw-w64 which as far as I know is more active than the
> original mingw project.

I would be glad if this patch fixes that problem, since the latest 
mingw-64 gcc release is gcc-5.1.

>
>     I do not understand how one obtains a patch from the link given, how
>     one applies the patch, and to what the patch is supposed to be
>     applied ( but I assume the patch is applied to the clang source
>     somewhere ).
>
>
> Download raw diff will give you a patch file. You apply it to your local
> clang directory.

I gather then that the patch file is a subversion patch file. From where 
in the llvm tree do I apply the patch ? How do I know that the patch 
will work with the latest llvm/clang source I have updated from the 
llvm/clang sunversion repositories ? Or is the patch only valid for a 
particular version of clang and not the latest version from source ?

>
>
>
>         2015-06-26 0:13 GMT+03:00 Edward Diener
>         <eldlistmailingz at tropicsoft.com
>         <mailto:eldlistmailingz at tropicsoft.com>
>         <mailto:eldlistmailingz at tropicsoft.com
>         <mailto:eldlistmailingz at tropicsoft.com>>>:
>
>              On 6/25/2015 2:13 PM, Yaron Keren wrote:
>
>                  See http://reviews.llvm.org/D5268
>         <https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D5268&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=CnzuN65ENJ1H9py9XLiRvC_UQz6u3oG6GUNn7_wosSM&m=dNG3HyoQulGecFyfZq24HIDVGy-_A5H4qJp4V__relo&s=3WB_bki2U9CTir99F85AJMt8_X9chUNsZXHHTVETX7Y&e=>
>
>         <https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D5268&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=CnzuN65ENJ1H9py9XLiRvC_UQz6u3oG6GUNn7_wosSM&m=-ZW8tznEmhb5NHese2XpJkBMuo2l_Omp4pNY90r31gU&s=H5rNcz_aIhE0PghyOY7-YGlv69ay3I3K9Ce6FABMqLI&e=>
>
>         <https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D5268&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=CnzuN65ENJ1H9py9XLiRvC_UQz6u3oG6GUNn7_wosSM&m=YgSrUuiAhPt76cF_h_LXb8Mg84W8p9nMvUiL3koHKP4&s=aW_6t6KDGfo5hO6NiTn5Hy9afNhzwfkX-BZHT9PtXmk&e=>
>
>
>              I don't understand what the above link means, or how it is
>         connected
>              to my suggestions below.
>
>
>
>
>                  2015-06-25 10:46 GMT+03:00 Edward Diener
>
>         <eldlistmailingz at tropicsoft.com
>         <mailto:eldlistmailingz at tropicsoft.com>
>
>         <mailto:eldlistmailingz at tropicsoft.com
>         <mailto:eldlistmailingz at tropicsoft.com>>
>
>         <mailto:eldlistmailingz at tropicsoft.com
>         <mailto:eldlistmailingz at tropicsoft.com>
>
>
>         <mailto:eldlistmailingz at tropicsoft.com
>         <mailto:eldlistmailingz at tropicsoft.com>>>>:
>
>                       For either the latest clang built from souce on
>         Windows or
>                  a binary
>                       distribution of clang on Windows it appears that clang
>                  expects the
>                       supporting gcc include files and lib files to be
>         in the
>                  hardcoded
>                       directory:
>
>                       c:\mingw
>
>                       and follow the mingw directory structure.
>
>                       1) Can this please be changed in the future so
>         that some
>                  environment
>                       variable ( maybe CLANG_GCC ) can be set to the gcc
>         installation
>                       rather than use a hardcoded path ?
>
>                       2) Can clang be updated to support the mingw-64
>         directory
>                  structure
>                       and not just the mingw directory structure ? The
>         mingw-64
>                  distros
>                       seem now to be the preferred gcc distributions on
>         Windows and
>                       support the latest versions of gcc.
>
>                       Do I need to make these suggestions on the clang bug
>                  tracker for the
>                       suggestions to be seriously considered ?
>
>
>              _______________________________________________
>              cfe-dev mailing list
>         cfe-dev at cs.uiuc.edu
>         <mailto:cfe-dev at cs.uiuc.edu>
>              <mailto:cfe-dev at cs.uiuc.edu
>         <mailto:cfe-dev at cs.uiuc.edu>>
>         http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
>
>
>         _______________________________________________
>         cfe-dev mailing list
>         cfe-dev at cs.uiuc.edu
>         <mailto:cfe-dev at cs.uiuc.edu>
>         http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
>
>     _______________________________________________
>     cfe-dev mailing list
>     cfe-dev at cs.uiuc.edu
>     <mailto:cfe-dev at cs.uiuc.edu>
>     http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>





More information about the cfe-dev mailing list