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.)
This commit is contained in:
parent
d9ac053afa
commit
5b4951cdf4
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.13 2006/04/07 19:38:58 mrg Exp $
|
||||
# $NetBSD: Makefile,v 1.14 2006/06/18 05:21:21 gdamore Exp $
|
||||
|
||||
# MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP
|
||||
# M68000 Hi-Performance Microprocessor Division
|
||||
|
@ -36,7 +36,8 @@
|
|||
# Makefile for 68040 Floating Point Software Package
|
||||
#
|
||||
|
||||
.include <bsd.sys.mk> # for HOST_SH
|
||||
.include <bsd.prog.mk>
|
||||
#.include <bsd.sys.mk> # for HOST_SH
|
||||
|
||||
TARGET = fpsp
|
||||
|
||||
|
@ -76,9 +77,9 @@ SYS = GCC
|
|||
PREFIX = L_
|
||||
|
||||
.sa.s:
|
||||
${HOST_SH} ${FPSPDIR}/asm2gas ${.IMPSRC} >${.TARGET}
|
||||
${HOST_SH} ${FPSPDIR}/asm2gas ${TOOL_SED} ${.IMPSRC} >${.TARGET}
|
||||
.h.defs:
|
||||
${HOST_SH} ${FPSPDIR}/asm2gas ${.IMPSRC} >${.TARGET}
|
||||
${HOST_SH} ${FPSPDIR}/asm2gas ${TOOL_SED} ${.IMPSRC} >${.TARGET}
|
||||
.s.o:
|
||||
${CC} ${AFLAGS} ${CPPFLAGS} -c -o ${.TARGET} ${.IMPSRC}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/sh
|
||||
# $NetBSD: asm2gas,v 1.6 2000/12/06 21:31:05 is Exp $
|
||||
# $NetBSD: asm2gas,v 1.7 2006/06/18 05:21:21 gdamore Exp $
|
||||
|
||||
#
|
||||
# Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -40,7 +40,8 @@
|
|||
# This ugly script converts assembler code from Motorola's format to a
|
||||
# form that gas (MIT syntax) can digest.
|
||||
|
||||
cat $1 | sed -e '
|
||||
SED=$1
|
||||
cat $2 | ${SED} -e '
|
||||
# format canonicalization
|
||||
|
||||
/[ ]IDNT[ ]/{s/^/|/;p;d;}
|
||||
|
@ -77,7 +78,7 @@ cat $1 | sed -e '
|
|||
G
|
||||
s/\n//
|
||||
}
|
||||
' | sed -e '
|
||||
' | ${SED} -e '
|
||||
# operator conversion
|
||||
|
||||
s/^ section 7/ .text/
|
||||
|
@ -135,7 +136,7 @@ cat $1 | sed -e '
|
|||
/^ db[a-z][a-z]*\.w /{s/\.w//;p;d;}
|
||||
/^ fb[a-eg-z][a-z]*\.w /{s/\.w//;p;d;}
|
||||
/^ fb[a-eg-z][a-z]*\.l /{s/\.l/l/;p;d;}
|
||||
' | sed -e '
|
||||
' | ${SED} -e '
|
||||
# operand conversion
|
||||
|
||||
s/\([^_a-zA-Z0-9]\)FPIAR\([^_a-zA-Z0-9]\)/\1%FPI\2/g
|
||||
|
@ -193,7 +194,7 @@ cat $1 | sed -e '
|
|||
s/,\(%[fF][pP][0-7]\) /,\1-\1 /
|
||||
s/,\(%[fF][pP][0-7]\)$/,\1-\1/
|
||||
}
|
||||
' | sed -e '
|
||||
' | ${SED} -e '
|
||||
# Floating point literal conversion
|
||||
|
||||
s/:0x41dfffffffc00000/0r2147483647.0/g
|
||||
|
|
Loading…
Reference in New Issue