Commit Graph

849 Commits

Author SHA1 Message Date
Jonathan Wakely 86f73527aa Skip libstdc++ debug build in early bootstrap stages
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-20 15:17:57 +01:00
Jonathan Wakely 2b32668568 PR libstdc++/90770 fix missing src/debug/Makefile
PR libstdc++/90770
	* configure: Regenerate.
	* src/Makefile.am (stamp-debug): Also test for missing makefile.
	* src/Makefile.in: Regenerate.

From-SVN: r272050
2019-06-07 20:57:19 +01:00
Jonathan Wakely b0c0d878a8 PR libstdc++/85494 use rdseed and rand_s in std::random_device
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-05-29 15:45:35 +01:00
Jonathan Wakely 187fdaea67 PR libstdc++/89460 Fix Networking TS test failures on HP-UX
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-03-11 16:28:11 +00:00
Jonathan Wakely a4395a846a PR libstdc++/89466 avoid slow xsltproc command in configure
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-27 11:25:44 +00:00
Jonathan Wakely a61ae535c3 Add std::timespec and std::timespec_get for C++17
* 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-02-14 14:10:25 +00:00
Jonathan Wakely cf4b581f2e Fix build for systems without POSIX truncate
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-07 12:38:51 +00:00
Jonathan Wakely de4db54fd9 PR libstdc++/86756 Move rest of std::filesystem to libstdc++.so
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
2019-01-06 22:34:37 +00:00
Jonathan Wakely da29d2a36e PR libstdc++/67843 set shared_ptr lock policy at build-time
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-27 23:25:56 +00:00
Hafiz Abid Qadeer e9f3803db3 iconv.m4 (AM_ICONV_LINK): Don't overwrite CPPFLAGS.
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-11-07 15:41:21 -07:00
Joseph Myers 22e0527251 Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856).
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-31 17:03:16 +00:00
Jonathan Wakely 82a0f2fd10 Use autoconf to check for features needed by Networking TS
* 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-16 17:12:32 +01:00
Jonathan Wakely 5ae2c32a8a Define _GLIBCXX_USE_DEV_RANDOM as replacement for _GLIBCXX_USE_RANDOM_TR1
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-10-16 15:49:29 +01:00
Jonathan Wakely 9db03bee15 Revert "libstdc++-v3: Have aligned_alloc() on Newlib"
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-13 19:54:21 +01:00
Sebastian Huber ee6ad3e788 libstdc++-v3: Have aligned_alloc() on Newlib
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-10 06:27:35 +00:00
Jonathan Wakely 9fbd2e55a1 Add -D_GLIBCXX_ASSERTIONS to DEBUG_FLAGS
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-08-01 20:52:46 +01:00
Jonathan Wakely dfaa3c47cc Add initial version of C++17 <memory_resource> header
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-24 22:09:55 +01:00
Jonathan Wakely c3be340eb6 PR libstdc++/86450 use -Wabi=2 and simplify -Werror use
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-07-17 14:18:47 +01:00
Jonathan Wakely cda121ac7a PR libstdc++/83328 add correct basic_string::insert for initializer_list
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-21 23:01:25 +01:00
Maya Rashish 4f9eae9fd8 crossconfig.m4: Handle OpenBSD just like NetBSD.
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-18 11:28:53 -06:00
Jonathan Wakely 7314856c61 Fix bootstrap failure for bare metal due to autoconf link tests
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-06-18 17:01:24 +01:00
Jonathan Wakely 9534a5e62d PR libstdc++/78870 support std::filesystem on Windows
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-31 20:20:24 +01:00
Maya Rashish 95c921d18c PR target/85904 check for aligned_alloc on netbsd cross-compilation
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-24 18:31:13 +01:00
Jonathan Wakely b02923592a Add support for opening file streams from wide character strings
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-21 18:18:35 +01:00
Tulio Magno Quites Machado Filho f421e442c6 PR libstdc++/84654 Disable __float128 specializations for -mno-float128
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-05-01 23:47:33 +01:00
H.J. Lu 7b47ecf2f7 Regenerate configure of target libraries
* configure: Regenerated.

