mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-21 04:42:53 +08:00
73cc72729a
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.
39 lines
1.7 KiB
Diff
39 lines
1.7 KiB
Diff
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
|
|
|