Control: severity -1 wishlist Hi,
Thanks for taking the time to file this! On Wed, 07 Dec 2016 17:58:20 +0000, Riot <rain.back...@gmail.com> wrote: > Experimental support is not currently enabled in Debian's build of the > mingw-w64 cross-compiler. I'm pretty sure it is: look at /usr/lib/gcc/{i686,x86_64}-w64-mingw32/6.2-{posix,win32}/include/c++/experimental for the supported features. > It's being used increasingly frequently for things like > std::experimental::filesystem in a lot of projects, and is enabled by > default in Debian's native g++. Mingw-w64's own upstream binary builds > for Windows (such as "mingw-builds") all have experimental support enabled > also. > > For consistency it would be very helpful to enable this in Debian's binary > build, as this currently prevents cross-compiling a number of the same > projects that compile fine with upstream's binary releases and with > Debian's g++ binaries. > > The relevant flag to add is just configure --enable-experimental. I haven't found any sign of an --enable-experimental option (the available options are defined in libstdc++-v3/acinclude.m4 in the gcc source). For most experimental (TS) features, no flag is required, they're enabled by default if the target platform supports them; this is the case for MinGW-w64 Windows targets. The only exception is the filesystem TS, which is only enabled by default on POSIX systems where it's known to work (see https://gcc.gnu.org/onlinedocs/libstdc++/manual/configure.html for details) and requires --enable-libstdcxx-filesystem-ts; is that what you're after? It's worth noting the caveats in https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dynamic_or_shared.html#manual.intro.using.linkage.experimental too. Do you have an example project I could use to check that the Windows implementation works? Although it currently fails to build, so enabling it would probably take a bit of effort: ../../../../../../src/libstdc++-v3/src/filesystem/dir.cc: In function 'std::experimental::filesystem::v1::__cxx11::_Dir {anonymous}::open_dir(const std::experimental::filesystem::v1::__cxx11::path&, std::experimental::filesystem::v1::directory_options, std::error_code*)': ../../../../../../src/libstdc++-v3/src/filesystem/dir.cc:91:40: error: cannot convert '_WDIR*' to 'DIR*' in initialization if (DIR* dirp = ::opendir(p.c_str())) ^ ../../../../../../src/libstdc++-v3/src/filesystem/dir.cc: In constructor 'std::experimental::filesystem::v1::__cxx11::recursive_directory_iterator::recursive_directory_iterator(const std::experimental::filesystem::v1::__cxx11::path&, std::experimental::filesystem::v1::directory_options, std::error_code*)': ../../../../../../src/libstdc++-v3/src/filesystem/dir.cc:249:38: error: cannot convert '_WDIR*' to 'DIR*' in initialization if (DIR* dirp = ::opendir(p.c_str())) ^ (I should probably check niXman's builds to see if there are any other relevant options.) Regards, Stephen
pgpUtWZMwbzOz.pgp
Description: OpenPGP digital signature