Michael Cronenworth wrote on 2022/03/31 20:56:
On 3/30/22 11:04 PM, Tom Stellard wrote:
$ x86_64-w64-mingw32-gcc -c test.c -v
.. snip ..
#include <...> search starts here:
  /usr/lib/gcc/x86_64-w64-mingw32/11.2.1/include
  /usr/lib/gcc/x86_64-w64-mingw32/11.2.1/include-fixed

This path is the Fedora MinGW path:
  /usr/x86_64-w64-mingw32/sys-root/mingw/include

End of search list.

Clang apparently has no idea where MinGW files in Fedora live. :(

$ clang -c test.c -target x86_64-windows -v

Try using -target x86_64-w64-mingw32 to match gcc.

Doesn't help.

$ clang -target x86_64-w64-mingw32 test.c -v
.. snip ..
#include <...> search starts here:
  /usr/lib64/clang/13.0.0/include
  /usr/include
End of search list.

The "/usr/include" path is a terrible choice. Time to open a bug report?

Actually it seems --target=foo, not -target foo

$ echo | clang --sysroot=/usr --target=x86_64-w64-mingw32 -v -E -
clang version 13.0.1 (Fedora 13.0.1-1.fc36)
Target: x86_64-w64-windows-gnu
Thread model: posix
InstalledDir: /bin
 (in-process)
....
clang -cc1 version 13.0.1 based upon LLVM 13.0.1 default target 
x86_64-redhat-linux-gnu
ignoring nonexistent directory "/usr/x86_64-w64-mingw32/sys-root/mingw/include"
ignoring nonexistent directory "/usr/x86_64-w64-mingw32/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib64/clang/13.0.1/include
 /usr/include
End of search list.
# 1 "<stdin>"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 361 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "<stdin>" 2
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to