diff mbox series

[(sync,with,binutils-gdb)] Don't build readline/libreadline.a, when --with-system-readline is supplied

Message ID 20190103051723.30029-1-simon.marchi@ericsson.com
State New
Headers show
Series [(sync,with,binutils-gdb)] Don't build readline/libreadline.a, when --with-system-readline is supplied | expand

Commit Message

Simon Marchi Jan. 3, 2019, 5:17 a.m. UTC
From: Дилян Палаузов <dilyan.palauzov@aegee.org>

[I (Simon) just pushed this to binutils-gdb, please consider merging it
 in gcc to keep the files sync-ed(-ish).]

https://sourceware.org/bugzilla/show_bug.cgi?id=18632

The bundled libreadline is always built, even if the system is
./configure'd --with-system-readline and the build libreadline.a is not
used.

Proposed patch:

Fix ./configure.ac not to proceed readline/, when --with-system-
readline is provided
---
 ChangeLog    | 7 +++++++
 configure    | 6 ++++++
 configure.ac | 6 ++++++
 3 files changed, 19 insertions(+)
diff mbox series

Patch

diff --git a/ChangeLog b/ChangeLog
index a86c3fc40c01..5c98e93d1922 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@ 
+2019-01-03  Дилян Палаузов  <dilyan.palauzov@aegee.org>
+
+	Merge from binutils-gdb:
+	* configure.ac: Don't configure readline if --with-system-readline is
+	used.
+	* configure: Re-generate.
+
 2018-12-21  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
 
 	* MAINTAINERS (Write After Approval): Update my maintainer address.
diff --git a/configure b/configure
index 4b095de5b0ae..29c2eebc81b9 100755
--- a/configure
+++ b/configure
@@ -2920,6 +2920,12 @@  if test x$with_system_zlib = xyes ; then
   noconfigdirs="$noconfigdirs zlib"
 fi
 
+# Don't compile the bundled readline/libreadline.a if --with-system-readline
+# is provided.
+if test x$with_system_readline = xyes ; then
+  noconfigdirs="$noconfigdirs readline"
+fi
+
 # some tools are so dependent upon X11 that if we're not building with X,
 # it's not even worth trying to configure, much less build, that tool.
 
diff --git a/configure.ac b/configure.ac
index 05475105ffc0..2c4b917e5334 100644
--- a/configure.ac
+++ b/configure.ac
@@ -246,6 +246,12 @@  if test x$with_system_zlib = xyes ; then
   noconfigdirs="$noconfigdirs zlib"
 fi
 
+# Don't compile the bundled readline/libreadline.a if --with-system-readline
+# is provided.
+if test x$with_system_readline = xyes ; then
+  noconfigdirs="$noconfigdirs readline"
+fi
+
 # some tools are so dependent upon X11 that if we're not building with X, 
 # it's not even worth trying to configure, much less build, that tool.