aboutsummaryrefslogtreecommitdiff
path: root/gdb/configure
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-10-19 15:42:34 -0600
committerTom Tromey <tom@tromey.com>2019-10-21 07:45:30 -0600
commita0a461e5b45f6fd9eb81774ad61e55b4917d4305 (patch)
tree6d563aa9b1cfc93576519b685f05a5f751ecfa45 /gdb/configure
parent94cb3754118669d46c8ad87c986d8d9c59fac65a (diff)
downloadgdb-a0a461e5b45f6fd9eb81774ad61e55b4917d4305.zip
gdb-a0a461e5b45f6fd9eb81774ad61e55b4917d4305.tar.gz
gdb-a0a461e5b45f6fd9eb81774ad61e55b4917d4305.tar.bz2
Fix creation of nm.h when configure is changed
My earlier patch -- commit c5adaa192 ("Fix creation of stamp-h by gdb's configure script") -- broke the creation of nm.h. In particular, configure removes nm.h, so if you touch configure and rebuild, nothing will re-create the link, breaking the build. This patch fixes the bug, and also updates configure.ac to use AC_CONFIG_LINKS, rather than the obsolete AC_LINK_FILES. Finally, I noticed that gcore is in generated_files in the Makefile.in. I think this is incorrect, as generated_files is only needed for files that can be the target of a #include. So, this patch removes it. gdb/ChangeLog 2019-10-21 Tom Tromey <tom@tromey.com> * configure.ac (nm.h): Conditionally create nm.h link. Subst NM_H. Use AC_CONFIG_LINKS. * configure: Rebuild. * Makefile.in (NM_H): New variable. (generated_files): Add NM_H. Remove gcore. (nm.h, stamp-nmh): New targets. Change-Id: I8dd539785d52455e85389425e4bb996c8a127a0e
Diffstat (limited to 'gdb/configure')
-rwxr-xr-xgdb/configure28
1 files changed, 9 insertions, 19 deletions
diff --git a/gdb/configure b/gdb/configure
index 70ce52f..737b426 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -626,6 +626,7 @@ LIBOBJS
GCORE_TRANSFORM_NAME
GDB_TRANSFORM_NAME
XSLTPROC
+NM_H
GDB_NM_FILE
LTLIBBABELTRACE
LIBBABELTRACE
@@ -17556,28 +17557,25 @@ $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to r
fi
fi
-# If nativefile (NAT_FILE) is not set in configure.nat, we link to an
-# empty version.
-
-files=
-links=
-
+NM_H=
rm -f nm.h
if test "${nativefile}" != ""; then
case "${nativefile}" in
nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
* ) GDB_NM_FILE="${nativefile}"
esac
- files="${files} ${GDB_NM_FILE}"
- links="${links} nm.h"
+ ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE"
+
cat >>confdefs.h <<_ACEOF
#define GDB_NM_FILE "${GDB_NM_FILE}"
_ACEOF
+ NM_H=nm.h
fi
+
for ac_prog in xsltproc
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -17631,16 +17629,6 @@ if test "x$USE_MAINTAINER_MODE" = xyes; then
fi
-ac_sources="$files"
-ac_dests="$links"
-while test -n "$ac_sources"; do
- set $ac_dests; ac_dest=$1; shift; ac_dests=$*
- set $ac_sources; ac_source=$1; shift; ac_sources=$*
- ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
-done
-ac_config_links="$ac_config_links $ac_config_links_1"
-
-
@@ -18406,6 +18394,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# INIT-COMMANDS
#
ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
+GDB_NM_FILE=$GDB_NM_FILE
_ACEOF
@@ -18418,7 +18407,7 @@ do
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
"depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
"jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
- "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
+ "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;;
"gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
@@ -19053,6 +19042,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
case $ac_file$ac_mode in
"config.h":H) echo > stamp-h ;;
"depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
+ "nm.h":L) echo > stamp-nmh ;;
"gcore":F) chmod +x gcore ;;
esac