diff options
author | Tom Tromey <tom@tromey.com> | 2019-05-05 17:35:20 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-06-14 12:40:02 -0600 |
commit | 73cc72729a184f00bf6fc4d74684a8516ba6b683 (patch) | |
tree | e6887d2f33a00c23c4ec054d02b9be9f892da571 /gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch | |
parent | f568655424ad268c8c5df3f56e4e19a86b16623d (diff) | |
download | fsf-binutils-gdb-73cc72729a184f00bf6fc4d74684a8516ba6b683.zip fsf-binutils-gdb-73cc72729a184f00bf6fc4d74684a8516ba6b683.tar.gz fsf-binutils-gdb-73cc72729a184f00bf6fc4d74684a8516ba6b683.tar.bz2 |
Move gnulib to top level
This patch moves the gdb/gnulib subdirectory to the top level.
It adjusts the top-level build system to build gnulib when necessary,
and changes gdb to use this. However, gdbserver still builds its own
copy of gnulib, just from the new source location.
A small hack was needed to ensure that gnulib is only built when gdb
is enabled. The Makefile only provides an ordering -- the directory
must be mentioned in configdirs to actually be compiled at all.
Most of the patch is just a "git mv" of gnulib, though a few minor
path adjustments were needed in some files there.
Tested by the buildbot.
ChangeLog
2019-06-14 Tom Tromey <tom@tromey.com>
* MAINTAINERS: Add gnulib.
* gnulib: New directory, move from gdb/gnulib.
* configure.ac (host_libs): Add gnulib.
* configure: Rebuild.
* Makefile.def (host_modules, dependencies): Add gnulib.
* Makefile.in: Rebuild.
gdb/ChangeLog
2019-06-14 Tom Tromey <tom@tromey.com>
* gnulib: Move directory to top-level.
* configure.ac: Don't configure gnulib.
* configure: Rebuild.
* common/common-defs.h: Use new path to gnulib.
* Makefile.in (GNULIB_BUILDDIR): Now ../gnulib.
(GNULIB_H): Remove.
(INCGNU): Look in new gnulib location.
(HFILES_NO_SRCDIR): Remove gnulib files.
(SUBDIR, REQUIRED_SUBDIRS): Remove gnulib.
(generated_files): Remove GNULIB_H.
($(LIBGNU), all-lib): Remove targets.
(distclean): Don't mention GNULIB_BUILDDIR.
($(GNULIB_BUILDDIR)/Makefile): Remove target.
gdb/gdbserver/ChangeLog
2019-06-14 Tom Tromey <tom@tromey.com>
* configure.ac: Use new path to gnulib.
* configure: Rebuild.
* Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
to gnulib.
gnulib/ChangeLog
2019-06-14 Tom Tromey <tom@tromey.com>
* update-gnulib.sh: Adjust paths.
* Makefile.in: Adjust paths.
* configure.ac: Adjust paths. Use ACX_LARGEFILE.
* configure: Rebuild.
Diffstat (limited to 'gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch')
-rw-r--r-- | gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch b/gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch new file mode 100644 index 0000000..35f917f --- /dev/null +++ b/gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch @@ -0,0 +1,38 @@ +From 6954995dd32ea98a1973df31f411f3996bb47dfb Mon Sep 17 00:00:00 2001 +From: Tom Tromey <tom@tromey.com> +Date: Mon, 1 Oct 2018 14:57:45 -0600 +Subject: [PATCH] mkostemp, mkostemps: Fix compilation error in C++ mode on Mac + OS X. + +Attempting to use the mkostemp module in gdb caused a build failure +when using the C++ namespace feature, because mkostemp was not +declared. On OS X, mkostemp is declared in unistd.h, so this patch +extends the existing special case in stdlib.in.h to cover mkostemp and +mkostemps. + +* lib/stdlib.in.h: Include <unistd.h> for mkostemp and mkostemps +on OS X. +--- + ChangeLog | 6 ++++++ + lib/stdlib.in.h | 3 ++- + 2 files changed, 8 insertions(+), 1 deletion(-) + +diff --git a/gdb/gnulib/import/stdlib.in.h b/gdb/gnulib/import/stdlib.in.h +index db3253bd97..8f803a2ea3 100644 +--- a/gdb/gnulib/import/stdlib.in.h ++++ b/gdb/gnulib/import/stdlib.in.h +@@ -87,9 +87,10 @@ struct random_data + # endif + #endif + +-#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) ++#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_MKOSTEMP@ || @GNULIB_MKOSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) + /* On Mac OS X 10.3, only <unistd.h> declares mkstemp. */ + /* On Mac OS X 10.5, only <unistd.h> declares mkstemps. */ ++/* On Mac OS X 10.13, only <unistd.h> declares mkostemp and mkostemps. */ + /* On Cygwin 1.7.1, only <unistd.h> declares getsubopt. */ + /* But avoid namespace pollution on glibc systems and native Windows. */ + # include <unistd.h> +-- +2.19.0 + |