From-SVN: r259610
2018-04-24 09:45:26 -07:00
Jakub Jelinek a0e1df888d cet.m4 (GCC_CET_FLAGS): Default to --disable-cet, replace --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
2018-04-19 09:45:51 +02:00
David Malcolm 001ddaa852 re PR jit/85384 (libgccjit does not work if --with-gcc-major-version is used)
PR jit/85384
	* acx.m4 (GCC_BASE_VER): Remove \$\$ from sed expression.

	* configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
	by using gcc_base_ver to generate a gcc_driver_version, and use
	it when generating GCC_DRIVER_NAME.
	* configure: Regenerate.

	* configure: Regenerate.

From-SVN: r259462
2018-04-18 11:46:58 +02:00
Jonathan Wakely 97ca95ac6f PR libstdc++/84773 use aligned alloc functions for FreeBSD and MinGW cross-compilers
PR libstdc++/84773
	PR libstdc++/83662
	* crossconfig.m4: Check for aligned_alloc etc. on freebsd and mingw32.
	* configure: Regenerate.
	* include/c_global/cstdlib [_GLIBCXX_HAVE_ALIGNED_ALLOC]
	(aligned_alloc): Add using-declaration.
	* testsuite/18_support/aligned_alloc/aligned_alloc.cc: New test.

From-SVN: r258468
2018-03-12 22:52:16 +00:00
Igor Tsimbalist 14e335edc8 CET shouldn't be enabled in 32-bit run-time libraries by defualt
ENDBR32 and RDSSPD are multi-byte NOPs on x86-64 processors and
newer x86 processors, starting Pentium Pro.  They are UD on older
32-bit processors. Detect this at configure time and adjust the
default value for enable_cet. GCC will enable CET in 32-bit run-time
libraries in any case if --enable-cet is used to configure GCC.

	PR target/84148
	* config/cet.m4: Check if target support multi-byte NOPS (SSE).
	* libatomic/configure: Regenerate.
	* libbacktrace/configure: Likewise.
	* libgcc/configure: Likewise.
	* libgfortran/configure: Likewise.
	* libgomp/configure: Likewise.
	* libitm/configure: Likewise.
	* libmpx/configure: Likewise.
	* libobjc/configure: Likewise.
	* libquadmath/configure: Likewise.
	* libsanitizer/configure: Likewise.
	* libssp/configure: Likewise.
	* libstdc++-v3/configure: Likewise.
	* libvtv/configure: Likewise.

From-SVN: r257809
2018-02-19 17:25:49 +01:00
Jonathan Wakely 51f174c0ef PR libstdc++/81797 Add .NOTPARALLEL to include/Makefile for darwin
PR libstdc++/81797
	* configure.ac (INCLUDE_DIR_NOTPARALLEL): Define.
	* configure: Regenerate.
	* include/Makefile.am (INCLUDE_DIR_NOTPARALLEL): Add .NOTPARALLEL when
	defined.
	* include/Makefile.in: Regenerate.

From-SVN: r257710
2018-02-15 20:56:41 +00:00
Uros Bizjak dac867c90a configure.ac (AC_CHECK_HEADERS): Add linux/types.h.
* configure.ac (AC_CHECK_HEADERS): Add linux/types.h.  Conditionally
	include linux/types.h when checking linux/random.h header.
	* config.h.in: Regenerate.
	* configure: Ditto.
	* src/c++11/random.cc: Conditionally include linux/types.h.

From-SVN: r256859
2018-01-18 20:52:16 +01:00
Sebastian Huber b76602dcf2 RTEMS: Enable some libstdc++ features
libstdc++/

	* acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Add rtems*.
	(GLIBCXX_ENABLE_FILESYSTEM_TS): Likewise.
	* configure: Regenerate.

From-SVN: r254985
2017-11-21 06:22:13 +00:00
Igor Tsimbalist 36101de964 Enable building libstdc++-v3 with Intel CET
libstdc++-v3/
	* acinclude.m4: Add cet.m4.
	* configure.ac: Set CET_FLAGS. Update EXTRA_CFLAGS,
	EXTRA_CXX_FLAGS.
	* libsupc++/Makefile.am: Use Add EXTRA_CFLAGS.
	* 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++98/Makefile.in: Likewise.
	* src/filesystem/Makefile.in: Likewise.
	* testsuite/Makefile.in: Likewise.

