aboutsummaryrefslogtreecommitdiff
path: root/c++tools
AgeCommit message (Collapse)AuthorFilesLines
2023-06-23Daily bump.GCC Administrator1-0/+5
2023-06-22configure: Implement --enable-host-bind-nowMarek Polacek2-0/+18
As promised in the --enable-host-pie patch, this patch adds another configure option, --enable-host-bind-now, which adds -z now when linking the compiler executables in order to extend hardening. BIND_NOW with RELRO allows the GOT to be marked RO; this prevents GOT modification attacks. This option does not affect linking of target libraries; you can use LDFLAGS_FOR_TARGET=-Wl,-z,relro,-z,now to enable RELRO/BIND_NOW. With this patch: $ readelf -Wd cc1{,plus,obj,gm2} f951 lto1 cpp rust1 gnat1 | grep FLAGS 0x000000000000001e (FLAGS) BIND_NOW 0x000000006ffffffb (FLAGS_1) Flags: NOW PIE 0x000000000000001e (FLAGS) BIND_NOW 0x000000006ffffffb (FLAGS_1) Flags: NOW PIE 0x000000000000001e (FLAGS) BIND_NOW 0x000000006ffffffb (FLAGS_1) Flags: NOW PIE 0x000000000000001e (FLAGS) BIND_NOW 0x000000006ffffffb (FLAGS_1) Flags: NOW PIE 0x000000000000001e (FLAGS) BIND_NOW 0x000000006ffffffb (FLAGS_1) Flags: NOW PIE 0x000000000000001e (FLAGS) BIND_NOW 0x000000006ffffffb (FLAGS_1) Flags: NOW PIE 0x000000000000001e (FLAGS) BIND_NOW 0x000000006ffffffb (FLAGS_1) Flags: NOW PIE 0x000000000000001e (FLAGS) BIND_NOW 0x000000006ffffffb (FLAGS_1) Flags: NOW PIE 0x000000000000001e (FLAGS) BIND_NOW 0x000000006ffffffb (FLAGS_1) Flags: NOW PIE c++tools/ChangeLog: * configure.ac (--enable-host-bind-now): New check. * configure: Regenerate. gcc/ChangeLog: * configure.ac (--enable-host-bind-now): New check. Add -Wl,-z,now to LD_PICFLAG if --enable-host-bind-now. * configure: Regenerate. * doc/install.texi: Document --enable-host-bind-now. lto-plugin/ChangeLog: * configure.ac (--enable-host-bind-now): New check. Link with -z,now. * configure: Regenerate.
2023-06-16Daily bump.GCC Administrator1-0/+8
2023-06-15configure: Implement --enable-host-pieMarek Polacek3-8/+31
[ This is my third attempt to add this configure option. The first version was approved but it came too late in the development cycle. The second version was also approved, but I had to revert it: <https://gcc.gnu.org/pipermail/gcc-patches/2022-November/607082.html>. I've fixed the problem (by moving $(PICFLAG) from INTERNAL_CFLAGS to ALL_COMPILERFLAGS). Another change is that since r13-4536 I no longer need to touch Makefile.def, so this patch is simplified. ] This patch implements the --enable-host-pie configure option which makes the compiler executables PIE. This can be used to enhance protection against ROP attacks, and can be viewed as part of a wider trend to harden binaries. It is similar to the option --enable-host-shared, except that --e-h-s won't add -shared to the linker flags whereas --e-h-p will add -pie. It is different from --enable-default-pie because that option just adds an implicit -fPIE/-pie when the compiler is invoked, but the compiler itself isn't PIE. Since r12-5768-gfe7c3ecf, PCH works well with PIE, so there are no PCH regressions. When building the compiler, the build process may use various in-tree libraries; these need to be built with -fPIE so that it's possible to use them when building a PIE. For instance, when --with-included-gettext is in effect, intl object files must be compiled with -fPIE. Similarly, when building in-tree gmp, isl, mpfr and mpc, they must be compiled with -fPIE. With this patch and --enable-host-pie used to configure gcc: $ file gcc/cc1{,plus,obj,gm2} gcc/f951 gcc/lto1 gcc/cpp gcc/go1 gcc/rust1 gcc/gnat1 gcc/cc1: ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=98e22cde129d304aa6f33e61b1c39e144aeb135e, for GNU/Linux 3.2.0, with debug_info, not stripped gcc/cc1plus: ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=859d1ea37e43dfe50c18fd4e3dd9a34bb1db8f77, for GNU/Linux 3.2.0, with debug_info, not stripped gcc/cc1obj: ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=1964f8ecee6163182bc26134e2ac1f324816e434, for GNU/Linux 3.2.0, with debug_info, not stripped gcc/cc1gm2: ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=a396672c7ff913d21855829202e7b02ecf42ff4c, for GNU/Linux 3.2.0, with debug_info, not stripped gcc/f951: ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=59c523db893186547ac75c7a71f48be0a461c06b, for GNU/Linux 3.2.0, with debug_info, not stripped gcc/lto1: ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=084a7b77df7be2d63c2d4c655b5bbc3fcdb6038d, for GNU/Linux 3.2.0, with debug_info, not stripped gcc/cpp: ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=3503bf8390d219a10d6653b8560aa21158132168, for GNU/Linux 3.2.0, with debug_info, not stripped gcc/go1: ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=988cc673af4fba5dcb482f4b34957b99050a68c5, for GNU/Linux 3.2.0, with debug_info, not stripped gcc/rust1: ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=b6a5d3d514446c4dcdee0707f086ab9b274a8a3c, for GNU/Linux 3.2.0, with debug_info, not stripped gcc/gnat1: ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=bb11ccdc2c366fe3fe0980476bcd8ca19b67f9dc, for GNU/Linux 3.2.0, with debug_info, not stripped I plan to add an option to link with -Wl,-z,now. Bootstrapped on x86_64-pc-linux-gnu with --with-included-gettext --enable-host-pie as well as without --enable-host-pie. Also tested on a Debian system where the system gcc was configured with --enable-default-pie. Co-Authored by: Iain Sandoe <iain@sandoe.co.uk> ChangeLog: * configure.ac (--enable-host-pie): New check. Set PICFLAG after this check. * configure: Regenerate. c++tools/ChangeLog: * Makefile.in: Rename PIEFLAG to PICFLAG. Set LD_PICFLAG. Use it. Use pic/libiberty.a if PICFLAG is set. * configure.ac (--enable-default-pie): Set PICFLAG instead of PIEFLAG. (--enable-host-pie): New check. * configure: Regenerate. fixincludes/ChangeLog: * Makefile.in: Set and use PICFLAG and LD_PICFLAG. Use the "pic" build of libiberty if PICFLAG is set. * configure.ac: * configure: Regenerate. gcc/ChangeLog: * Makefile.in: Set LD_PICFLAG. Use it. Set enable_host_pie. Remove NO_PIE_CFLAGS and NO_PIE_FLAG. Pass LD_PICFLAG to ALL_LINKERFLAGS. Use the "pic" build of libiberty if --enable-host-pie. * configure.ac (--enable-host-shared): Don't set PICFLAG here. (--enable-host-pie): New check. Set PICFLAG and LD_PICFLAG after this check. * configure: Regenerate. * doc/install.texi: Document --enable-host-pie. gcc/ada/ChangeLog: * gcc-interface/Make-lang.in (ALL_ADAFLAGS): Remove NO_PIE_CFLAGS. Add PICFLAG. Use PICFLAG when building ada/b_gnat1.o and ada/b_gnatb.o. * gcc-interface/Makefile.in: Use pic/libiberty.a if PICFLAG is set. Remove NO_PIE_FLAG. gcc/m2/ChangeLog: * Make-lang.in: New var, GM2_PICFLAGS. Use it. gcc/d/ChangeLog: * Make-lang.in: Remove NO_PIE_CFLAGS. intl/ChangeLog: * Makefile.in: Use @PICFLAG@ in COMPILE as well. * configure.ac (--enable-host-shared): Don't set PICFLAG here. (--enable-host-pie): New check. Set PICFLAG after this check. * configure: Regenerate. libcody/ChangeLog: * Makefile.in: Pass LD_PICFLAG to LDFLAGS. * configure.ac (--enable-host-shared): Don't set PICFLAG here. (--enable-host-pie): New check. Set PICFLAG and LD_PICFLAG after this check. * configure: Regenerate. libcpp/ChangeLog: * configure.ac (--enable-host-shared): Don't set PICFLAG here. (--enable-host-pie): New check. Set PICFLAG after this check. * configure: Regenerate. libdecnumber/ChangeLog: * configure.ac (--enable-host-shared): Don't set PICFLAG here. (--enable-host-pie): New check. Set PICFLAG after this check. * configure: Regenerate. libiberty/ChangeLog: * configure.ac: Also set shared when enable_host_pie. * configure: Regenerate. zlib/ChangeLog: * configure.ac (--enable-host-shared): Don't set PICFLAG here. (--enable-host-pie): New check. Set PICFLAG after this check. * configure: Regenerate.
2023-04-01Daily bump.GCC Administrator1-0/+9
2023-03-31c++tools: Fix Makefile to properly clean and rebuild [PR101834]Jonathan Wakely1-5/+7
The c++tools makefile doesn't remove progressively more files in each of mostlyclean, clean, and distclean. Instead, each removes a different set of files (and some files are not removed by any target). Use prerequisites so that everything is removed. Also, building in the $objdir/c++tools directory doesn't work, because the INSTALL variable is never set. It works when building from the top-level because INSTALL is set in the environment when recursively invoking make for sub-directories. c++tools/ChangeLog: PR bootstrap/101834 * Makefile.in (INSTALL): Set variable. (mostlyclean): Mark as a phony target. (clean): Add mostlyclean as a prerequisite. (distclean): Add clean as a prerequisite and remove more files. (maintainer-clean): Add distclean as a prerequisite.
2023-01-10Daily bump.GCC Administrator1-0/+6
2023-01-09Fix compilation of server.cc on hpux.John David Anglin1-0/+2
Select and FD_ISSET are declared in sys/time.h on most versions of hpux. As a result, HAVE_PSELECT and HAVE_SELECT can be 0. 2023-01-08 John David Anglin <danglin@gcc.gnu.org> c++tools/ChangeLog: PR other/107616 * server.cc (server): Don't call FD_ISSET when HAVE_PSELECT and HAVE_SELECT are zero.
2023-01-02Update copyright years.Jakub Jelinek5-6/+6
2023-01-02Update Copyright year in ChangeLog filesJakub Jelinek1-1/+1
2022 -> 2023
2022-11-24Daily bump.GCC Administrator1-0/+32
2022-11-22Revert "configure: Implement --enable-host-pie"Marek Polacek3-31/+8
This reverts commit 251c72a68af3a8b0638705b73ef120ffdf0053eb.
2022-11-22Revert "configure: Implement --enable-host-bind-now"Marek Polacek2-18/+0
This reverts commit 258d7149f92f19380c9f7763618d62408c064e60.
2022-11-22configure: Implement --enable-host-bind-nowMarek Polacek2-0/+18
As promised in the --enable-host-pie patch, this patch adds another configure option, --enable-host-bind-now, which adds -z now when linking the compiler executables in order to extend hardening. BIND_NOW with RELRO allows the GOT to be marked RO; this prevents GOT modification attacks. This option does not affect linking of target libraries; you can use LDFLAGS_FOR_TARGET=-Wl,-z,relro,-z,now to enable RELRO/BIND_NOW. c++tools/ChangeLog: * configure.ac (--enable-host-bind-now): New check. * configure: Regenerate. gcc/ChangeLog: * configure.ac (--enable-host-bind-now): New check. Add -Wl,-z,now to LD_PICFLAG if --enable-host-bind-now. * configure: Regenerate. * doc/install.texi: Document --enable-host-bind-now. lto-plugin/ChangeLog: * configure.ac (--enable-host-bind-now): New check. Link with -z,now. * configure: Regenerate.
2022-11-22configure: Implement --enable-host-pieMarek Polacek3-8/+31
This patch implements the --enable-host-pie configure option which makes the compiler executables PIE. This can be used to enhance protection against ROP attacks, and can be viewed as part of a wider trend to harden binaries. It is similar to the option --enable-host-shared, except that --e-h-s won't add -shared to the linker flags whereas --e-h-p will add -pie. It is different from --enable-default-pie because that option just adds an implicit -fPIE/-pie when the compiler is invoked, but the compiler itself isn't PIE. Since r12-5768-gfe7c3ecf, PCH works well with PIE, so there are no PCH regressions. When building the compiler, the build process may use various in-tree libraries; these need to be built with -fPIE so that it's possible to use them when building a PIE. For instance, when --with-included-gettext is in effect, intl object files must be compiled with -fPIE. Similarly, when building in-tree gmp, isl, mpfr and mpc, they must be compiled with -fPIE. I plan to add an option to link with -Wl,-z,now. ChangeLog: * Makefile.def: Pass $(PICFLAG) to AM_CFLAGS for gmp, mpfr, mpc, and isl. * Makefile.in: Regenerate. * Makefile.tpl: Set PICFLAG. * configure.ac (--enable-host-pie): New check. Set PICFLAG after this check. * configure: Regenerate. c++tools/ChangeLog: * Makefile.in: Rename PIEFLAG to PICFLAG. Set LD_PICFLAG. Use it. Use pic/libiberty.a if PICFLAG is set. * configure.ac (--enable-default-pie): Set PICFLAG instead of PIEFLAG. (--enable-host-pie): New check. * configure: Regenerate. fixincludes/ChangeLog: * Makefile.in: Set and use PICFLAG and LD_PICFLAG. Use the "pic" build of libiberty if PICFLAG is set. * configure.ac: * configure: Regenerate. gcc/ChangeLog: * Makefile.in: Set LD_PICFLAG. Use it. Set enable_host_pie. Remove NO_PIE_CFLAGS and NO_PIE_FLAG. Pass LD_PICFLAG to ALL_LINKERFLAGS. Use the "pic" build of libiberty if --enable-host-pie. * configure.ac (--enable-host-shared): Don't set PICFLAG here. (--enable-host-pie): New check. Set PICFLAG and LD_PICFLAG after this check. * configure: Regenerate. * doc/install.texi: Document --enable-host-pie. gcc/d/ChangeLog: * Make-lang.in: Remove NO_PIE_CFLAGS. intl/ChangeLog: * Makefile.in: Use @PICFLAG@ in COMPILE as well. * configure.ac (--enable-host-shared): Don't set PICFLAG here. (--enable-host-pie): New check. Set PICFLAG after this check. * configure: Regenerate. libcody/ChangeLog: * Makefile.in: Pass LD_PICFLAG to LDFLAGS. * configure.ac (--enable-host-shared): Don't set PICFLAG here. (--enable-host-pie): New check. Set PICFLAG and LD_PICFLAG after this check. * configure: Regenerate. libcpp/ChangeLog: * configure.ac (--enable-host-shared): Don't set PICFLAG here. (--enable-host-pie): New check. Set PICFLAG after this check. * configure: Regenerate. libdecnumber/ChangeLog: * configure.ac (--enable-host-shared): Don't set PICFLAG here. (--enable-host-pie): New check. Set PICFLAG after this check. * configure: Regenerate. libiberty/ChangeLog: * configure.ac: Also set shared when enable_host_pie. * configure: Regenerate. zlib/ChangeLog: * configure.ac (--enable-host-shared): Don't set PICFLAG here. (--enable-host-pie): New check. Set PICFLAG after this check. * configure: Regenerate.
2022-03-19Daily bump.GCC Administrator1-0/+4
2022-03-18c++tools: Work around a BSD bug in getaddrinfo().Iain Sandoe1-1/+5
Some versions of the BSD getaddrinfo() call do not work with the specific input of "0" for the servname entry (a segv results). Since we are making the call with a dummy port number, the value is actually no important, other than it should be in range. Work around the BSD bug by using "1" instead. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> c++tools/ChangeLog: * server.cc (accept_from): Use "1" as the dummy port number.
2022-01-03Update copyright years.Jakub Jelinek5-6/+6
2022-01-03Update Copyright in ChangeLog filesJakub Jelinek1-1/+1
Do this separately from all other Copyright updates, as ChangeLog files can be modified only separately.
2021-10-27Daily bump.GCC Administrator1-0/+5
2021-10-26c++tools: Fix memory leakJonathan Wakely1-6/+8
The allocated memory is not freed when returning early due to an error. c++tools/ChangeLog: * resolver.cc (module_resolver::read_tuple_file): Use unique_ptr to ensure memory is freed before returning.
2021-10-23Daily bump.GCC Administrator1-0/+5
2021-10-22Add install-dvi Makefile targets.Eric Gallager1-0/+1
Closes #102663 ChangeLog: PR other/102663 * Makefile.def: Handle install-dvi target. * Makefile.tpl: Likewise. * Makefile.in: Regenerate. c++tools/ChangeLog: PR other/102663 * Makefile.in: Add dummy install-dvi target. gcc/ChangeLog: PR other/102663 * Makefile.in: Handle dvidir and install-dvi target. * configure: Regenerate. * configure.ac: Add install-dvi to target_list. gcc/ada/ChangeLog: PR other/102663 * gcc-interface/Make-lang.in: Allow dvi-formatted documentation to be installed. gcc/c/ChangeLog: PR other/102663 * Make-lang.in: Add dummy c.install-dvi target. gcc/cp/ChangeLog: PR other/102663 * Make-lang.in: Add dummy c++.install-dvi target. gcc/d/ChangeLog: PR other/102663 * Make-lang.in: Allow dvi-formatted documentation to be installed. gcc/fortran/ChangeLog: PR other/102663 * Make-lang.in: Allow dvi-formatted documentation to be installed. gcc/lto/ChangeLog: PR other/102663 * Make-lang.in: Add dummy lto.install-dvi target. gcc/objc/ChangeLog: PR other/102663 * Make-lang.in: Add dummy objc.install-dvi target. gcc/objcp/ChangeLog: PR other/102663 * Make-lang.in: Add dummy objc++.install-dvi target. gnattools/ChangeLog: PR other/102663 * Makefile.in: Add dummy install-dvi target. libada/ChangeLog: PR other/102663 * Makefile.in: Add dummy install-dvi target. libcpp/ChangeLog: PR other/102663 * Makefile.in: Add dummy install-dvi target. libdecnumber/ChangeLog: PR other/102663 * Makefile.in: Add dummy install-dvi target. libiberty/ChangeLog: PR other/102663 * Makefile.in: Allow dvi-formatted documentation to be installed.
2021-09-15Daily bump.GCC Administrator1-0/+6
2021-09-14c++tools : Add a simple handler for ModuleCompiledRequest.Iain Sandoe2-0/+15
This just replies with "OK". c++tools/ChangeLog: * resolver.cc (module_resolver::ModuleCompiledRequest): Add a simple handler. * resolver.h: Declare handler for ModuleCompiledRequest.
2021-07-22Daily bump.GCC Administrator1-0/+14
2021-07-21c++tools, configury: Configure with C++; test checking status [PR98821].Iain Sandoe4-653/+170
The c++tools configure fragments need to be built with a C++ compiler. In addition, the stand-alone server uses diagnostic mechanisms in common with GCC, but needs to define implementations for gcc_assert and supporting output functions. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> PR c++/98821 - modules : c++tools configures with CC but code fragments assume CXX. PR c++/98821 c++tools/ChangeLog: * config.h.in: Regenerate. * configure: Regenerate. * configure.ac: Configure using C++. Pull logic to detect enabled checking modes; default to release checking. * server.cc (AI_NUMERICSERV): Define a fallback value. (gcc_assert): New. (gcc_unreachable): New. (fancy_abort): Only build when checking is enabled. Co-authored-by: Jakub Jelinek <jakub@redhat.com>
2021-05-26Daily bump.GCC Administrator1-0/+19
2021-05-25c++tools: Include <cstdlib> for exit [PR100731]Jakub Jelinek1-0/+1
This TU uses exit, but doesn't include <stdlib.h> or <cstdlib> and relies on some other header to include it indirectly, which apparently doesn't happen on reporter's host. The other <c*> headers aren't guarded either and we rely on a compiler capable of C++11, so maybe we can rely on <cstdlib> being around unconditionally. 2021-05-25 Jakub Jelinek <jakub@redhat.com> PR bootstrap/100731 * server.cc: Include <cstdlib>.
2021-05-25Fix typo and weird syntax in configure scriptEric Botcazou2-6/+6
c++tools/ * configure.ac (--enable-maintainer-mode): Fix typo and weird syntax. * configure: Regenerate.
2021-05-25Update copyright years in c++toolsJakub Jelinek5-6/+6
While looking at PR100731, I have noticed the copyright years are 2020-ish only. This patch adds it to update-copyright.py and updates those. 2021-05-25 Jakub Jelinek <jakub@redhat.com> contrib/ * update-copyright.py: Add c++tools. c++tools/ * Makefile.in: Update copyright year. * configure.ac: Likewise. * resolver.cc: Likewise. * resolver.h: Likewise. * server.cc: Likewise. (print_version): Update copyright notice date.
2021-05-11Daily bump.GCC Administrator1-0/+4
2021-05-10Use genversion to generate version.h.Martin Liska1-2/+2
c++tools/ChangeLog: * Makefile.in: Include also ../gcc folder. gcc/ChangeLog: * Makefile.in: Rename gcov-iov to genversion and depend on version.h (instead of gcov-iov.h). * gcov-io.h: Include version.h instread of gcov-iov.h. * gengtype-state.c (read_state_version): Likewise. * gcov-iov.c: Moved to... * genversion.c: ...here. * lto-streamer.h (LTO_major_version): Define it with GCC_major_version. * version.c: Removed. * version.h: Removed. libgcc/ChangeLog: * libgcov-driver.c (gcov_version): Use different name that does not clash with newly introduced macro.
2021-04-02Daily bump.GCC Administrator1-0/+5
2021-04-01modules : Make sure we include <map> in system.h.Iain Sandoe1-0/+2
It appears that many targets include the map header transitively in other std headers included from system.h. However there are some editions of clang/libc++ in Xcode that do not, which results in a bootstrap fail - since when resolver.h is included there is then a conflict in declaring abort(). The fix is to ensure that map is pulled in by system.h and before resolver.h is included. As a precautionary measure and to alert anyone perhaps adding another header to resolver.h this patch also gates the direct includes there on !IN_GCC. c++tools/ChangeLog: * resolver.h: Do not include std headers directly when building in GCC. gcc/cp/ChangeLog: * mapper-client.cc (INCLUDE_MAP): New; require map to be included from system.h. * mapper-resolver.cc (INCLUDE_MAP): Likewise.
2021-02-26Daily bump.GCC Administrator1-0/+5
2021-02-25c++tools: Make NETWORKING define check consistent [PR 98318]Nathan Sidwell1-7/+7
PR98318 also pointed out that the NETWORKING #define was being checked with both #if and #ifdef. Let's consistently use one form. c++tools/ * server.cc: Use #if NETWORKING not #ifdef, to be consistent with elsewhere.
2021-01-06Daily bump.GCC Administrator1-0/+9
2021-01-05build: libcody: Link with -lsocket -lnsl if necessary [PR98316]Rainer Orth3-1/+223
With the introduction of C++20 modules and libcody, cc1plus and cc1objplus gained a dependency on the socket functions. Before those were merged into libc in Solaris 11.4, one needed to link with -lsocket -lnsl on Solaris, so that merge broke the Solaris 11.3 build. While we already have 4 different checks for those libraries in the tree, I decided to import autoconf-archive's AX_LIB_SOCKET_NSL macro instead. At the same time, the patch only links libcody and the networking libs where needed (cc1plus, cc1objplus). Bootstrapped without regressions on i386-pc-solaris2.11 (Solaris 11.3 and 11.4), sparc-sun-solaris2.11, and x86_64-pc-linux-gnu. 2020-12-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> c++tools: PR c++/98316 * configure.ac: Include ../config/ax_lib_socket_nsl.m4. (NETLIBS): Determine using AX_LIB_SOCKET_NSL. * configure: Regenerate. * Makefile.in (NETLIBS): Define. (g++-mapper-server$(exeext)): Add $(NETLIBS). gcc/objcp: PR c++/98316 * Make-lang.in (cc1objplus$(exeext)): Add $(CODYLIB), $(NETLIBS). gcc/cp: PR c++/98316 * Make-lang.in (cc1plus$(exeext)): Add $(CODYLIB), $(NETLIBS). gcc: PR c++/98316 * configure.ac (NETLIBS): Determine using AX_LIB_SOCKET_NSL. * aclocal.m4, configure: Regenerate. * Makefile.in (NETLIBS): Define. (BACKEND): Remove $(CODYLIB). config: PR c++/98316 * ax_lib_socket_nsl.m4: Import from autoconf-archive.
2021-01-05Daily bump.GCC Administrator1-0/+5
2021-01-04[libcody] Remove some std::move [PR 98368]Nathan Sidwell1-3/+1
Compiling on clang showed a couple of pessimizations. Fixed thusly. libcody/ * client.cc (Client::ProcessResponse): Remove std::move inside ?: c++tools/ * resolver.cc (module_resolver::cmi_response): Remove std::move of temporary.
2021-01-04Update Copyright in ChangeLog filesJakub Jelinek1-1/+1
Do this separately from all other Copyright updates, as ChangeLog files can be modified only separately.
2020-12-24Daily bump.GCC Administrator1-0/+7
2020-12-23c++tools: Fix PIE [PR 98324]Nathan Sidwell3-2/+24
This adds --enable-default-pie support to c++tools, so that the sample server is build -fPIE if requested. PR bootstrap/98324 c++tools/ * Makefile.in: Add FLAGPIE. * configure.ac: Add --enable-default-pie support. * configure: Rebuilt.
2020-12-22Daily bump.GCC Administrator1-0/+5
2020-12-21c++tools: Fix exe suffix [PR 98409]Nathan Sidwell1-1/+1
I had a thinko about variable case, and, coupled with Make's behaviour of just consing up variables out of nothing, and linux not having an executable extension, didn't notice. PR other/98409 c++tools/ * Makefile.in: Fix exeext variable case.
2020-12-18Daily bump.GCC Administrator1-0/+21
2020-12-17bootstrap: Don't use strsignal [PR 98300]Nathan Sidwell1-1/+2
Sadly strsignal is nonportable, so signal numbers it is then. c++tools/ * server.cc (crash_signal): Don't use strsignal.
2020-12-17bootstrap: Fix some windows issues [PR 98300]Nathan Sidwell4-3/+726
When breaking out the sample server from the gcc/cp directory, it lost its check for mmap, and the sample resolver just assumed it was there. Fixed thusly. The non-mapping paths in module.cc weren't (recently) excercised, and led to a signedness warning. Finally I'd missed c++tools's config.h.in in the gcc_update script. There I took the opportunity of adding a 'tools' segment of the dependency lists. PR bootstrap/98300 contrib/ * gcc_update: Add c++tools/config.h.in. c++tools/ * configure.ac: Check for sys/mman.h. * resolver.cc: Don't assume mmap, O_CLOEXEC are available. Use xmalloc. * config.h.in: Regenerated. * configure: Regenerated. gcc/cp/ * module.cc: Fix ::read, ::write result signedness comparisons.
2020-12-17c++tools: Fix up c++tools for --with-gcc-major-version-onlyJakub Jelinek3-2/+28
Seems c++tools doesn't honor --with-gcc-major-version-only. Our distro uses that flag and so everything is installed in /usr/lib/gcc/<target>/11/... /usr/libexec/gcc/<target>/11/... except /usr/libexec/gcc/<target>/11.0.0/g++-mapper-server The following patch should fix that. 2020-12-17 Jakub Jelinek <jakub@redhat.com> * configure.ac: Add GCC_BASE_VER. * Makefile.in (version): Remove variable. (gcc_version): New variable. (libexecsubdir): Use $(gcc_version) instead of $(version). * configure: Regenerated.