aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/configure
AgeCommit message (Collapse)AuthorFilesLines
2020-02-12Use a non-empty test program to test ability to link.Sandra Loosemore1-2/+2
On bare-metal targets, I/O support is typically provided by a BSP and requires a linker script and/or hosting library to be specified on the linker command line. Linking an empty program with the default linker script may succeed, however, which confuses libstdc++ configuration when programs that probe for the presence of various I/O features fail with link errors. 2020-02-12 Sandra Loosemore <sandra@codesourcery.com> PR libstdc++/79193 PR libstdc++/88999 config/ * no-executables.m4: Use a non-empty program to test for linker support. libgcc/ * configure: Regenerated. libgfortran/ * configure: Regenerated. libiberty/ * configure: Regenerated. libitm/ * configure: Regenerated. libobjc/ * configure: Regenerated. libquadmath/ * configure: Regenerated. libssp/ * configure: Regenerated. libstdc++v-3/ * configure: Regenerated.
2020-02-01Fixes after recent configure changes relating to static librariesAndrew Burgess1-1/+1
This commit: commit e7c26e04b2dd6266d62d5a5825ff7eb44d1cf14e (tjteru/master) Date: Wed Jan 22 14:54:26 2020 +0000 gcc: Add new configure options to allow static libraries to be selected contains a couple of issues. First I failed to correctly regenerate all of the configure files it should have done. Second, there was a mistake in lib-link.m4, one of the conditions didn't use pure sh syntax, I wrote this: if x$lib_type = xauto || x$lib_type = xshared; then When I should have written this: if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then These issues were raised on the mailing list in these messages: https://gcc.gnu.org/ml/gcc-patches/2020-01/msg01827.html https://gcc.gnu.org/ml/gcc-patches/2020-01/msg01921.html config/ChangeLog: * lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Update shell syntax. gcc/ChangeLog: * configure: Regenerate. intl/ChangeLog: * configure: Regenerate. libcpp/ChangeLog: * configure: Regenerate. libstdc++-v3/ChangeLog: * configure: Regenerate.
2020-01-28libstdc++: Replace glibc-specific check for clock_gettime (PR 93325)Jonathan Wakely1-18/+55
It's wrong to assume that clock_gettime is unavailable on any *-*-linux* target that doesn't have glibc 2.17 or later. Use a generic test instead of using __GLIBC_PREREQ. Only do that test when is_hosted=yes so that we don't get an error for cross targets without a working linker. This ensures that C library's clock_gettime will be used on non-glibc targets, instead of an incorrect syscall to SYS_clock_gettime. PR libstdc++/93325 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Use AC_SEARCH_LIBS for clock_gettime instead of explicit glibc version check. * configure: Regenerate.
2020-01-27gcc: Add new configure options to allow static libraries to be selectedAndrew Burgess1-15/+32
The motivation behind this change is to make it easier for a user to link against static libraries on a target where dynamic libraries are the default library type (for example GNU/Linux). Further, my motivation is really for linking libraries into GDB, however, the binutils-gdb/config/ directory is a copy of gcc/config/ so changes for GDB need to be approved by the GCC project first. After making this change in the gcc/config/ directory I've run autoreconf on all of the configure scripts in the GCC tree and a couple have been updated, so I'll use one of these to describe what my change does. Consider libcpp, this library links against libiconv. Currently if the user builds on a system with both static and dynamic libiconv installed then autotools will pick up the dynamic libiconv by default. This is almost certainly the right thing to do. However, if the user wants to link against static libiconv then things are a little harder, they could remove the dynamic libiconv from their system, but this is probably a bad idea (other things might depend on that library), or the user can build their own version of libiconv, install it into a unique prefix, and then configure gcc using the --with-libiconv-prefix=DIR flag. This works fine, but is somewhat annoying, the static library available, I just can't get autotools to use it. My change then adds a new flag --with-libiconv-type=TYPE, where type is either auto, static, or shared. The default auto, ensures we keep the existing behaviour unchanged. If the user configures with --with-libiconv-type=static then the configure script will ignore any dynamic libiconv it finds, and will only look for a static libiconv, if no static libiconv is found then the configure will continue as though there is no libiconv at all available. Similarly a user can specify --with-libiconv-type=shared and force the use of shared libiconv, any static libiconv will be ignored. As I've implemented this change within the AC_LIB_LINKFLAGS_BODY macro then only libraries configured using the AC_LIB_LINKFLAGS or AC_LIB_HAVE_LINKFLAGS macros will gain the new configure flag. If this is accepted into GCC then there will be follow on patches for binutils and GDB to regenerate some configure scripts in those projects. For GCC only two configure scripts needed updated after this commit, libcpp and libstdc++-v3, both of which link against libiconv. config/ChangeLog: * lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Add new --with-libXXX-type=... option. Use this to guide the selection of either a shared library or a static library. libcpp/ChangeLog: * configure: Regenerate. libstdc++-v3/ChangeLog: * configure: Regenerate.
2020-01-24Add `--with-toolexeclibdir=' configuration optionMaciej W. Rozycki1-10/+37
Provide means, in the form of a `--with-toolexeclibdir=' configuration option, to override the default installation directory for target libraries, otherwise known as $toolexeclibdir. This is so that it is possible to get newly-built libraries, particularly the shared ones, installed in a common place, so that they can be readily used by the target system as their host libraries, possibly over NFS, without a need to manually copy them over from the currently hardcoded location they would otherwise be installed in. In the presence of the `--enable-version-specific-runtime-libs' option and for configurations building native GCC the option is ignored. config/ * toolexeclibdir.m4: New file. gcc/ * doc/install.texi (Cross-Compiler-Specific Options): Document `--with-toolexeclibdir' option. libada/ * Makefile.in (configure_deps): Add `toolexeclibdir.m4'. * configure.ac: Handle `--with-toolexeclibdir='. * configure: Regenerate. libatomic/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * testsuite/Makefile.in: Regenerate. libffi/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * include/Makefile.in: Regenerate. * man/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. libgcc/ * Makefile.in (configure_deps): Add `toolexeclibdir.m4'. * configure.ac: Handle `--with-toolexeclibdir='. * configure: Regenerate. libgfortran/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. libgomp/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * testsuite/Makefile.in: Regenerate. libhsail-rt/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. libitm/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * testsuite/Makefile.in: Regenerate. libobjc/ * Makefile.in (aclocal_deps): Add `toolexeclibdir.m4'. * aclocal.m4: Include `toolexeclibdir.m4'. * configure.ac: Handle `--with-toolexeclibdir='. * configure: Regenerate. liboffloadmic/ * plugin/configure.ac: Handle `--with-toolexeclibdir='. * plugin/Makefile.in: Regenerate. * plugin/aclocal.m4: Regenerate. * plugin/configure: Regenerate. * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. libphobos/ * m4/druntime.m4: Handle `--with-toolexeclibdir='. * m4/Makefile.in: Regenerate. * libdruntime/Makefile.in: Regenerate. * src/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. libquadmath/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. libsanitizer/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * asan/Makefile.in: Regenerate. * interception/Makefile.in: Regenerate. * libbacktrace/Makefile.in: Regenerate. * lsan/Makefile.in: Regenerate. * sanitizer_common/Makefile.in: Regenerate. * tsan/Makefile.in: Regenerate. * ubsan/Makefile.in: Regenerate. libssp/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. libstdc++-v3/ * acinclude.m4: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * doc/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * libsupc++/Makefile.in: Regenerate. * po/Makefile.in: Regenerate. * python/Makefile.in: Regenerate. * src/Makefile.in: Regenerate. * src/c++11/Makefile.in: Regenerate. * src/c++17/Makefile.in: Regenerate. * src/c++98/Makefile.in: Regenerate. * src/filesystem/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. libvtv/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * testsuite/Makefile.in: Regenerate. zlib/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate.
2020-01-23reject macros in math decl checkAlexandre Oliva1-0/+22
The C++ headers #undef the functions we are testing for, just in case they're implemented as macros, so do that in the cross math decl tests as well. for libstdc++-v3/ChangeLog * crossconfig.m4 (GLIBCXX_CHECK_MATH_DECL): Reject macros. * configure: Rebuild.
2019-12-30VxWorks has_nanosleep for libstdc++ enable-libstdcxx-time autoCorentin Gay1-0/+5
2019-12-30 Corentin Gay <gay@adacore.com> * acinclude.m4 (vxworks*): New entry. Set ac_has_nanosleep=yes. * configure: Regenerate. From-SVN: r279796
2019-12-25Define HAVE_ for math long double functions declared in vxworks headersAlexandre Oliva1-0/+1104
When cross-building for vxworks, test for declarations of long double functions in math.h. We don't normally test for these functions when cross compiling, because link tests don't work, or ever really, but not defining them as available causes replacements to be defined in ways that may cause duplicate definition linker errors if the units defining both the replacement and the actual implementation are brought in because of other symbols. for libstdc++-v3/ChangeLog * crossconfig.m4 (GLIBCXX_CROSSCONFIG) [*-vxworks*]: Define long double functions as available if declared by math.h. (GLIBCXX_CHECK_MATH_DECL, GLIBCXX_CHECK_MATH_DECLS): New. * configure: Rebuild. From-SVN: r279731
2019-12-20libstdc++: Test setrlimit with c++ in configureJerome Lambourg1-7/+20
* acinclude.m4 (GLIBCXX_CHECK_SETRLIMIT): Test with AC_LANG_CPLUSPLUS. * configure: Regenerate. From-SVN: r279644
2019-12-20libstdc++: Strengthen the check for availability of pthread_rwlock_tJerome Lambourg1-1/+28
* acinclude.m4 (_GLIBCXX_USE_PTHREAD_RWLOCK_T): Checks that _PTHREADS is defined after including gthr.h. * configure: Regenerate. From-SVN: r279635
2019-12-02libstdc++: Add full steady_clock support to shared_timed_mutexMike Crowe1-0/+87
The pthread_rwlock_clockrdlock and pthread_rwlock_clockwrlock functions were added to glibc in v2.30. They have also been added to Android Bionic. If these functions are available in the C library then they can be used to implement shared_timed_mutex::try_lock_until, shared_timed_mutex::try_lock_for, shared_timed_mutex::try_lock_shared_until and shared_timed_mutex::try_lock_shared_for so that they are no longer unaffected by the system clock being warped. (This is the shared_mutex equivalent of PR libstdc++/78237 for mutex.) If the new functions are available then steady_clock is deemed to be the "best" clock available which means that it is used for the relative try_lock_for calls and absolute try_lock_until calls using steady_clock and user-defined clocks. It's not possible to have _GLIBCXX_USE_PTHREAD_RWLOCK_CLOCKLOCK defined without _GLIBCXX_USE_PTHREAD_RWLOCK_T, so the requirement that the clock be the same as condition_variable is maintained. Calls explicitly using system_clock (aka high_resolution_clock) continue to use CLOCK_REALTIME via the old pthread_rwlock_timedrdlock and pthread_rwlock_timedwrlock functions. If the new functions are not available then system_clock is deemed to be the "best" clock available which means that the previous suboptimal behaviour remains. Additionally, the user-defined clock used with shared_timed_mutex::try_lock_for and shared_mutex::try_lock_shared_for may have higher precision than __clock_t. We may need to round the duration up to ensure that the timeout is long enough. (See __timed_mutex_impl::_M_try_lock_for) 2019-12-02 Mike Crowe <mac@mcrowe.com> Add full steady_clock support to shared_timed_mutex * acinclude.m4 (GLIBCXX_CHECK_PTHREAD_RWLOCK_CLOCKLOCK): Define to check for the presence of both pthread_rwlock_clockrdlock and pthread_rwlock_clockwrlock. * config.h.in: Regenerate. * configure.ac: Call GLIBCXX_USE_PTHREAD_RWLOCK_CLOCKLOCK. * configure: Regenerate. * include/std/shared_mutex (shared_timed_mutex): Define __clock_t as the best clock to use for relative waits. (shared_timed_mutex::try_lock_for) Round up wait duration if necessary. (shared_timed_mutex::try_lock_shared_for): Likewise. (shared_timed_mutex::try_lock_until): Use existing try_lock_until implementation for system_clock (which matches __clock_t when _GLIBCCXX_USE_PTHREAD_RWLOCK_CLOCKLOCK is not defined). Add new overload for steady_clock that uses pthread_rwlock_clockwrlock if it is available. Simplify overload for non-standard clock to just call try_lock_for with a relative timeout. (shared_timed_mutex::try_lock_shared_until): Likewise. From-SVN: r278903
2019-12-02libstdc++: PR 78237 Add full steady_clock support to timed_mutexMike Crowe1-0/+83
The pthread_mutex_clocklock function is available in glibc since the 2.30 release. If this function is available in the C library it can be used to fix PR libstdc++/78237 by supporting steady_clock properly with timed_mutex. This means that code using timed_mutex::try_lock_for or timed_mutex::wait_until with steady_clock is no longer subject to timing out early or potentially waiting for much longer if the system clock is warped at an inopportune moment. If pthread_mutex_clocklock is available then steady_clock is deemed to be the "best" clock available which means that it is used for the relative try_lock_for calls and absolute try_lock_until calls using steady_clock and user-defined clocks. Calls explicitly using system_clock (aka high_resolution_clock) continue to use CLOCK_REALTIME via __gthread_cond_timedwait. If pthread_mutex_clocklock is not available then system_clock is deemed to be the "best" clock available which means that the previous suboptimal behaviour remains. 2019-12-02 Mike Crowe <mac@mcrowe.com> PR libstdc++/78237 Add full steady_clock support to timed_mutex * acinclude.m4 (GLIBCXX_CHECK_PTHREAD_MUTEX_CLOCKLOCK): Define to detect presence of pthread_mutex_clocklock function. * config.h.in: Regenerate. * configure: Regenerate. * configure.ac: Call GLIBCXX_CHECK_PTHREAD_MUTEX_CLOCKLOCK. * include/std/mutex (__timed_mutex_impl): Remove unnecessary __clock_t. (__timed_mutex_impl::_M_try_lock_for): Use best clock to turn relative timeout into absolute timeout. (__timed_mutex_impl::_M_try_lock_until): Keep existing implementation for system_clock. Add new implementation for steady_clock that calls _M_clocklock. Modify overload for user-defined clock to use a relative wait so that it automatically uses the best clock. [_GLIBCXX_USE_PTHREAD_MUTEX_CLOCKLOCK] (timed_mutex::_M_clocklock): New member function. (recursive_timed_mutex::_M_clocklock): Likewise. From-SVN: r278901
2019-11-30libstdc++: Default to --enable-libstdcxx-filesystem-ts for *-*-mingw*Jonathan Wakely1-0/+3
* acinclude.m4 (GLIBCXX_ENABLE_FILESYSTEM_TS): Enable by default for mingw targets. * configure: Regenerate. From-SVN: r278870
2019-10-04Build filesystem library with large file supportJonathan Wakely1-10/+213
Enable AC_SYS_LARGEFILE to set the macros needed for large file APIs to be used by default. We do not want to define those macros in the public headers that users include. The values of the macros are copied to a separate file that is only included by the filesystem sources during the build, and then the macros in <bits/c++config.h> are renamed so that they don't have any effect in user code including our headers. Also use larger type for result of filesystem::file_size to avoid truncation of large values on 32-bit systems (PR 91947). PR libstdc++/81091 PR libstdc++/91947 * configure.ac: Use AC_SYS_LARGEFILE to enable 64-bit file APIs. * config.h.in: Regenerate: * configure: Regenerate: * include/Makefile.am (${host_builddir}/largefile-config.h): New target to generate config header for filesystem library. (${host_builddir}/c++config.h): Rename macros for large file support. * include/Makefile.in: Regenerate. * src/c++17/fs_dir.cc: Include new config header. * src/c++17/fs_ops.cc: Likewise. (filesystem::file_size): Use uintmax_t for size. * src/filesystem/dir.cc: Include new config header. * src/filesystem/ops.cc: Likewise. (experimental::filesystem::file_size): Use uintmax_t for size. From-SVN: r276585
2019-09-27Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 updateMaciej W. Rozycki1-9/+9
A change made with r275564 ("[ARM/FDPIC v6 02/24] [ARM] FDPIC: Handle arm*-*-uclinuxfdpiceabi in configure scripts") to libtool.m4 has not regenerated all the `configure' scripts affected. Fix it. gcc/ * configure: Regenerate. libatomic/ * configure: Regenerate. libbacktrace/ * configure: Regenerate. libcc1/ * configure: Regenerate. libffi/ * configure: Regenerate. libgfortran/ * configure: Regenerate. libgomp/ * configure: Regenerate. libhsail-rt/ * configure: Regenerate. libitm/ * configure: Regenerate. libobjc/ * configure: Regenerate. liboffloadmic/ * configure: Regenerate. libphobos/ * configure: Regenerate. libquadmath/ * configure: Regenerate. libsanitizer/ * configure: Regenerate. libssp/ * configure: Regenerate. libstdc++-v3/ * configure: Regenerate. libvtv/ * configure: Regenerate. lto-plugin/ * configure: Regenerate. zlib/ * configure: Regenerate. From-SVN: r276213
2019-09-10[ARM/FDPIC v6 24/24] [ARM] FDPIC: Handle arm*-*-uclinuxfdpiceabi in ↵Christophe Lyon1-11/+24
libstdc++ configure scripts 2019-09-10 Christophe Lyon <christophe.lyon@st.com> libstdc++-v3/ * acinclude.m4: Handle uclinux*. * configure: Regenerate. * configure.host: Handle uclinux* From-SVN: r275586
2019-09-06Fix GCC_LINUX_FUTEX to work with C99 compilersFlorian Weimer1-0/+2
Without this change, libstdc++ is built without futex symbols if GCC rejects implicit function declarations by default. From-SVN: r275454
2019-09-04PR libstdc++/41861 Add full steady_clock support to condition_variableMike Crowe1-0/+83
The pthread_cond_clockwait function is available in glibc since the 2.30 release. If this function is available in the C library it can be used to fix PR libstdc++/41861 by supporting std::chrono::steady_clock properly with std::condition_variable. This means that code using std::condition_variable::wait_for or std::condition_variable::wait_until with std::chrono::steady_clock is no longer subject to timing out early or potentially waiting for much longer if the system clock is warped at an inopportune moment. If pthread_cond_clockwait is available then std::chrono::steady_clock is deemed to be the "best" clock available which means that it is used for the relative wait_for calls and absolute wait_until calls using user-defined clocks. Calls explicitly using std::chrono::system_clock continue to use CLOCK_REALTIME via __gthread_cond_timedwait. If pthread_cond_clockwait is not available then std::chrono::system_clock is deemed to be the "best" clock available which means that the previous suboptimal behaviour remains. 2019-09-04 Mike Crowe <mac@mcrowe.com> PR libstdc++/41861 * acinclude.m4 (GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT): Check for new pthread_cond_clockwait function. * configure.ac: Use GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT. * configure: Regenerate. * config.h.in: Regenerate. * include/std/condition_variable: (condition_variable): Rename __steady_clock_t typedef and add system_clock. Change __clock_t to be a typedef for the preferred clock to convert arbitrary other clocks to. [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (wait_until): Add a steady_clock overload. (wait_until): Change __clock_t overload to use system_clock. [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (__wait_until_impl): Add steady_clock overload that calls pthread_cond_clockwait. (__wait_until_impl): Change __clock_t overload to use system_clock. (condition_variable_any) [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT]: Use steady_clock for __clock_t if pthread_cond_clockwait is available. From-SVN: r275390
2019-09-03Remove Cell Broadband Engine SPU targetsUlrich Weigand1-6167/+0
From-SVN: r275343
2019-09-03re PR other/79543 (Inappropriate "ld --version" checking)Chung-Lin Tang1-11/+11
2019-09-03 Chung-Lin Tang <cltang@codesourcery.com> libatomic/ PR other/79543 * acinclude.m4 (LIBAT_CHECK_LINKER_FEATURES): Fix GNU ld --version scanning to conform to the GNU Coding Standards. * configure: Regenerate. libffi/ PR other/79543 * acinclude.m4 (LIBAT_CHECK_LINKER_FEATURES): Fix GNU ld --version scanning to conform to the GNU Coding Standards. * configure: Regenerate. libgomp/ PR other/79543 * acinclude.m4 (LIBGOMP_CHECK_LINKER_FEATURES): Fix GNU ld --version scanning to conform to the GNU Coding Standards. * configure: Regenerate. libitm/ PR other/79543 * acinclude.m4 (LIBITM_CHECK_LINKER_FEATURES): Fix GNU ld --version scanning to conform to the GNU Coding Standards. * configure: Regenerate. libstdc++-v3/ PR other/79543 * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Fix GNU ld --version scanning to conform to the GNU Coding Standards. * configure: Regenerate. From-SVN: r275341
2019-08-29PR libstdc++/91067 add more missing exports for directory iteratorsJonathan Wakely1-1/+1
PR libstdc++/91067 * acinclude.m4 (libtool_VERSION): Bump to 6:28:0. * configure: Regenerate. * config/abi/pre/gnu.ver (GLIBCXX_3.4.28): Add new version. Export missing symbols. * testsuite/27_io/filesystem/iterators/91067.cc: Test move constructors. * testsuite/util/testsuite_abi.cc: Add new symbol version. From-SVN: r275032
2019-07-03PR libstdc++/91067 fix missing exports for filesystem iteratorsJonathan Wakely1-1/+1
The copy assignment operator for recursive_directory_iterator was not exported despite being needed. The __shared_ptr default constructors are not needed when compiling with GCC but Clang requires them for -O1. PR libstdc++/91067 * acinclude.m4 (libtool_VERSION): Bump to 6:27:0. * configure: Regenerate. * config/abi/pre/gnu.ver (GLIBCXX_3.4.27): Add new version. Export missing symbols. * testsuite/27_io/filesystem/iterators/91067.cc: New test. * testsuite/util/testsuite_abi.cc: Add new symbol version. From-SVN: r273023
2019-07-01Fix libstdc++ install-pdf support.Jim Wilson1-8/+13
Generating pdf files requires everything that is required for the xml files except the style sheets. libstdc++-v3/ * configure.ac (BUILD_PDF): Also test for doxygen, dot, xsltproc, and xmllint. * configure: Regenerate. From-SVN: r272920
2019-06-20Skip libstdc++ debug build in early bootstrap stagesJonathan Wakely1-2/+14
As mentioned in PR 90770, this is a patch that Debian have been carrying for some time. The additional unoptimized copies of libstdc++ libs that get built during each stage are never going to be used, so don't bother building them. For a profiled bootstrap this means we won't train the compiler on the unoptimized library code with assertions enabled, but that doesn't seem like a big problem, as the same code has already been compiled once for the main libstdc++ library. * acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final stage of bootstrap. * configure: Regenerate. From-SVN: r272509
2019-06-07PR libstdc++/90770 fix missing src/debug/MakefileJonathan Wakely1-1/+1
PR libstdc++/90770 * configure: Regenerate. * src/Makefile.am (stamp-debug): Also test for missing makefile. * src/Makefile.in: Regenerate. From-SVN: r272050
2019-05-29PR libstdc++/85494 use rdseed and rand_s in std::random_deviceJonathan Wakely1-0/+41
Add support for additional sources of randomness to std::random_device, to allow using RDSEED for Intel CPUs and rand_s for Windows. When supported these can be selected using the tokens "rdseed" and "rand_s". For *-w64-mingw32 targets the "default" token will now use rand_s, and for other i?86-*-* and x86_64-*-* targets it will try to use "rdseed" first, then "rdrand", and finally "/dev/urandom". To simplify the declaration of std::random_device in <bits/random.h> the constructors now unconditionally call _M_init instead of _M_init_pretr1, and the function call operator now unconditionally calls _M_getval. The library code now decides whether _M_init and _M_getval should use a real source of randomness or the mt19937 engine. Existing code compiled against old libstdc++ headers will still call _M_init_pretr1 and _M_getval_pretr1, but those functions now forward to _M_init and _M_getval if a real source of randomness is available. This means existing code compiled for mingw-w64 will start to use rand_s just by linking to a new libstdc++.dll. * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if the assembler supports rdseed. * config.h.in: Regenerate. * configure: Regenerate. * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED. * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define. * doc/html/*: Regenerate. * doc/xml/manual/status_cxx2011.xml: Document new tokens. * include/bits/random.h (random_device::random_device()): Always call _M_init rather than _M_init_pretr1. (random_device::random_device(const string&)): Likewise. (random_device::operator()()): Always call _M_getval(). (random_device::_M_file): Replace first member of union with an anonymous struct, with _M_file as its first member. * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define. [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define. (USE_MT19937): Define if none of the above are defined. (USE_POSIX_FILE_IO): Define. (_M_strtoul): Remove. [USE_RDSEED] (__x86_rdseed): Define new function. [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function. (random_device::_M_init(const string&)): Initialize new union members. Add support for "rdseed" and "rand_s" tokens. Decide what the "default" token does according to which USE_* macros are defined. [USE_POSIX_FILE_IO]: Store a file descriptor. [USE_MT19937]: Forward to _M_init_pretr1 instead. (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline code from _M_strtoul. [!USE_MT19937]: Call _M_init, transforming the old default token or numeric tokens to "default". (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose. (random_device::_M_getval()): Use new union members to obtain a random number from the stored function pointer or file descriptor. [USE_MT19937]: Obtain a value from the mt19937 engine. (random_device::_M_getval_pretr1()): Call _M_getval(). (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd instead of fileno. [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed. * testsuite/26_numerics/random/random_device/85494.cc: New test. From-SVN: r271740
2019-03-11PR libstdc++/89460 Fix Networking TS test failures on HP-UXJonathan Wakely1-0/+46
Check for availability of POSIX sockatmark before using it. Rename _S_ntoh overloads that are ambiguous when passed an integral type that is neither uint16_t nor uint32_t. PR libstdc++/89460 * configure.ac: Check for sockatmark. * crossconfig.m4: Check for sockatmark. * config.h.in: Regenerate. * configure: Regenerate. * include/experimental/internet (address_v4::_S_hton): Rename overloaded functions to _S_hton_16 and _S_ntoh_16. (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32. (basic_endpoint): Adjust calls to _S_hton and _S_ntoh. * include/experimental/socket (basic_socket::at_mark): Check _GLIBCXX_HAVE_SOCKATMARK. From-SVN: r269588
2019-02-27PR libstdc++/89466 avoid slow xsltproc command in configureJonathan Wakely1-30/+78
Certain broken versions of xsltproc ignore the --nonet option and will attempt to fetch the docbook stylesheet from the WWW when it isn't in the local XML catalog. This patch checks for the local stylesheet directory first, and doesn't use xsltproc if no local stylesheets are found. Checking for the local directory is done using xmlcatalog if available, only checking the hardcoded list of directories if xmlcatalog fails. The right directory for Suse is added to the hardcoded list. This should avoid doing an xsltproc check that would need to download the stylesheet, so no network connection is made even if a broken xsltproc is present. PR libstdc++/89466 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local stylesheet directories before check for xsltproc. Try to use xmlcatalog to find local stylesheet directory before trying hardcoded paths. Add path used by suse to hardcoded paths. Adjust xsltproc check to look for the same stylesheet as doc/Makefile.am uses. Don't use xsltproc if xmlcatalog fails to find a local stylesheet. * configure.ac: Check for xmlcatalog. * Makefile.in: Regenerate. * configure: Likewise. * doc/Makefile.in: Likewise. * include/Makefile.in: Likewise. * libsupc++/Makefile.in: Likewise. * po/Makefile.in: Likewise. * python/Makefile.in: Likewise. * src/Makefile.in: Likewise. * src/c++11/Makefile.in: Likewise. * src/c++17/Makefile.in: Likewise. * src/c++98/Makefile.in: Likewise. * src/filesystem/Makefile.in: Likewise. * testsuite/Makefile.in: Likewise. From-SVN: r269249
2019-02-14Add std::timespec and std::timespec_get for C++17Jonathan Wakely1-0/+46
* configure.ac: Check for C11 timespec_get function. * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd) (openbsd): Likewise * config.h.in: Regenerate. * configure: Regenerate. * include/c_global/ctime (timespec, timespec_get): Add to namespace std for C++17 and up. From-SVN: r268879
2019-01-07Fix build for systems without POSIX truncateJonathan Wakely1-0/+56
Older versions of newlib do not provide truncate so add a configure check for it, and provide a fallback definition. There were also some missing exports in the linker script, which went unnoticed because there are no tests for some functions. A new link-only test checks that every filesystem operation function is defined by the library. * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate. * config.h.in: Regenerate. * config/abi/pre/gnu.ver: Order patterns for filesystem operations alphabetically and add missing entries for copy_symlink, hard_link_count, rename, and resize_file. * configure: Regenerate. * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is used unconditionally. * src/filesystem/ops-common.h (__gnu_posix::truncate) [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only supports truncating to zero length. * testsuite/27_io/filesystem/operations/all.cc: New test. * testsuite/27_io/filesystem/operations/resize_file.cc: New test. From-SVN: r267647
2019-01-06PR libstdc++/86756 Move rest of std::filesystem to libstdc++.soJonathan Wakely1-0/+128
Move std::filesystem directory iterators and operations from libstdc++fs.a to main libstdc++ library. These components have many dependencies on OS support, which is not available on all targets. Some additional autoconf checks and conditional compilation is needed to ensure the files will build for all targets. Previously this code was not compiled without --enable-libstdcxx-filesystem-ts but the C++17 components should be available for all hosted builds. The tests for these components no longer need to link to libstdc++fs.a, but are not expected to pass on all targets. To avoid numerous failures on targets which are not expected to pass the tests (due to missing OS functionality) leave the dg-require-filesystem-ts directives in place for now. This will ensure the tests only run for builds where the filesystem-ts library is built, which presumably means some level of OS support is present. PR libstdc++/86756 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT. * config.h.in: Regenerate. * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for remaining std::filesystem types and functions. * configure: Regenerate. * src/c++17/Makefile.am: Add C++17 filesystem sources. * src/c++17/Makefile.in: Regenerate. * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to here, and change name of included file. * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to here, and change name of included file. * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change path to dir-common.h. * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change path to ops-common.h. Disable -Wunused-parameter warnings. (internal_file_clock): Define unconditionally. [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not define. (do_copy_file, do_space): Move definitions to ops.common.h. (copy, file_size, hard_link_count, last_write_time, space): Only perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise report an error. (last_write_time, read_symlink): Remove unused attributes from parameters. * src/filesystem/Makefile.am: Remove C++17 filesystem sources. * src/filesystem/Makefile.in: Regenerate. * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc. * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc. * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc. * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc. * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define dummy types and functions instead of using #error. * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error. * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define in terms of stat. [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions. (do_copy_file, do_space): Move definitions here from std-ops.cc. * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space to account for new namespace. * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove -lstdc++fs from dg-options. * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise. * testsuite/27_io/filesystem/file_status/1.cc: Likewise. * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise. * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise. * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Likewise. * testsuite/27_io/filesystem/iterators/pop.cc: Likewise. * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc: Likewise. * testsuite/27_io/filesystem/operations/absolute.cc: Likewise. * testsuite/27_io/filesystem/operations/canonical.cc: Likewise. * testsuite/27_io/filesystem/operations/copy.cc: Likewise. * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise. * testsuite/27_io/filesystem/operations/create_directories.cc: Likewise. * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise. * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise. * testsuite/27_io/filesystem/operations/current_path.cc: Likewise. * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise. * testsuite/27_io/filesystem/operations/exists.cc: Likewise. * testsuite/27_io/filesystem/operations/file_size.cc: Likewise. * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise. * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise. * testsuite/27_io/filesystem/operations/permissions.cc: Likewise. * testsuite/27_io/filesystem/operations/proximate.cc: Likewise. * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise. * testsuite/27_io/filesystem/operations/relative.cc: Likewise. * testsuite/27_io/filesystem/operations/remove.cc: Likewise. * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise. * testsuite/27_io/filesystem/operations/space.cc: Likewise. * testsuite/27_io/filesystem/operations/status.cc: Likewise. * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise. * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Likewise. * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise. From-SVN: r267616
2018-11-27PR libstdc++/67843 set shared_ptr lock policy at build-timeJonathan Wakely1-9/+85
This resolves a longstanding issue where the lock policy for shared_ptr reference counting depends on compilation options when the header is included, so that different -march options can cause ABI changes. For example, objects compiled with -march=armv7 will use atomics to synchronize reference counts, and objects compiled with -march=armv5t will use a mutex. That means the shared_ptr control block will have a different layout in different objects, causing ODR violations and undefined behaviour. This was the root cause of PR libstdc++/42734 as well as PR libstdc++/67843. The solution is to decide on the lock policy at build time, when libstdc++ is configured. The configure script checks for the availability of the necessary atomic built-ins for the target and fixes that choice permanently. Different -march flags used to compile user code will not cause changes to the lock policy. This results in an ABI change for certain compilations, but only where there was already an ABI incompatibility between the libstdc++.so library and objects built with an incompatible -march option. In general, this means a more stable ABI that isn't silently altered when -march flags make addition atomic ops available. To force a target to use "atomic" or "mutex" the new configure option --with-libstdcxx-lock-policy can be used. In order to turn ODR violations into linker errors, the uses of shared_ptr in filesystem directory iterators have been replaced with __shared_ptr, and explicit instantiations are declared. This ensures that object files using those types cannot link to libstdc++ libs unless they use the same lock policy. PR libstdc++/67843 * acinclude.m4 (GLIBCXX_ENABLE_LOCK_POLICY): Add new macro that defines _GLIBCXX_HAVE_ATOMIC_LOCK_POLICY. * config.h.in: Regenerate. * configure: Regenerate. * configure.ac: Use GLIBCXX_ENABLE_LOCK_POLICY. * doc/xml/manual/configure.xml: Document new configure option. * include/bits/fs_dir.h (directory_iterator): Use __shared_ptr instead of shared_ptr. (recursive_directory_iterator): Likewise. (__shared_ptr<_Dir>): Add explicit instantiation declaration. (__shared_ptr<recursive_directory_iterator::_Dir_stack>): Likewise. * include/bits/shared_ptr_base.h (__allocate_shared, __make_shared): Add default template argument for _Lock_policy template parameter. * include/ext/concurrence.h (__default_lock_policy): Check macro _GLIBCXX_HAVE_ATOMIC_LOCK_POLICY instead of checking if the current target supports the builtins for compare-and-swap. * src/filesystem/std-dir.cc (__shared_ptr<_Dir>): Add explicit instantiation definition. (__shared_ptr<recursive_directory_iterator::_Dir_stack>): Likewise. (directory_iterator, recursive_directory_iterator): Use __make_shared instead of make_shared. From-SVN: r266533
2018-11-07iconv.m4 (AM_ICONV_LINK): Don't overwrite CPPFLAGS.Hafiz Abid Qadeer1-4/+4
2018-11-06 Hafiz Abid Qadeer <abidh@codesourcery.com> * config/iconv.m4 (AM_ICONV_LINK): Don't overwrite CPPFLAGS. Append $INCICONV to it. gcc/ * configure: Regenerated. libcpp/ * configure: Likewise. libstdc++-v3/ * configure: Likewise. intl/ * configure: Likewise. From-SVN: r265896
2018-10-31Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856).Joseph Myers1-2708/+2894
This patch updates GCC to use autoconf 2.69 and automake 1.15.1. (That's not the latest automake version, but it's the one used by binutils-gdb, with which consistency is desirable, and in any case seems a useful incremental update that should make a future update to 1.16.1 easier.) The changes are generally similar to the binutils-gdb ones, and are copied from there where shared files and directories are involved (there are some further changes to such shared directories, however, which I'd expect to apply to binutils-gdb once this patch is in GCC). Largely, obsolete AC_PREREQ calls are removed, while many AC_LANG_SOURCE calls are added to avoid warnings from aclocal and autoconf. Multilib support is no longer included in core automake, meaning that multilib.am needs copying from automake's contrib directory into the GCC source tree. Autoconf 2.69 has Go support, so local copies of that support are removed. I hope the D support will soon be submitted to upstream autoconf so the local copy of that can be removed in a future update. Changes to how automake generates runtest calls mean quotes are removed from RUNTEST definitions in five lib*/testsuite/Makefile.am files (libatomic, libgomp, libitm, libphobos, libvtv; some others have RUNTEST definitions without quotes, which are still OK); libgo and libphobos also get -Wno-override added to AM_INIT_AUTOMAKE so those overrides of RUNTEST do not generate automake warnings. Note that the regeneration did not include regeneration of fixincludes/config.h.in (attempting such regeneration resulted in all the USED_FOR_TARGET conditionals disappearing; and I don't see anything in the fixincludes/ directory that would result in such conditionals being generated, unlike in the gcc/ directory). Also note that libvtv/testsuite/other-tests/Makefile.in was not regenerated; that directory is not listed as a subdirectory for which Makefile.in gets regenerated by calling "automake" in libvtv/, so I'm not sure how it's meant to be regenerated. While I mostly fixed warnings should running aclocal / automake / autoconf, there were various such warnings from automake in the libgfortran, libgo, libgomp, liboffloadmic, libsanitizer, libphobos directories that I did not fix, preferring to leave those to the relevant subsystem maintainers. Specifically, most of those warnings were of the following form (example from libgfortran): Makefile.am:48: warning: source file 'caf/single.c' is in a subdirectory, Makefile.am:48: but option 'subdir-objects' is disabled automake: warning: possible forward-incompatibility. automake: At least a source file is in a subdirectory, but the 'subdir-objects' automake: automake option hasn't been enabled. For now, the corresponding output automake: object file(s) will be placed in the top-level directory. However, automake: this behaviour will change in future Automake versions: they will automake: unconditionally cause object files to be placed in the same subdirectory automake: of the corresponding sources. automake: You are advised to start using 'subdir-objects' option throughout your automake: project, to avoid future incompatibilities. I think it's best for the relevant maintainers to add subdir-objects and do any other associated Makefile.am changes needed. In some cases the paths in the warnings involved ../; I don't know if that adds any extra complications to the use of subdir-objects. I've tested this with native, cross and Canadian cross builds. The risk of any OS-specific issues should I hope be rather lower than if a libtool upgrade were included (we *should* do such an upgrade at some point, but it's more complicated - it involves identifying all our local libtool changes to see if any aren't included in the upstream version we update to, and reverting an upstream libtool patch that's inappropriate for use in GCC); I think it would be better to get this update into GCC so that people can test in different configurations and we can fix any issues found, rather than to try to get more and more testing done before it goes in. top level: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * multilib.am: New file. From automake. Merge from binutils-gdb: 2018-06-19 Simon Marchi <simon.marchi@ericsson.com> * libtool.m4: Use AC_LANG_SOURCE. * configure.ac: Remove AC_PREREQ, use AC_LANG_SOURCE. * ar-lib: New file. * test-driver: New file. * configure: Re-generate. config: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * math.m4, tls.m4: Use AC_LANG_SOURCE. Merge from binutils-gdb: 2018-06-19 Simon Marchi <simon.marchi@ericsson.com> * override.m4 (_GCC_AUTOCONF_VERSION): Bump from 2.64 to 2.69. fixincludes: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * aclocal.m4, configure: Regenerate. gcc: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single line for second argument of AC_DEFINE_UNQUOTED. * doc/install.texi (Tools/packages necessary for modifying GCC): Update to autoconf 2.69 and automake 1.15.1. * aclocal.m4, config.in, configure: Regenerate. gnattools: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * configure: Regenerate. gotools: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * config/go.m4: Remove file. * Makefile.am (ACLOCAL_AMFLAGS): Do not use -I ./config. * configure.ac: Remove AC_PREREQ. Do not include config/go.m4. * Makefile.in, aclocal.m4, configure: Regenerate. intl: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 Merge from binutils-gdb: 2018-06-19 Simon Marchi <simon.marchi@ericsson.com> * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS, remove AC_PREREQ. * configure: Re-generate. * config.h.in: Re-generate. * aclocal.m4: Re-generate. libada: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * configure: Regenerate. libatomic: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * acinclude.m4: Use AC_LANG_SOURCE. * configure.ac: Remove AC_PREREQ. * testsuite/Makefile.am (RUNTEST): Remove quotes. * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Regenerate. libbacktrace: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate. libcc1: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, configure: Regenerate. libcpp: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. * aclocal.m4, config.in, configure: Regenerate. libdecnumber: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 Merge from binutils-gdb: 2018-06-19 Simon Marchi <simon.marchi@ericsson.com> * configure.ac: Remove AC_PREREQ. * configure: Re-generate. * aclocal.m4. libffi: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. (AUTOMAKE_OPTIONS): Add info-in-builddir. (CLEANFILES): Remove doc/libffi.info. * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, configure, fficonfig.h.in, include/Makefile.in, man/Makefile.in, testsuite/Makefile.in: Regenerate. libgcc: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. * configure: Regenerate. libgfortran: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate. libgo [logically part of this change but omitted from the commit]: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * config/go.m4: Remove file. * config/libtool.m4: Use AC_LANG_SOURCE. * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use -Wno-override in AM_INIT_AUTOMAKE call. * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Regenerate. libgomp: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am (AUTOMAKE_OPTIONS): Add info-in-builddir. (CLEANFILES): Remove libgomp.info. * configure.ac: Remove AC_PREREQ. * testsuite/Makefile.am (RUNTEST): Remove quotes. * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Regenerate. libhsail-rt: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, configure: Regenerate. libiberty: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 Merge from binutils-gdb: 2018-06-19 Simon Marchi <simon.marchi@ericsson.com> * configure.ac: Remove AC_PREREQ. * configure: Re-generate. * config.in: Re-generate. libitm: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. (AUTOMAKE_OPTIONS): Add info-in-builddir. (CLEANFILES): Remove libitm.info. * configure.ac: Remove AC_PREREQ. * testsuite/Makefile.am (RUNTEST): Remove quotes. * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Regenerate. libobjc: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. * aclocal.m4, config.h.in, configure: Regenerate. liboffloadmic: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. * plugin/Makefile.am: Include multilib.am. * plugin/configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, configure, plugin/Makefile.in, plugin/aclocal.m4, plugin/configure: Regenerate. libphobos: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. Use -Wno-override in AM_INIT_AUTOMAKE call. * m4/autoconf.m4: Add extra argument to AC_LANG_DEFINE call. * m4/druntime/os.m4: Use AC_LANG_SOURCE. * testsuite/Makefile.am (RUNTEST): Remove quotes. * Makefile.in, aclocal.m4, configure, libdruntime/Makefile.in, src/Makefile.in, testsuite/Makefile.in: Regenerate. libquadmath: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. (AUTOMAKE_OPTIONS): Remove 1.8. Add info-in-builddir. (all-local): Define outside conditional code. (CLEANFILES): Remove libquadmath.info. * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate. libsanitizer: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. * Makefile.in, aclocal.m4, asan/Makefile.in, configure, interception/Makefile.in, libbacktrace/Makefile.in, lsan/Makefile.in, sanitizer_common/Makefile.in, tsan/Makefile.in, ubsan/Makefile.in: Regenerate. libssp: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. (AUTOMAKE_OPTIONS): Remove 1.9.5. * configure.ac: Remove AC_PREREQ. Quote argument to AC_RUN_IFELSE. * Makefile.in, aclocal.m4, configure: Regenerate. libstdc++-v3: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. * Makefile.in, aclocal.m4, configure, doc/Makefile.in, include/Makefile.in, libsupc++/Makefile.in, po/Makefile.in, python/Makefile.in, src/Makefile.in, src/c++11/Makefile.in, src/c++17/Makefile.in, src/c++98/Makefile.in, src/filesystem/Makefile.in, testsuite/Makefile.in: Regenerate. libvtv: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. * configure.ac: Remove AC_PREREQ. * testsuite/Makefile.am (RUNTEST): Remove quotes. * Makefile.in, aclocal.m4, configure, testsuite/Makefile.in: Regenerate. lto-plugin: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. * Makefile.in, aclocal.m4, config.h.in, configure: Regenerate. zlib: 2018-10-31 Joseph Myers <joseph@codesourcery.com> PR bootstrap/82856 * Makefile.am: Include multilib.am. Merge from binutils-gdb: 2018-06-19 Simon Marchi <simon.marchi@ericsson.com> * configure.ac: Modernize AC_INIT call, remove AC_PREREQ. * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.8, cygnus, add foreign. * Makefile.in: Re-generate. * aclocal.m4: Re-generate. * configure: Re-generate. From-SVN: r265695
2018-10-16Use autoconf to check for features needed by Networking TSJonathan Wakely1-0/+16
* config.h.in: Regenerate. * configure: Regenerate. * configure.ac: Check for headers used by Networking TS. * include/experimental/executor: Include <condition_variable> instead of <mutex>. * include/experimental/internet: Use autoconf macros for available headers. Include <sys/socket.h> for. Remove <cstring> and use __builtin_memcpy and __builtin_strchr. (resolver_errc) [!_GLIBCXX_HAVE_NETDB_H]: Do not define. (address_v4::to_string, address_v6::to_string) [!_GLIBCXX_HAVE_ARPA_INET_H]: Likewise. (basic_resolver_results) [!_GLIBCXX_HAVE_NETDB_H]: Make private constructors report errors. [!_GLIBCXX_HAVE_NETINET_TCP_H] (tcp::no_delay): Do not define. * include/experimental/io_context: Likewise. * include/experimental/socket: Likewise. [!_GLIBCXX_HAVE_SYS_SOCKET_H, !_GLIBCXX_HAVE_POLL_H] (socket_base): Do not define nested types when relevant header not available. (__socket_impl::native_non_blocking) [!_GLIBCXX_HAVE_FCNTL_H]: Report an error. (__basic_socket_impl::open, __basic_socket_impl::local_endpoint) (__basic_socket_impl::bind) [!_GLIBCXX_HAVE_SYS_SOCKET_H]: Likewise. (__basic_socket_impl::io_control) [!_GLIBCXX_HAVE_SYS_IOCTL_H]: Likewise. (basic_socket::at_mark, basic_socket::shutdown) (basic_socket::remote_endpoint, basic_socket::connect) (basic_socket::async_connect) [!_GLIBCXX_HAVE_SYS_SOCKET_H]: Likewise. (basic_socket::available) [_GLIBCXX_HAVE_SYS_IOCTL_H]: Check macro for <sys/ioctl.h> availability. (basic_socket::wait) [!_GLIBCXX_HAVE_POLL_H]: Likewise. (basic_datagram_socket::receive, basic_datagram_socket::async_receive) (basic_datagram_socket::receive_from) (basic_datagram_socket::async_receive_from) (basic_datagram_socket::send, basic_datagram_socket::async_send) (basic_datagram_socket::send_to, basic_datagram_socket::async_send_to) [!_GLIBCXX_HAVE_SYS_SOCKET_H]: Likewise. (basic_stream_socket::receive, basic_stream_socket::async_receive) (basic_stream_socket::send, basic_stream_socket::async_send) [!_GLIBCXX_HAVE_SYS_SOCKET_H]: Likewise. (basic_socket_acceptor::listen, basic_socket_acceptor::accept) (basic_socket_acceptor::async_accept) [!_GLIBCXX_HAVE_SYS_SOCKET_H]: Likewise. (basic_socket_acceptor::wait) [!_GLIBCXX_HAVE_POLL_H]: Likewise. From-SVN: r265203
2018-10-16Define _GLIBCXX_USE_DEV_RANDOM as replacement for _GLIBCXX_USE_RANDOM_TR1Jonathan Wakely1-12/+19
Define and use a new macro with a more descriptive name. Only use the old macro in <tr1/random.h>. * acinclude.m4 (GLIBCXX_CHECK_RANDOM_TR1): Replace with ... (GLIBCXX_CHECK_DEV_RANDOM): New macro with more descriptive name. Define _GLIBCXX_USE_DEV_RANDOM as well as _GLIBCXX_USE_RANDOM_TR1. * config.h.in: Regenerate. * configure: Regenerate. * configure.ac: Use GLIBCXX_CHECK_DEV_RANDOM instead of GLIBCXX_CHECK_RANDOM_TR1. crossconfig.m4: Likewise. * include/bits/random.h (random_device): Use _GLIBCXX_USE_DEV_RANDOM instead of _GLIBCXX_USE_RANDOM_TR1. * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise. From-SVN: r265197
2018-08-13Revert "libstdc++-v3: Have aligned_alloc() on Newlib"Jonathan Wakely1-2/+0
This reverts commit r263461 / 2e920cd849b3cf0a72df4f172e27676a3e70b73f because aligned_alloc is not defined for baremetal newlib targets, see https://gcc.gnu.org/ml/libstdc++/2018-08/msg00065.html Revert 2018-08-10 Sebastian Huber <sebastian.huber@embedded-brains.de> PR target/85904 * configure.ac: Define HAVE_ALIGNED_ALLOC if building for Newlib. * configure: Regenerate. From-SVN: r263513
2018-08-10libstdc++-v3: Have aligned_alloc() on NewlibSebastian Huber1-0/+2
While building for Newlib, some configure checks must be hard coded. The aligned_alloc() is supported since 2015 in Newlib. libstdc++-v3/ PR target/85904 * configure.ac: Define HAVE_ALIGNED_ALLOC if building for Newlib. * configure: Regenerate. From-SVN: r263461
2018-08-01Add -D_GLIBCXX_ASSERTIONS to DEBUG_FLAGSJonathan Wakely1-2/+2
Enable assertions in the extra debug library built when --enable-libstdcxx-debug is used. Replace some Debug Mode assertions in src/c++11/futex.cc with __glibcxx_assert, because the library will never be built with Debug Mode. * configure: Regenerate. * configure.ac: Add -D_GLIBCXX_ASSERTIONS to default DEBUG_FLAGS. * src/c++11/futex.cc: Use __glibcxx_assert instead of _GLIBCXX_DEBUG_ASSERT. From-SVN: r263235
2018-07-24Add initial version of C++17 <memory_resource> headerJonathan Wakely1-2/+14
This is missing the synchronized_pool_resource and unsynchronized_pool_resource classes but is otherwise complete. This is a new implementation, not based on the existing code in <experimental/memory_resource>, but memory_resource and polymorphic_allocator ended up looking almost the same anyway. The constant_init kluge in src/c++17/memory_resource.cc is apparently due to Richard Smith and ensures that the objects are constructed during constant initialiation phase and not destroyed (because the constant_init destructor doesn't destroy the union member and the storage is not reused). * config/abi/pre/gnu.ver: Export new symbols. * configure: Regenerate. * include/Makefile.am: Add new <memory_resource> header. * include/Makefile.in: Regenerate. * include/precompiled/stdc++.h: Include <memory_resource> for C++17. * include/std/memory_resource: New header. (memory_resource, polymorphic_allocator, new_delete_resource) (null_memory_resource, set_default_resource, get_default_resource) (pool_options, monotonic_buffer_resource): Define. * src/Makefile.am: Add c++17 directory. * src/Makefile.in: Regenerate. * src/c++11/Makefile.am: Fix comment. * src/c++17/Makefile.am: Add makefile for new sub-directory. * src/c++17/Makefile.in: Generate. * src/c++17/memory_resource.cc: New. (newdel_res_t, null_res_t, constant_init, newdel_res, null_res) (default_res, new_delete_resource, null_memory_resource) (set_default_resource, get_default_resource): Define. * testsuite/20_util/memory_resource/1.cc: New test. * testsuite/20_util/memory_resource/2.cc: New test. * testsuite/20_util/monotonic_buffer_resource/1.cc: New test. * testsuite/20_util/monotonic_buffer_resource/allocate.cc: New test. * testsuite/20_util/monotonic_buffer_resource/deallocate.cc: New test. * testsuite/20_util/monotonic_buffer_resource/release.cc: New test. * testsuite/20_util/monotonic_buffer_resource/upstream_resource.cc: New test. * testsuite/20_util/polymorphic_allocator/1.cc: New test. * testsuite/20_util/polymorphic_allocator/resource.cc: New test. * testsuite/20_util/polymorphic_allocator/select.cc: New test. * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource): Define concrete memory resource for testing. (__gnu_test::default_resource_mgr): Define RAII helper for changing default resource. From-SVN: r262953
2018-07-17PR libstdc++/86450 use -Wabi=2 and simplify -Werror useJonathan Wakely1-57/+16
Use -Wabi=2 to fix warnings about -Wabi having no effect on its own. This requires suppressing two warnings in src/c++11/debug.cc which do not affect the library ABI. Previously libstdc++ defaulted to --enable-werror but the -Werror flag was not actually added unless --enable-maintainer-mode was used. This is not documented and not the expected behaviour. This removes any special treatment for maintainer-mode, makes -Werror depend directly on --enable-werror, and changes the default to --enable-werror=no. PR libstdc++/86450 * acinclude.m4 (GLIBCXX_CHECK_COMPILER_FEATURES): Don't define WERROR. (GLIBCXX_EXPORT_FLAGS): Use -Wabi=2 instead of -Wabi. * configure: Regenerate. * configure.ac: Change GLIBCXX_ENABLE_WERROR default to "no". * doc/Makefile.in: Regenerate. * fragment.am: Set WERROR_FLAG to -Werror instead of $(WERROR). * include/Makefile.in: Regenerate. * libsupc++/Makefile.in: Regenerate. * po/Makefile.in: Regenerate. * python/Makefile.in: Regenerate. * src/Makefile.in: Regenerate. * src/c++11/Makefile.in: Regenerate. * src/c++11/debug.cc: Use diagnostic pragmas to suppress warnings from -Wabi=2 that don't affect exported symbols. * src/c++98/Makefile.in: Regenerate. * src/filesystem/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. From-SVN: r262824
2018-06-21PR libstdc++/83328 add correct basic_string::insert for initializer_listJonathan Wakely1-1/+1
The SSO basic_string has a non-standard insert(iterator, initializer_list) overload, from a C++0x draft. This adds the correct overload, while also preserving the old one so that the old symbol is still exported from the library. The COW basic_string doesn't have any of the C++11 changes to the insert overloads (they all still have non-const iterator parameters and the ones that should return an iterator still return void). This doesn't make any change to the COW string. PR libstdc++/83328 * acinclude.m4 (libtool_VERSION): Bump to 6:26:0. * config/abi/pre/gnu.ver: Add GLIBCXX_3.4.26 and export new symbol. * configure: Regenerate. * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI] (basic_string::insert(const_iterator, initializer_list<C>)): Add. [_GLIBCXX_USE_CXX11_ABI && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS] (basic_string::insert(iterator, initializer_list<C>)): Suppress definition. * include/debug/string (basic_string::insert(iterator, C)): Change first parameter to const_iterator. (basic_string::insert(iterator, size_type, C)): Likewise. Change return type to iterator. (basic_string::insert(iterator, InputIterator, InputIterator)): Likewise. (basic_string::insert(iterator, initializer_list<C>)): Change first parameter to const_iterator and return type to iterator. * src/c++11/string-inst.cc: Extend comment. * testsuite/21_strings/basic_string/modifiers/insert/char/83328.cc: New. * testsuite/21_strings/basic_string/modifiers/insert/wchar_t/83328.cc: New. * testsuite/util/testsuite_abi.cc: Add new symbol version. From-SVN: r261866
2018-06-18crossconfig.m4: Handle OpenBSD just like NetBSD.Maya Rashish1-1/+1
2018-06-18 Maya Rashish <coypu@sdf.org> * crossconfig.m4: Handle OpenBSD just like NetBSD. * configure: Rebuilt. * config/alpha/openbsd.h (TARGET_DEFAULT): Define. (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise. (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise. * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from here to ... * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here. From-SVN: r261707
2018-06-18Fix bootstrap failure for bare metal due to autoconf link testsJonathan Wakely1-107/+264
The AC_CHECK_FUNCS tests cause the build to fail for bare metal cross compilers, where link tests are not allowed. Replace them with GCC_TRY_COMPILE_OR_LINK tests instead. Skip all the Filesystem dependency checks if not building the filesystem library. * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Only check when enable_libstdcxx_filesystem_ts = yes. Check for link, readlink and symlink. * config.h.in: Regenerate. * configure: Regenerate. * configure.ac: Remove AC_CHECK_FUNCS for link, readlink and symlink. From-SVN: r261704
2018-05-31PR libstdc++/78870 support std::filesystem on WindowsJonathan Wakely1-0/+13
PR libstdc++/78870 support std::filesystem on Windows * config.h.in: Regenerate. * configure: Regenerate. * configure.ac: Check for link, readlink and symlink. * include/bits/fs_path.h (path::operator/=(const path&)): Move definition out of class body. (path::is_absolute(), path::_M_append(path)): Likewise. (operator<<(basic_ostream, const path&)): Use std::quoted directly. (operator>>(basic_istream, path&)): Likewise. (u8path): Reorder definitions and fix Windows implementation. (path::is_absolute()): Define inline and fix for Windows. [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)): Define POSIX version inline. (path::_M_append(path)): Define inline. * include/experimental/bits/fs_path.h (path::is_absolute()): Move definition out of class body. (operator<<(basic_ostream, const path&)): Fix type of delimiter and escape characters. (operator>>(basic_istream, path&)): Likewise. (path::is_absolute()): Define inline and fix for Windows. * src/filesystem/dir-common.h (__gnu_posix): New namespace. (__gnu_posix::char_type, __gnu_posix::DIR, __gnu_posix::dirent) (__gnu_posix::opendir, __gnu_posix::readdir, __gnu_posix::closedir): Define as adaptors for Windows functions/types or as using-declarations for POSIX functions/types. (_Dir_base, get_file_type): Qualify names to use declarations from __gnu_posix namespace. (_Dir_base::is_dor_or_dotdot): New helper functions. * src/filesystem/dir.cc (_Dir, recursive_directory_iterator): Qualify names to use declarations from __gnu_posix namespace. * src/filesystem/ops-common.h (__gnu_posix): New nested namespace. (__gnu_posix::open, __gnu_posix::close, __gnu_posix::stat_type) (__gnu_posix::stat, __gnu_posix::lstat, __gnu_posix::mode_t) (__gnu_posix::chmod, __gnu_posix::mkdir, __gnu_posix::getcwd) (__gnu_posix::chdir, __gnu_posix::utimbuf, __gnu_posix::utime) (__gnu_posix::rename, __gnu_posix::truncate, __gnu_posix::char_type): Define as adaptors for Windows functions/types or as using-declarations for POSIX functions/types. (stat_type, do_copy_file): Qualify names to use declarations from __gnu_posix namespace. (do_space): Declare new function. (make_file_type): Only use S_ISLNK if defined. * src/filesystem/ops.cc (char_ptr, filesystem::canonical): Use path::value_type not char. (filesystem::copy, create_dir, filesystem::create_directory): Qualify names to use declarations from __gnu_posix namespace. (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and add implementation for Windows. (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro. (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd. [!_PC_PATH_MAX]: Don't use pathconf. [PATH_MAX]: Use if defined. (filesystem::current_path(const path&, error_code&)) (filesystem::equivalent, do_stat, filesystem::hard_link_count) (filesystem::last_write_time, filesystem::permissions): Use names from __gnu_posix. (filesystem::read_symlink): Check HAVE_READLINK autoconf macro. (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add implementation for Windows. (filesystem::rename, filesystem::resize_file): Use names from __gnu_posix. (filesystem::space): Use do_space. [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Get absolute path to directory. (filesystem::status, filesystem::symlink_status): Use names from __gnu_posix. (filesystem::temp_directory_path): Add implementation for Windows. * src/filesystem/path.cc (dot): Define constant. (path::replace_extension): Use dot. (path::_M_find_extension): Likewise. Use path::string_type not std::string. (path::_M_split_cmpts): Use dot. (filesystem_error::_M_get_what): Use u8string() not native(). * src/filesystem/std-dir.cc (_Dir, recursive_directory_iterator): Qualify names to use declarations from __gnu_posix namespace. * src/filesystem/std-ops.cc (filesystem::absolute(const path&)): Use correct error_code. (filesystem::absolute(const path&, error_code&)): Add implementation for Windows. (char_ptr, filesystem::canonical): Use path::value_type not char. (do_copy_file): Use names from __gnu_posix. [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Do not use fchmod, fchmodat or sendfile. (filesystem::copy, create_dir, filesystem::create_directory): Qualify names to use declarations from __gnu_posix namespace. (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and add implementation for Windows. (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro. (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd. [!_PC_PATH_MAX]: Don't use pathconf. [PATH_MAX]: Use if defined. (filesystem::current_path(const path&, error_code&)) (filesystem::equivalent, do_stat, filesystem::hard_link_count) (filesystem::last_write_time, filesystem::permissions): Use names from __gnu_posix. (filesystem::read_symlink): Check HAVE_READLINK autoconf macro. (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add implementation for Windows. (filesystem::rename, filesystem::resize_file): Use names from __gnu_posix. (do_space): Define. (filesystem::space): Use do_space. (filesystem::status, filesystem::symlink_status): Use names from __gnu_posix. (filesystem::temp_directory_path): Add implementation for Windows. * src/filesystem/std-path.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)): Define for Windows. (dot): Define constant. (path::replace_extension, is_dot): Use dot. (path::lexically_normal): Check _M_type instead of calling non-existent function. (path::_M_find_extension): Use dot. Use path::string_type not std::string. (path::_M_split_cmpts): Use dot. (filesystem_error::_M_get_what): Use u8string() not native(). * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Do not use symlinks. * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc: Likewise. * testsuite/27_io/filesystem/operations/absolute.cc: Use __gnu_test::root_path() instead of "/" and add Windows-specific tests. * testsuite/27_io/filesystem/operations/canonical.cc: Use path::string() to get narrow string, not path::native(). * testsuite/27_io/filesystem/operations/copy.cc: Construct fstreams with std::filesystem::path not std::basic_string. * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise. * testsuite/27_io/filesystem/operations/exists.cc: Use __gnu_test::root_path() instead of "/". * testsuite/27_io/filesystem/operations/is_empty.cc: Construct fstreams with std::filesystem::path not std::basic_string. * testsuite/27_io/filesystem/operations/last_write_time.cc: Use path::string() to get narrow string. * testsuite/27_io/filesystem/operations/space.cc: Check results for errors, expect sensible values otherwise. * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Add helpers for adjusting the environment on Windows. * testsuite/27_io/filesystem/path/append/path.cc: Test Windows-specific behaviour. * testsuite/27_io/filesystem/path/construct/format.cc: Fix creation of path::string_type objects. * testsuite/27_io/filesystem/path/construct/locale.cc: Compare native string to wide string on Windows. * testsuite/27_io/filesystem/path/decompose/root_directory.cc: Allow for backslash as root-directory. * testsuite/27_io/filesystem/path/decompose/stem.cc: Use path::string() to get narrow string. * testsuite/27_io/filesystem/path/itr/traversal.cc: Test Windows-style paths. * testsuite/27_io/filesystem/path/native/string.cc: Use string_type not std::string. * testsuite/27_io/filesystem/path/query/is_absolute.cc: Adjust for different definintion of absolute paths on Windows. * testsuite/experimental/filesystem/iterators/directory_iterator.cc: Do not use symlinks. * testsuite/experimental/filesystem/operations/absolute.cc: Test Windows behaviour. * testsuite/experimental/filesystem/operations/copy.cc: Construct fstreams with NTCTS not std::basic_string. * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise. * testsuite/experimental/filesystem/operations/exists.cc: Use __gnu_test::root_path() instead of "/". * testsuite/experimental/filesystem/operations/is_empty.cc: Construct fstreams with NTCTS not std::basic_string. * testsuite/experimental/filesystem/operations/last_write_time.cc: Use path::string() to get narrow string. * testsuite/experimental/filesystem/operations/space.cc: Use __gnu_test::root_path() instead of "/". * testsuite/experimental/filesystem/operations/temp_directory_path.cc: Add helpers for adjusting the environment on Windows. * testsuite/experimental/filesystem/path/append/path.cc: Use path::string() to get narrow strings for comparisons. * testsuite/experimental/filesystem/path/concat/path.cc: Likewise. * testsuite/experimental/filesystem/path/decompose/root_directory.cc: Likewise. * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise. * testsuite/experimental/filesystem/path/native/string.cc: Use string_type not std::string. * testsuite/experimental/filesystem/path/query/is_absolute.cc: Adjust for different definintion of absolute paths on Windows. * testsuite/util/testsuite_fs.h (__gnu_test::root_path()): New function. (__gnu_test::scoped_file): Construct fstreams with NTCTS not std::basic_string. From-SVN: r261034
2018-05-24PR target/85904 check for aligned_alloc on netbsd cross-compilationMaya Rashish1-0/+13
2018-05-24 Maya Rashish <coypu@sdf.org> PR target/85904 * crossconfig.m4: Test for aligned_alloc on netbsd. * configure: Regenerate. From-SVN: r260678
2018-05-21Add support for opening file streams from wide character stringsJonathan Wakely1-0/+22
C++17 added new overloads to <fstream> class templates to support opening files from wide character strings "on systems where filesystem::path::value_type is not char". This patch adds those overloads conditional on _wfopen being available, and enables them for pre-C++17 modes as well. Add support for opening file streams from wide character strings. * config/io/basic_file_stdio.cc [_GLIBCXX_HAVE__WFOPEN] (__basic_file<char>::open(const wchar_t*, ios_base::openmode)): Define new overload. * config/io/basic_file_stdio.h [_GLIBCXX_HAVE__WFOPEN] (__basic_file<char>::open(const wchar_t*, ios_base::openmode)): Declare new overload. * configure.ac: Check for _wfopen. * crossconfig.m4: Likewise. * configure: Regenerate. * config.h.in: Regenerate. * include/bits/fstream.tcc [_GLIBCXX_HAVE__WFOPEN] (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)): Define new overload. * include/std/fstream [_GLIBCXX_HAVE__WFOPEN] (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)): Declare new overload. [_GLIBCXX_HAVE__WFOPEN] (basic_ifstream<C,T>::basic_ifstream(const wchar_t*, openmode)) (basic_ifstream<C,T>::basic_open(const wchar_t*, openmode)) (basic_ofstream<C,T>::basic_ifstream(const wchar_t*, openmode)) (basic_ofstream<C,T>::basic_open(const wchar_t*, openmode)) (basic_fstream<C,T>::basic_ifstream(const wchar_t*, openmode)) (basic_fstream<C,T>::basic_open(const wchar_t*, openmode)): Define new overloads. * testsuite/27_io/basic_filebuf/open/wchar_t/1.cc: New. * testsuite/27_io/basic_ifstream/cons/wchar_t/1.cc: New. * testsuite/27_io/basic_ifstream/open/wchar_t/1.cc: New. * testsuite/27_io/basic_ofstream/cons/wchar_t/1.cc: New. * testsuite/27_io/basic_ofstream/open/wchar_t/1.cc: New. * testsuite/27_io/basic_fstream/cons/wchar_t/1.cc: New. * testsuite/27_io/basic_fstream/open/wchar_t/1.cc: New. From-SVN: r260479
2018-05-01PR libstdc++/84654 Disable __float128 specializations for -mno-float128Tulio Magno Quites Machado Filho1-12/+25
2018-05-01 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com> PR libstdc++/84654 * acinclude.m4: Set ENABLE_FLOAT128 instead of _GLIBCXX_USE_FLOAT128. * config.h.in: Remove references to _GLIBCXX_USE_FLOAT128. * configure: Regenerate. * include/Makefile.am: Replace the value of _GLIBCXX_USE_FLOAT128 based on ENABLE_FLOAT128. * include/Makefile.in: Regenerate. * include/bits/c++config: Define _GLIBCXX_USE_FLOAT128. [!defined(__FLOAT128__) && !defined(__SIZEOF_FLOAT128__)]: Undefine _GLIBCXX_USE_FLOAT128. From-SVN: r259813
2018-04-24Regenerate configure of target librariesH.J. Lu1-1/+1
* configure: Regenerated. From-SVN: r259610
2018-04-19cet.m4 (GCC_CET_FLAGS): Default to --disable-cet, replace ↵Jakub Jelinek1-14/+13
--enable-cet=default with --enable-cet=auto. * config/cet.m4 (GCC_CET_FLAGS): Default to --disable-cet, replace --enable-cet=default with --enable-cet=auto. * doc/install.texi: Document --disable-cet being the default and --enable-cet=auto. * configure: Regenerated. From-SVN: r259487