diff --git a/gcc/configure.in b/gcc/configure.in index 4a92d77de3b..6656d096245 100644 --- a/gcc/configure.in +++ b/gcc/configure.in @@ -3009,6 +3009,24 @@ do echo "lang.$t: $x" >> Make-hooks done +# If we're not building in srcdir, create .gdbinit. + +if [[ ! -f Makefile.in ]]; then + echo "dir ." > .gdbinit + echo "dir ${srcdir}" >> .gdbinit + if [[ x$gdb_needs_out_file_path = xyes ]] + then + echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit + fi + if [[ "x$subdirs" != x ]]; then + for s in $subdirs + do + echo "dir ${srcdir}/$s" >> .gdbinit + done + fi + echo "source ${srcdir}/.gdbinit" >> .gdbinit +fi + # Process the language and host/target makefile fragments. ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file" @@ -3107,6 +3125,7 @@ target='${target}' target_alias='${target_alias}' srcdir='${srcdir}' subdirs='${subdirs}' +oldstyle_subdirs='${oldstyle_subdirs}' symbolic_link='${symbolic_link}' program_transform_set='${program_transform_set}' program_transform_name='${program_transform_name}'