mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 04:49:54 +08:00
[GDBserver] Replicate src dir in build dir
Similar to f38307f5 (Replicate src dir in build dir), this patch change configure and Makefile to generate object files in arch/ directory. gdb/gdbserver: 2017-10-17 Yao Qi <yao.qi@linaro.org> * Makefile.in (CONFIG_SRC_SUBDIR): New variable. (clean): Remove .o files in CONFIG_SRC_SUBDIR. (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR. (arch-i386.o, arch-amd64.o): Remove rules. (arch/%.o): New rule. Update POSTCOMPILE and COMPILE.pre. * configure.ac: Invoke AC_CONFIG_COMMANDS. * configure: Re-generated. * configure.srv: Replace arch-i386.o with arch/i386.o. Replace arch-amd64.o with arch/amd64.o.
This commit is contained in:
@ -1,3 +1,16 @@
|
|||||||
|
2017-10-17 Yao Qi <yao.qi@linaro.org>
|
||||||
|
|
||||||
|
* Makefile.in (CONFIG_SRC_SUBDIR): New variable.
|
||||||
|
(clean): Remove .o files in CONFIG_SRC_SUBDIR.
|
||||||
|
(distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
|
||||||
|
(arch-i386.o, arch-amd64.o): Remove rules.
|
||||||
|
(arch/%.o): New rule.
|
||||||
|
Update POSTCOMPILE and COMPILE.pre.
|
||||||
|
* configure.ac: Invoke AC_CONFIG_COMMANDS.
|
||||||
|
* configure: Re-generated.
|
||||||
|
* configure.srv: Replace arch-i386.o with arch/i386.o.
|
||||||
|
Replace arch-amd64.o with arch/amd64.o.
|
||||||
|
|
||||||
2017-10-16 Yao Qi <yao.qi@linaro.org>
|
2017-10-16 Yao Qi <yao.qi@linaro.org>
|
||||||
|
|
||||||
* configure: Regenerated.
|
* configure: Regenerated.
|
||||||
|
@ -43,6 +43,7 @@ man9dir = $(mandir)/man9
|
|||||||
infodir = @infodir@
|
infodir = @infodir@
|
||||||
htmldir = $(prefix)/html
|
htmldir = $(prefix)/html
|
||||||
includedir = @includedir@
|
includedir = @includedir@
|
||||||
|
CONFIG_SRC_SUBDIR = @CONFIG_SRC_SUBDIR@
|
||||||
|
|
||||||
SHELL = @SHELL@
|
SHELL = @SHELL@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
@ -434,6 +435,10 @@ clean:
|
|||||||
rm -f *-generated.c
|
rm -f *-generated.c
|
||||||
rm -f stamp-xml
|
rm -f stamp-xml
|
||||||
rm -f $(DEPDIR)/*.Po
|
rm -f $(DEPDIR)/*.Po
|
||||||
|
for i in $(CONFIG_SRC_SUBDIR); do \
|
||||||
|
rm -f $$i/*.o; \
|
||||||
|
rm -f $$i/$(DEPDIR)/*; \
|
||||||
|
done
|
||||||
@$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
|
@$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
|
||||||
|
|
||||||
maintainer-clean realclean distclean: clean
|
maintainer-clean realclean distclean: clean
|
||||||
@ -441,6 +446,9 @@ maintainer-clean realclean distclean: clean
|
|||||||
rm -rf $(GNULIB_BUILDDIR)
|
rm -rf $(GNULIB_BUILDDIR)
|
||||||
rm -f Makefile config.status config.h stamp-h config.log
|
rm -f Makefile config.status config.h stamp-h config.log
|
||||||
rm -f Makefile
|
rm -f Makefile
|
||||||
|
for i in $(CONFIG_SRC_SUBDIR); do \
|
||||||
|
rmdir $$i/$(DEPDIR); \
|
||||||
|
done
|
||||||
|
|
||||||
subdir_do: force
|
subdir_do: force
|
||||||
@for i in $(DODIRS); do \
|
@for i in $(DODIRS); do \
|
||||||
@ -530,11 +538,7 @@ ax.o: ax.c
|
|||||||
$(COMPILE) $(WARN_CFLAGS_NO_FORMAT) $<
|
$(COMPILE) $(WARN_CFLAGS_NO_FORMAT) $<
|
||||||
$(POSTCOMPILE)
|
$(POSTCOMPILE)
|
||||||
|
|
||||||
arch-i386.o: ../arch/i386.c
|
arch/%.o: ../arch/%.c
|
||||||
$(COMPILE) $<
|
|
||||||
$(POSTCOMPILE)
|
|
||||||
|
|
||||||
arch-amd64.o: ../arch/amd64.c
|
|
||||||
$(COMPILE) $<
|
$(COMPILE) $<
|
||||||
$(POSTCOMPILE)
|
$(POSTCOMPILE)
|
||||||
|
|
||||||
@ -617,12 +621,13 @@ ifeq ($(DEPMODE),depmode=gcc3)
|
|||||||
# into place if the compile succeeds. We need this because gcc does
|
# into place if the compile succeeds. We need this because gcc does
|
||||||
# not atomically write the dependency output file.
|
# not atomically write the dependency output file.
|
||||||
override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \
|
override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \
|
||||||
-MF $(DEPDIR)/$(basename $(@F)).Tpo
|
-MF $(@D)/$(DEPDIR)/$(basename $(@F)).Tpo
|
||||||
override POSTCOMPILE = @mv $(DEPDIR)/$(basename $(@F)).Tpo \
|
override POSTCOMPILE = @mv $(@D)/$(DEPDIR)/$(basename $(@F)).Tpo \
|
||||||
$(DEPDIR)/$(basename $(@F)).Po
|
$(@D)/$(DEPDIR)/$(basename $(@F)).Po
|
||||||
else
|
else
|
||||||
override COMPILE.pre = source='$<' object='$@' libtool=no \
|
override COMPILE.pre = source='$<' object='$@' libtool=no \
|
||||||
DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) $(CC)
|
DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) \
|
||||||
|
$(CXX) -x c++ $(CXX_DIALECT)
|
||||||
# depcomp handles atomicity for us, so we don't need a postcompile
|
# depcomp handles atomicity for us, so we don't need a postcompile
|
||||||
# step.
|
# step.
|
||||||
override POSTCOMPILE =
|
override POSTCOMPILE =
|
||||||
|
16
gdb/gdbserver/configure
vendored
16
gdb/gdbserver/configure
vendored
@ -607,6 +607,7 @@ ustinc
|
|||||||
ustlibs
|
ustlibs
|
||||||
ALLOCA
|
ALLOCA
|
||||||
CCDEPMODE
|
CCDEPMODE
|
||||||
|
CONFIG_SRC_SUBDIR
|
||||||
DEPDIR
|
DEPDIR
|
||||||
am__leading_dot
|
am__leading_dot
|
||||||
host_noncanonical
|
host_noncanonical
|
||||||
@ -5854,6 +5855,14 @@ DEPDIR="${am__leading_dot}deps"
|
|||||||
ac_config_commands="$ac_config_commands depdir"
|
ac_config_commands="$ac_config_commands depdir"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Create sub-directories for objects and dependencies.
|
||||||
|
CONFIG_SRC_SUBDIR="arch"
|
||||||
|
|
||||||
|
|
||||||
|
ac_config_commands="$ac_config_commands gdbdepdir"
|
||||||
|
|
||||||
|
|
||||||
depcc="$CC" am_compiler_list=
|
depcc="$CC" am_compiler_list=
|
||||||
|
|
||||||
am_depcomp=$ac_aux_dir/depcomp
|
am_depcomp=$ac_aux_dir/depcomp
|
||||||
@ -9144,6 +9153,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
|||||||
# INIT-COMMANDS
|
# INIT-COMMANDS
|
||||||
#
|
#
|
||||||
ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
|
ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
|
||||||
|
ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR CONFIG_SRC_SUBDIR="$CONFIG_SRC_SUBDIR"
|
||||||
|
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
@ -9155,6 +9165,7 @@ do
|
|||||||
case $ac_config_target in
|
case $ac_config_target in
|
||||||
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
|
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
|
||||||
"depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
|
"depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
|
||||||
|
"gdbdepdir") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbdepdir" ;;
|
||||||
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
|
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
|
||||||
|
|
||||||
*) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
|
*) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
|
||||||
@ -9701,6 +9712,11 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
|
|||||||
|
|
||||||
case $ac_file$ac_mode in
|
case $ac_file$ac_mode in
|
||||||
"depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
|
"depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
|
||||||
|
"gdbdepdir":C)
|
||||||
|
for subdir in ${CONFIG_SRC_SUBDIR}
|
||||||
|
do
|
||||||
|
$SHELL $ac_aux_dir/mkinstalldirs $subdir/$DEPDIR
|
||||||
|
done ;;
|
||||||
"Makefile":F) case x$CONFIG_HEADERS in
|
"Makefile":F) case x$CONFIG_HEADERS in
|
||||||
xconfig.h:config.in)
|
xconfig.h:config.in)
|
||||||
echo > stamp-h ;;
|
echo > stamp-h ;;
|
||||||
|
@ -66,6 +66,18 @@ ACX_NONCANONICAL_HOST
|
|||||||
|
|
||||||
# Dependency checking.
|
# Dependency checking.
|
||||||
ZW_CREATE_DEPDIR
|
ZW_CREATE_DEPDIR
|
||||||
|
|
||||||
|
# Create sub-directories for objects and dependencies.
|
||||||
|
CONFIG_SRC_SUBDIR="arch"
|
||||||
|
AC_SUBST(CONFIG_SRC_SUBDIR)
|
||||||
|
|
||||||
|
AC_CONFIG_COMMANDS([gdbdepdir],[
|
||||||
|
for subdir in ${CONFIG_SRC_SUBDIR}
|
||||||
|
do
|
||||||
|
$SHELL $ac_aux_dir/mkinstalldirs $subdir/$DEPDIR
|
||||||
|
done],
|
||||||
|
[ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR CONFIG_SRC_SUBDIR="$CONFIG_SRC_SUBDIR"])
|
||||||
|
|
||||||
ZW_PROG_COMPILER_DEPENDENCIES([CC])
|
ZW_PROG_COMPILER_DEPENDENCIES([CC])
|
||||||
|
|
||||||
gnulib_extra_configure_args=
|
gnulib_extra_configure_args=
|
||||||
|
@ -113,7 +113,7 @@ case "${target}" in
|
|||||||
;;
|
;;
|
||||||
i[34567]86-*-cygwin*) srv_regobj=""
|
i[34567]86-*-cygwin*) srv_regobj=""
|
||||||
srv_tgtobj="x86-low.o x86-dregs.o win32-low.o win32-i386-low.o"
|
srv_tgtobj="x86-low.o x86-dregs.o win32-low.o win32-i386-low.o"
|
||||||
srv_tgtobj="${srv_tgtobj} arch-i386.o"
|
srv_tgtobj="${srv_tgtobj} arch/i386.o"
|
||||||
srv_xmlfiles="$srv_i386_xmlfiles"
|
srv_xmlfiles="$srv_i386_xmlfiles"
|
||||||
;;
|
;;
|
||||||
i[34567]86-*-linux*) srv_regobj="$srv_i386_linux_regobj"
|
i[34567]86-*-linux*) srv_regobj="$srv_i386_linux_regobj"
|
||||||
@ -123,7 +123,7 @@ case "${target}" in
|
|||||||
srv_xmlfiles="${srv_xmlfiles} $srv_amd64_linux_xmlfiles"
|
srv_xmlfiles="${srv_xmlfiles} $srv_amd64_linux_xmlfiles"
|
||||||
srv_tgtobj="amd64-linux-siginfo.o"
|
srv_tgtobj="amd64-linux-siginfo.o"
|
||||||
fi
|
fi
|
||||||
srv_tgtobj="${srv_tgtobj} arch-i386.o"
|
srv_tgtobj="${srv_tgtobj} arch/i386.o"
|
||||||
srv_tgtobj="${srv_tgtobj} $srv_linux_obj linux-x86-low.o x86-low.o x86-dregs.o i387-fp.o"
|
srv_tgtobj="${srv_tgtobj} $srv_linux_obj linux-x86-low.o x86-low.o x86-dregs.o i387-fp.o"
|
||||||
srv_tgtobj="${srv_tgtobj} linux-x86-tdesc.o"
|
srv_tgtobj="${srv_tgtobj} linux-x86-tdesc.o"
|
||||||
srv_tgtobj="${srv_tgtobj} linux-btrace.o x86-linux.o"
|
srv_tgtobj="${srv_tgtobj} linux-btrace.o x86-linux.o"
|
||||||
@ -137,7 +137,7 @@ case "${target}" in
|
|||||||
;;
|
;;
|
||||||
i[34567]86-*-lynxos*) srv_regobj=""
|
i[34567]86-*-lynxos*) srv_regobj=""
|
||||||
srv_tgtobj="lynx-low.o lynx-i386-low.o fork-child.o fork-inferior.o"
|
srv_tgtobj="lynx-low.o lynx-i386-low.o fork-child.o fork-inferior.o"
|
||||||
srv_tgtobj="${srv_tgtobj} arch-i386.o"
|
srv_tgtobj="${srv_tgtobj} arch/i386.o"
|
||||||
srv_xmlfiles="i386/i386.xml"
|
srv_xmlfiles="i386/i386.xml"
|
||||||
srv_xmlfiles="${srv_xmlfiles} i386/32bit-core.xml"
|
srv_xmlfiles="${srv_xmlfiles} i386/32bit-core.xml"
|
||||||
srv_xmlfiles="${srv_xmlfiles} i386/32bit-sse.xml"
|
srv_xmlfiles="${srv_xmlfiles} i386/32bit-sse.xml"
|
||||||
@ -146,7 +146,7 @@ case "${target}" in
|
|||||||
i[34567]86-*-mingw32ce*)
|
i[34567]86-*-mingw32ce*)
|
||||||
srv_regobj=""
|
srv_regobj=""
|
||||||
srv_tgtobj="x86-low.o x86-dregs.o win32-low.o win32-i386-low.o"
|
srv_tgtobj="x86-low.o x86-dregs.o win32-low.o win32-i386-low.o"
|
||||||
srv_tgtobj="${srv_tgtobj} arch-i386.o"
|
srv_tgtobj="${srv_tgtobj} arch/i386.o"
|
||||||
srv_tgtobj="${srv_tgtobj} wincecompat.o"
|
srv_tgtobj="${srv_tgtobj} wincecompat.o"
|
||||||
srv_xmlfiles="$srv_i386_xmlfiles"
|
srv_xmlfiles="$srv_i386_xmlfiles"
|
||||||
# hostio_last_error implementation is in win32-low.c
|
# hostio_last_error implementation is in win32-low.c
|
||||||
@ -156,12 +156,12 @@ case "${target}" in
|
|||||||
;;
|
;;
|
||||||
i[34567]86-*-mingw*) srv_regobj=""
|
i[34567]86-*-mingw*) srv_regobj=""
|
||||||
srv_tgtobj="x86-low.o x86-dregs.o win32-low.o win32-i386-low.o"
|
srv_tgtobj="x86-low.o x86-dregs.o win32-low.o win32-i386-low.o"
|
||||||
srv_tgtobj="${srv_tgtobj} arch-i386.o"
|
srv_tgtobj="${srv_tgtobj} arch/i386.o"
|
||||||
srv_xmlfiles="$srv_i386_xmlfiles"
|
srv_xmlfiles="$srv_i386_xmlfiles"
|
||||||
srv_mingw=yes
|
srv_mingw=yes
|
||||||
;;
|
;;
|
||||||
i[34567]86-*-nto*) srv_regobj=""
|
i[34567]86-*-nto*) srv_regobj=""
|
||||||
srv_tgtobj="nto-low.o nto-x86-low.o arch-i386.o"
|
srv_tgtobj="nto-low.o nto-x86-low.o arch/i386.o"
|
||||||
srv_xmlfiles="$srv_i386_xmlfiles"
|
srv_xmlfiles="$srv_i386_xmlfiles"
|
||||||
srv_qnx="yes"
|
srv_qnx="yes"
|
||||||
;;
|
;;
|
||||||
@ -372,7 +372,7 @@ case "${target}" in
|
|||||||
;;
|
;;
|
||||||
x86_64-*-linux*) srv_regobj="$srv_amd64_linux_regobj $srv_i386_linux_regobj"
|
x86_64-*-linux*) srv_regobj="$srv_amd64_linux_regobj $srv_i386_linux_regobj"
|
||||||
srv_tgtobj="$srv_linux_obj linux-x86-low.o x86-low.o x86-dregs.o i387-fp.o"
|
srv_tgtobj="$srv_linux_obj linux-x86-low.o x86-low.o x86-dregs.o i387-fp.o"
|
||||||
srv_tgtobj="${srv_tgtobj} arch-i386.o arch-amd64.o"
|
srv_tgtobj="${srv_tgtobj} arch/i386.o arch/amd64.o"
|
||||||
srv_tgtobj="${srv_tgtobj} linux-x86-tdesc.o"
|
srv_tgtobj="${srv_tgtobj} linux-x86-tdesc.o"
|
||||||
srv_tgtobj="${srv_tgtobj} linux-btrace.o x86-linux.o"
|
srv_tgtobj="${srv_tgtobj} linux-btrace.o x86-linux.o"
|
||||||
srv_tgtobj="${srv_tgtobj} x86-linux-dregs.o"
|
srv_tgtobj="${srv_tgtobj} x86-linux-dregs.o"
|
||||||
@ -387,13 +387,13 @@ case "${target}" in
|
|||||||
;;
|
;;
|
||||||
x86_64-*-mingw*) srv_regobj=""
|
x86_64-*-mingw*) srv_regobj=""
|
||||||
srv_tgtobj="x86-low.o x86-dregs.o i387-fp.o win32-low.o win32-i386-low.o"
|
srv_tgtobj="x86-low.o x86-dregs.o i387-fp.o win32-low.o win32-i386-low.o"
|
||||||
srv_tgtobj="${srv_tgtobj} arch-amd64.o"
|
srv_tgtobj="${srv_tgtobj} arch/amd64.o"
|
||||||
srv_xmlfiles="$srv_i386_xmlfiles $srv_amd64_xmlfiles"
|
srv_xmlfiles="$srv_i386_xmlfiles $srv_amd64_xmlfiles"
|
||||||
srv_mingw=yes
|
srv_mingw=yes
|
||||||
;;
|
;;
|
||||||
x86_64-*-cygwin*) srv_regobj=""
|
x86_64-*-cygwin*) srv_regobj=""
|
||||||
srv_tgtobj="x86-low.o x86-dregs.o i387-fp.o win32-low.o win32-i386-low.o"
|
srv_tgtobj="x86-low.o x86-dregs.o i387-fp.o win32-low.o win32-i386-low.o"
|
||||||
srv_tgtobj="${srv_tgtobj} arch-amd64.o"
|
srv_tgtobj="${srv_tgtobj} arch/amd64.o"
|
||||||
srv_xmlfiles="$srv_i386_xmlfiles"
|
srv_xmlfiles="$srv_i386_xmlfiles"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user