public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] libgloss: m68k: rename $DO to $TARGET
@ 2022-02-09  5:15 Mike Frysinger
  2022-02-09 11:02 ` Corinna Vinschen
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2022-02-09  5:15 UTC (permalink / raw)
  To: newlib

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@
+TARGET = @TARGET@
 
 # 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.
 @host_makefile_frag@
 
-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_%)
 
 
 .PHONY:install_m68k
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
 LIB_AM_PROG_AS
 
 AC_MSG_CHECKING([target cpu family])
-DO=m68k
+TARGET=m68k
 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
 		#endif])],
-	       DO="cf",)
+	       TARGET="cf",)
 AC_PREPROC_IFELSE([AC_LANG_PROGRAM([#ifndef __mfido__
 		#error we are not fido
 		#endif])],
-	       DO="fido",)
+	       TARGET="fido",)
 LDFLAGS=$saved_LDFLAGS
-AC_MSG_RESULT($DO)
-AC_SUBST(DO)
+AC_MSG_RESULT($TARGET)
+AC_SUBST(TARGET)
      
 host_makefile_frag=${srcdir}/../config/default.mh
 target_makefile_frag=${srcdir}/../config/default.mt
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] libgloss: m68k: rename $DO to $TARGET
  2022-02-09  5:15 [PATCH] libgloss: m68k: rename $DO to $TARGET Mike Frysinger
@ 2022-02-09 11:02 ` Corinna Vinschen
  0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2022-02-09 11:02 UTC (permalink / raw)
  To: newlib

On Feb  9 00:15, Mike Frysinger wrote:
> 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(-)

LGTM, please push.


Corinna


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-09 11:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-09  5:15 [PATCH] libgloss: m68k: rename $DO to $TARGET Mike Frysinger
2022-02-09 11:02 ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).