From-SVN: r254895
2017-11-17 22:28:10 +01:00
Jonathan Wakely ed39d22d1b PR libstdc++/81092 Regenerate configure for libtool_VERSION change
PR libstdc++/81092
	* configure: Regenerate.

From-SVN: r249438
2017-06-21 09:55:26 +01:00
Rainer Orth e34fd4dc1c Fix cross compilation to Solaris
(GLIBCXX_CROSSCONFIG): Handle *-solaris* like *-linux* etc.
	Remove *-solaris* section.
	* configure: Regenerate.

From-SVN: r248791
2017-06-01 13:50:03 +00:00
Xi Ruoyao 78aa76df40 PR libstdc++/67578 Implement non-trivial std::random_device::entropy
2017-05-23  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
	    Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/67578
	* acinclude.m4: Bump libtool_VERSION.
	* config/abi/pre/gnu.ver: Create GLIBCXX_3.4.24 with new symbol.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* configure.ac: Add test for <linux/random.h>.
	* doc/xml/manual/abi.xml: Document new library version.
	* include/bits/random.h (random_device::entropy)
	[_GLIBCXX_USE_RANDOM_TR1]: Add call to new _M_getentropy member.
	(random_device::_M_getentropy): Declare.
	* src/c++11/random.cc (random_device::_M_getentropy): Define.
	* testsuite/util/testsuite_abi.cc: Add GLIBCXX_3.4.24 to known
	versions, and make it the latest version.

Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>

From-SVN: r248374
2017-05-23 17:11:57 +01:00
Jonathan Wakely ba1a69079f Regenerate libstdc++-v3/configure for versioned-namespace soname
* configure: Regenerate.

From-SVN: r248107
2017-05-16 14:12:16 +01:00
Jonathan Wakely 64e1a55de1 Fix typo in config.h.in comment
* acinclude.m4 (GLIBCXX_CHECK_S_ISREG_OR_S_IFREG): Fix typo in
	comment.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.

From-SVN: r246165
2017-03-15 15:23:44 +00:00
George Lander 74106ead26 [libstdc++-v3] Fix detection of obsolete isnan
libstdc++-v3 configure checks whether old glibc inline definitions
of isnan would conflict with the libstdc++-v3 definitions and
works around them if so.  But if g++ 6.x build A is used to build
another g++ 6.x B, the configure step for B will pick up the math.h
installed alongside A instead of the glibc version.  configure will
then assume that the workaround isn't necessary, leaving B with a
broken cmath.

isinf already worked around this.  This patch extends the same fix
to isnan.  (Thanks to George for the fix.)

libstdc++-v3/
2017-03-10  George Lander  <george.lander@arm.com>

	* acinclude.m4 (glibcxx_cv_obsolete_isnan): Define
	_GLIBCXX_INCLUDE_NEXT_C_HEADERS before including math.h.
	* configure: Regenerate.

From-SVN: r246025
2017-03-10 12:22:45 +00:00
Joe Seymour f14d2c52d4 Support unsigned __int20 in checks for size_t mangling
2017-01-20  Joe Seymour  <joe.s@somniumtech.com>

	* acinclude.m4 (GLIBCXX_CHECK_SIZE_T_MANGLING): Support uint20_t.
	* configure: Regenerate.

From-SVN: r244727
2017-01-20 17:46:36 +00:00
Joshua Conner 93f90f7bd5 crossconfig.m4: Add fuchsia OS.
2017-01-17  Joshua Conner  <joshconner@google.com>

	* crossconfig.m4: Add fuchsia OS.
	* configure: Regenerate.

From-SVN: r244557
2017-01-17 23:36:12 +00:00
Jakub Jelinek 3c36aa6ba2 re PR other/79046 (g++ -print-file-name=plugin uses full version number in path)
PR other/79046
	* configure: Regenerated.
config/
	* acx.m4 (GCC_BASE_VER): New m4 function.
	(ACX_TOOL_DIRS): Require GCC_BASE_VER, for
	--with-gcc-major-version-only use just major number from BASE-VER.
