While trying to build a --host=i586-pc-msdosdjgpp gdb on GNU/Linux
(Fedora 17), I stumbled on a build error in readline:

 config.status: executing default commands
 make: *** No rule to make target `/config.h', needed by `readline.o'.  Stop.

Turns out BUILD_DIR was ending up empty in the Makefile:

 ...
 BUILD_DIR =
 ...
 readline.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
 ...

The issue is that configure is deciding whether to run pwd.exe or pwd
based on $host_os (msdosdjgpp), while it should be checking $build_os
instead (linux-gnu).

Let me know whether this is accepted into readline so we can backport
it to GDB's readline copy.

readline/
2013-05-21  Pedro Alves  <[email protected]>

        * configure.in: Check $build_os instead of $host_os wheng deciding
        whether to run `pwd.exe' on djgpp.
        * configure: Regenerate.
---
 0 files changed

diff --git a/readline/configure b/readline/configure
index 0187311..80eb7eb 100755
--- a/readline/configure
+++ b/readline/configure
@@ -6264,7 +6264,7 @@ fi
 
 
 
-case "$host_os" in
+case "$build_os" in
 msdosdjgpp*)   BUILD_DIR=`pwd.exe` ;;  # to prevent //d/path/file
 *)             BUILD_DIR=`pwd` ;;
 esac
diff --git a/readline/configure.in b/readline/configure.in
index f09f4e5..a2dfab5 100644
--- a/readline/configure.in
+++ b/readline/configure.in
@@ -268,7 +268,7 @@ AC_SUBST(SHARED_TARGET)
 AC_SUBST(STATIC_INSTALL_TARGET)
 AC_SUBST(SHARED_INSTALL_TARGET)
 
-case "$host_os" in
+case "$build_os" in
 msdosdjgpp*)   BUILD_DIR=`pwd.exe` ;;  # to prevent //d/path/file
 *)             BUILD_DIR=`pwd` ;;
 esac


_______________________________________________
Bug-readline mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-readline

Reply via email to