https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104157

            Bug ID: 104157
           Summary: libc++ does not work properly with x86_64-w64-mingw32
                    host, but works fine with x86_64-linux-gnu host
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: unlvsur at live dot com
  Target Milestone: ---

d:\x86_64-windows-gnu\aarch64-linux-android\aarch64-linux-android\include\c++\v1\cstddef:44:25:
error: no include path in which to search for stddef.h
   44 | #include_next <stddef.h>
      |                         ^
d:\x86_64-windows-gnu\aarch64-linux-android\aarch64-linux-android\include\c++\v1\cstddef:49:9:
error: 'ptrdiff_t' has not been declared in '::'
   49 | using ::ptrdiff_t _LIBCPP_USING_IF_EXISTS;
      |         ^~~~~~~~~
d:\x86_64-windows-gnu\aarch64-linux-android\aarch64-linux-android\include\c++\v1\cstddef:50:9:
error: 'size_t' has not been declared in '::'
   50 | using ::size_t _LIBCPP_USING_IF_EXISTS;
      |         ^~~~~~
d:\x86_64-windows-gnu\aarch64-linux-android\aarch64-linux-android\include\c++\v1\cstddef:53:9:
error: 'max_align_t' has not been declared in '::'


It cannot find the include path correctly for libc++ when host is windows.

D:\hg\fast_io\examples\0001.helloworld>aarch64-linux-android-g++ -v
Using built-in specs.
COLLECT_GCC=aarch64-linux-android-g++
COLLECT_LTO_WRAPPER=d:/x86_64-windows-gnu/aarch64-linux-android/bin/../libexec/gcc/aarch64-linux-android/12.0.1/lto-wrapper.exe
Target: aarch64-linux-android
Configured with: ../../../../gcc/configure --disable-nls --disable-werror
--target=aarch64-linux-android
--prefix=/home/cqwrteur/toolchains/gnu/x86_64-w64-mingw32/aarch64-linux-android
--enable-languages=c,c++ --disable-libstdcxx-verbose --disable-multilib
--with-gxx-libcxx-include-dir=/home/cqwrteur/toolchains/gnu/x86_64-w64-mingw32/aarch64-linux-android/aarch64-linux-android/include/c++/v1
--host=x86_64-w64-mingw32
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.1 20220121 (experimental) (GCC)

Reply via email to