gcc/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
	version from BASE-VER file.
	(CFLAGS-gcc.o): Add -DBASEVER=$(BASEVER_s).
	(gcc.o): Depend on $(BASEVER).
	* common.opt (dumpfullversion): New option.
	* gcc.c (driver_handle_option): Handle OPT_dumpfullversion.
	* doc/invoke.texi: Document -dumpfullversion.
	* doc/install.texi: Document --with-gcc-major-version-only.
	* configure: Regenerated.
libatomic/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* testsuite/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libgomp/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* testsuite/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libgcc/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
	version from BASE-VER file.
	* configure: Regenerated.
libssp/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
liboffloadmic/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* aclocal.m4: Include ../config/acx.m4.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libquadmath/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libmpx/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libada/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
	version from BASE-VER file.
	* configure: Regenerated.
lto-plugin/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libitm/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* testsuite/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
fixincludes/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
libcilkrts/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* aclocal.m4: Include ../config/acx.m4.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libcc1/
	* configure.ac: Add GCC_BASE_VER.  For --with-gcc-major-version-only
	use just major number from BASE-VER.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libobjc/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
libstdc++-v3/
	* configure.ac: Add GCC_BASE_VER.
	* fragment.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* po/Makefile.in: Regenerated.
	* libsupc++/Makefile.in: Regenerated.
	* testsuite/Makefile.in: Regenerated.
	* src/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
	* include/Makefile.in: Regenerated.
	* doc/Makefile.in: Regenerated.
	* python/Makefile.in: Regenerated.
	* src/c++11/Makefile.in: Regenerated.
	* src/c++98/Makefile.in: Regenerated.
	* src/filesystem/Makefile.in: Regenerated.
libvtv/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* testsuite/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libsanitizer/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* libbacktrace/Makefile.in: Regenerated.
	* interception/Makefile.in: Regenerated.
	* asan/Makefile.in: Regenerated.
	* ubsan/Makefile.in: Regenerated.
	* configure: Regenerated.
	* sanitizer_common/Makefile.in: Regenerated.
	* lsan/Makefile.in: Regenerated.
	* Makefile.in: Regenerated.
	* tsan/Makefile.in: Regenerated.
libgfortran/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.

From-SVN: r244521
2017-01-17 10:38:48 +01:00
Jonathan Wakely a7765de8ef PR79017 workaround incomplete C99 math on darwin
PR libstdc++/79017
	* acinclude.m4 (GLIBCXX_CHECK_C99_TR1): Check for llrint and llround
	functions separately on darwin and if they're missing define
	_GLIBCXX_NO_C99_ROUNDING_FUNCS.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* include/c_global/cmath [_GLIBCXX_NO_C99_ROUNDING_FUNCS] (llrint)
	(llrintf, llrintl, llround, llroundf, llroundl): Do not define.

From-SVN: r244231
2017-01-09 17:15:58 +00:00
Jonathan Wakely ea4ad78e2c Check for __cxa_thread_atexit for freebsd crosses
PR libstdc++/78968
	* crossconfig.m4: Check for __cxa_thread_atexit on *-*-freebsd*.
	* configure: Regenerate.

From-SVN: r244169
2017-01-06 17:06:24 +00:00
Rainer Orth 1ec62aa9e1 Build libgo with -Wa,-nH if possible (PR go/78978) [non-libgo parts]
libstdc++-v3:
	PR go/78978
	* acinclude.m4 (GLIBCXX_CHECK_ASSEMBLER_HWCAP): Remove.
	* configure.ac: Call GCC_CHECK_ASSEMBLER_HWCAP instead of
	GLIBCXX_CHECK_ASSEMBLER_HWCAP.
	* fragment.am (CONFIG_CXXFLAGS): Use HWCAP_CFLAGS instead of
	HWCAP_FLAGS.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* Makefile.in, 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++98/Makefile.in,
	src/filesystem/Makefile.in, testsuite/Makefile.in: Regenerate.

	config:
	PR go/78978
	* hwcaps.m4 (GCC_CHECK_ASSEMBLER_HWCAP): New macro.

