Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: [gdamore-uart] src/sys/arch/m68k/fpsp



gdamore%NetBSD.org@localhost wrote:

> Module Name:  src
> Committed By: gdamore
> Date:         Sun Jun 18 05:17:54 UTC 2006
> 
> Modified Files:
>       src/sys/arch/m68k/fpsp [gdamore-uart]: Makefile asm2gas
> 
> Log Message:
> Use TOOL_SED for asm2gas, which makes it possible to cross-compile this
> on Solaris 10.  (Solaris 10's sed doesn't like the comment lines, and
> also complains about too many commands in the input.)

Maybe you forgot to commit changes to bsd.own.mk and bsd.sys.mk,
which should define TOOL_SED, didn't you?
(maybe you also have to note TOOL_SED in bsd.README, BTW)

Anyway, I don't think it's a good idea to change asm2gas args
because some other tools might also invoke it, and I think
it's better to specify such tool commands via environments
rather than args.

How about the attached one?
---
Izumi Tsutsui


Index: sys/arch/m68k/fpsp/Makefile
===================================================================
RCS file: /cvsroot/src/sys/arch/m68k/fpsp/Makefile,v
retrieving revision 1.13.4.1
diff -u -r1.13.4.1 Makefile
--- sys/arch/m68k/fpsp/Makefile 18 Jun 2006 05:17:54 -0000      1.13.4.1
+++ sys/arch/m68k/fpsp/Makefile 18 Jun 2006 13:53:41 -0000
@@ -56,7 +56,7 @@
 # For the Library Version:
 #
 AR?            = ar
-LIB_FILTER     = sed 's/fpsp.defs/l_fpsp.defs/'
+LIB_FILTER     = ${TOOL_SED} 's/fpsp.defs/l_fpsp.defs/'
 LIB_TARGET     = lib$(TARGET).a
 #
 # SYS selects the template set to use
@@ -77,9 +77,9 @@
 PREFIX         = L_
 
 .sa.s:
-       ${HOST_SH} ${FPSPDIR}/asm2gas ${TOOL_SED} ${.IMPSRC} >${.TARGET}
+       SED=${TOOL_SED:Q} ${HOST_SH} ${FPSPDIR}/asm2gas ${.IMPSRC} >${.TARGET}
 .h.defs:
-       ${HOST_SH} ${FPSPDIR}/asm2gas ${TOOL_SED} ${.IMPSRC} >${.TARGET}
+       SED=${TOOL_SED:Q} ${HOST_SH} ${FPSPDIR}/asm2gas ${.IMPSRC} >${.TARGET}
 .s.o:
        ${CC} ${AFLAGS} ${CPPFLAGS} -c -o ${.TARGET} ${.IMPSRC}
 
Index: sys/arch/m68k/fpsp/asm2gas
===================================================================
RCS file: /cvsroot/src/sys/arch/m68k/fpsp/asm2gas,v
retrieving revision 1.6.66.1
diff -u -r1.6.66.1 asm2gas
--- sys/arch/m68k/fpsp/asm2gas  18 Jun 2006 05:17:54 -0000      1.6.66.1
+++ sys/arch/m68k/fpsp/asm2gas  18 Jun 2006 13:53:41 -0000
@@ -40,8 +40,10 @@
 # This ugly script converts assembler code from Motorola's format to a
 # form that gas (MIT syntax) can digest.
 
-SED=$1
-cat $2 | ${SED} -e '
+if [ -z "$SED" ]; then
+       SED=sed
+fi
+cat $1 | ${SED} -e '
   # format canonicalization
 
   /[   ]IDNT[  ]/{s/^/|/;p;d;}



Home | Main Index | Thread Index | Old Index