Commit Graph

3 Commits

Author SHA1 Message Date
Nathan Sidwell
e2aa8a5f98 libcody: Simplify configure [PR 98414, 98509]
Libcody's configurey was overly 'clever'.  That didn't play well with
GCC's structure.  This removes lots of that overengineering, using
libcpp as an example.

	libcody/
	* Makefile.in: Remove auto parallelize, swallow Makesub.in. Don't
	check compiler name here.
	* Makesub.in: Delete.
	* build-aux/config.guess: Delete.
	* build-aux/config.sub: Delete.
	* build-aux/install-sh: Delete.
	* dox.cfg.in: Delete.
	* gdbinit.in: Delete.
	* internal.hh (BuildNote): Delete.
	* fatal.cc (BuildNote): Delete.
	* config.m4: Remove unneeded fns.
	* configure.ac: Remove unneccessary checks and configures.
	* configure: Rebuilt.
	* config.h.in: Rebuilt.
2021-01-12 10:32:27 -08:00
Jonathan Wakely
4e42f6ebf4 libcody: Fix build for older GCC versions
Before CWG DR 1955 the controlling expression for an #elif must be
syntactically correct, meaning this won't compile with C++11 compilers
such as gcc 4.8:

The solution is to define __has_include(X) as 0 for compilers that don't
support it.

The second problem is that when <source_location> is found, it is used
without the std:: qualification.

libcody/ChangeLog:

	* internal.hh: Define fallback macros for __has_builtin and
	__has_include. Use __has_builtin for __builtin_FILE and
	__builtin_LINE. Define alias for std::source_location.
2020-12-16 14:33:26 +00:00
Nathan Sidwell
362303298a Add libcody
In order to separate compiler from build system, C++ Modules, as
implemented in GCC introduces a communication channel between those
two entities.  This is implemented by libcody.  It is anticipated that
other implementations will also implement this protocol, or use
libcody to provide it.

	* Makefile.def: Add libcody.
	* configure.ac: Add libcody.
	* Makefile.in: Regenerated.
	* configure: Regenerated.
	gcc/
	* Makefile.in (CODYINC, CODYLIB, CODYLIB_H): New. Use them.
	libcody/
	* configure.ac: New.
	* CMakeLists.txt: New.
	* CODING.md: New.
	* CONTRIB.md: New.
	* LICENSE: New.
	* LICENSE.gcc: New.
	* Makefile.in: New.
	* Makesub.in: New.
	* README.md: New.
	* buffer.cc: New.
	* build-aux/config.guess: New.
	* build-aux/config.sub: New.
	* build-aux/install-sh: New.
	* client.cc: New.
	* cmake/libcody-config-ix.cmake
	* cody.hh: New.
	* config.h.in: New.
	* config.m4: New.
	* configure: New.
	* configure.ac: New.
	* dox.cfg.in: New.
	* fatal.cc: New.
	* gdbinit.in: New.
	* internal.hh: New.
	* netclient.cc: New.
	* netserver.cc: New.
	* packet.cc: New.
	* resolver.cc: New.
	* server.cc: New.
	* tests/01-serialize/connect.cc: New.
	* tests/01-serialize/decoder.cc: New.
	* tests/01-serialize/encoder.cc: New.
	* tests/02-comms/client-1.cc: New.
	* tests/02-comms/pivot-1.cc: New.
	* tests/02-comms/server-1.cc: New.
	* tests/Makesub.in: New.
	* tests/jouster: New.
2020-12-15 07:09:59 -08:00