From-SVN: r244162
2017-01-06 14:33:47 +00:00
Jonathan Wakely 2a792efe7f PR78968 add configure check for __cxa_thread_atexit in libc
PR libstdc++/78968
	* config.h.in: Regenerate.
	* configure: Likewise.
	* configure.ac: Check for __cxa_thread_atexit.
	* libsupc++/atexit_thread.cc [_GLIBCXX_HAVE___CXA_THREAD_ATEXIT]:
	Don't define __cxa_thread_atexit if libc provides it.

From-SVN: r244057
2017-01-04 15:41:19 +00:00
Pauli Nieminen ed3cb49703 Support exception propagation without lock-free atomic int
2017-01-04  Pauli Nieminen  <suokkos@gmail.com>
	    Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/64735
	* acinclude.m4 (GLIBCXX_CHECK_EXCEPTION_PTR_SYMVER): Define.
	* config.h.in: Regenerate.
	* config/abi/pre/gnu.ver [HAVE_EXCEPTION_PTR_SINCE_GCC46]
	(GLIBCXX_3.4.15, GLIBCXX_3.4.21, CXXABI_1.3.3, CXXABI_1.3.5): Make
	exports for exception_ptr, nested_exception, and future conditional.
	[HAVE_EXCEPTION_PTR_SINCE_GCC46] (GLIBCXX_3.4.23, CXXABI_1.3.11): Add
	exports for exception_ptr, nested_exception, and future conditional.
	* configure: Regenerate.
	* configure.ac: Use GLIBCXX_CHECK_EXCEPTION_PTR_SYMVER.
	* include/std/future: Remove check for ATOMIC_INT_LOCK_FREE
	* libsupc++/eh_atomics.h: New file for internal use only.
	(__eh_atomic_inc, __eh_atomic_dec): New.
	* libsupc++/eh_ptr.cc (exception_ptr::_M_addref)
	(exception_ptr::_M_release) (__gxx_dependent_exception_cleanup)
	(rethrow_exception): Use eh_atomics.h reference counting helpers.
	* libsupc++/eh_throw.cc (__gxx_exception_cleanup): Likewise.
	* libsupc++/eh_tm.cc (free_any_cxa_exception): Likewise.
	* libsupc++/exception: Remove check for ATOMIC_INT_LOCK_FREE.
	* libsupc++/exception_ptr.h: Likewise.
	* libsupc++/guard.cc: Include header for ATOMIC_INT_LOCK_FREE macro.
	* libsupc++/nested_exception.cc: Remove check for
	ATOMIC_INT_LOCK_FREE.
	* libsupc++/nested_exception.h: Likewise.
	* src/c++11/future.cc: Likewise.
	* testsuite/18_support/exception_ptr/*: Remove atomic builtins checks.
	* testsuite/18_support/nested_exception/*: Likewise.
	* testsuite/30_threads/async/*: Likewise.
	* testsuite/30_threads/future/*: Likewise.
	* testsuite/30_threads/headers/future/types_std_c++0x.cc: Likewise.
	* testsuite/30_threads/packaged_task/*: Likewise.
	* testsuite/30_threads/promise/*: Likewise.
	* testsuite/30_threads/shared_future/*: Likewise.

Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>

From-SVN: r244051
2017-01-04 10:54:59 +00:00
Felipe Magno de Almeida 6649ad7efd Enable libstdc++ compilation on AVR targets
Enable libstdc++ compilation in AVR targets with AVR-Libc. Most
floating point math functions are already defined in AVR-Libc, so
defines are in place to avoid multiple definition of these functions.

2016-12-06  Felipe Magno de Almeida  <felipe@expertisesolutions.com.br>

	* crossconfig.m4: Add avr target for cross-compilation.
	* configure: Regenerate.

From-SVN: r243309
2016-12-06 17:58:05 +00:00
Bernd Edlinger 77e6870d7f crossconfig.m4 (*-linux*): Add link-check for memalign.
2016-12-01  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * crossconfig.m4 (*-linux*): Add link-check for memalign.
        * configure: Regenerated.

From-SVN: r243095
2016-12-01 06:06:04 +00:00