Commit Graph

8 Commits

Author SHA1 Message Date
Eric Botcazou 4b1987f8ad Fix typo and weird syntax in configure script
c++tools/
	* configure.ac (--enable-maintainer-mode): Fix typo and weird syntax.
	* configure: Regenerate.
2021-05-25 12:13:15 +02:00
Jakub Jelinek c9a089cad1 Update copyright years in c++tools
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-25 11:12:03 +02:00
Rainer Orth a20893cf6b build: libcody: Link with -lsocket -lnsl if necessary [PR98316]
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-05 11:32:31 +01:00
Nathan Sidwell 544f477536 c++tools: Fix PIE [PR 98324]
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-23 04:50:00 -08:00
Nathan Sidwell 096164229a bootstrap: Fix some windows issues [PR 98300]
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-17 05:57:13 -08:00
Jakub Jelinek 4e7e7c1326 c++tools: Fix up c++tools for --with-gcc-major-version-only
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.
2020-12-17 14:31:05 +01:00
Nathan Sidwell 3f78c8cb7f c++tools: fix install-strip [PR 98328]
I'd missed an install-strip rule in c++tools.  Here it is, cribbed
from gcc/ subdir.

	c++tools/
	* Makefile.in (INSTALL): Replace with ...
	(INSTALL_PROGRAM): ... this.
	(INSTALL_STRIP_PROGRAM): New.
	(install-strip): New target.
	(install): Use INSTALL_PROGRAM.
	* configure.ac: Add INSTALL_PROGRAM.
	* configure: Regenerated.
2020-12-16 11:57:31 -08:00
Nathan Sidwell 35fc243fca Add c++tools
Part of our module implementation adds a sample mapper server, the
guts of which are used by the default in-process mapping of cc1plus.
Rather than add another executable to gcc/cp/, this creates a new
c++tools directory where this and any other c++ tools might live.
The toplevel changes are a subsequent commit, because ... git.

c++tools/ChangeLog:

	* Makefile.in: New.
	* config.h.in: New.
	* configure: New.
	* configure.ac: New.
	* resolver.cc: New.
	* resolver.h: New.
	* server.cc: New.
2020-12-15 07:41:54 -08:00