[PATCH] libgloss: m68k: rename $DO to $TARGET

Mike Frysinger vapier@gentoo.org
Wed Feb 9 05:15:58 GMT 2022

The common $DO variable is used by the multilib logic to control which
target to multiplex.  But the m68k subdir is also using $DO to control
which target (m68k or fido) to build.  As we flatten things to automake,
this conflict shows up and breaks the m68k build.  Just rename the m68k
variable to something unique to avoid it.
 libgloss/m68k/Makefile.in  |  6 +++---
 libgloss/m68k/configure    | 12 ++++++------
 libgloss/m68k/configure.ac | 10 +++++-----
 3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/libgloss/m68k/Makefile.in b/libgloss/m68k/Makefile.in
index b9452bad7e45..42cf2b2d6f4b 100644
--- a/libgloss/m68k/Makefile.in
+++ b/libgloss/m68k/Makefile.in
@@ -69,7 +69,7 @@ OBJS =  close.o fstat.o getpid.o isatty.o kill.o \
 	unlink.o write.o
 # What targets to build for.  This is a list of {m68k,cf}
-DO = @DO@
 # Here is all of the simulator stuff
 SIM_SCRIPTS	= sim.ld
@@ -200,7 +200,7 @@ HOSTED_OBJS=	hosted-gdb.o hosted-exit.o $(patsubst un%,%,$(UNHOSTED_OBJS))
 # Host specific makefile fragment comes in here.
-all :: $(DO:%=all_%)
+all :: $(TARGET:%=all_%)
 # here's where we build the board support packages for each target
@@ -406,7 +406,7 @@ dtor.x: dtor.o ${CRT0} ${srcdir}/mvme135.ld Makefile  ${MVME135_BSP}
 unlink.o: $(srcdir)/../unlink.c
 .PHONY: install info dvi doc install-info clean-info
-install:: $(DO:%=install_%)
+install:: $(TARGET:%=install_%)
diff --git a/libgloss/m68k/configure.ac b/libgloss/m68k/configure.ac
index de35d7934966..41b49a530a5d 100644
--- a/libgloss/m68k/configure.ac
+++ b/libgloss/m68k/configure.ac
@@ -31,7 +31,7 @@ AC_PROG_RANLIB
 AC_MSG_CHECKING([target cpu family])
 dnl Temporarily modify LDFLAGS so that link tests will succeed without
 dnl a C library.  Note that we may not have a C librabry yet and that
 dnl autoconf automatically adds script to check whether we can create
@@ -42,14 +42,14 @@ LDFLAGS="-nostdlib -e main"
 AC_PREPROC_IFELSE([AC_LANG_PROGRAM([#ifndef __mcoldfire__
 		#error we are not coldfire
-	       DO="cf",)
+	       TARGET="cf",)
 		#error we are not fido
-	       DO="fido",)
+	       TARGET="fido",)

More information about the Newlib mailing list