Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x68k/stand Add 0x prefix when defining variables, n...
details: https://anonhg.NetBSD.org/src/rev/0e126f674391
branches: trunk
changeset: 467235:0e126f674391
user: isaki <isaki%NetBSD.org@localhost>
date: Sat Jan 18 05:46:25 2020 +0000
description:
Add 0x prefix when defining variables, not when using it.
This was necessary for bc(1) but it's no longer necessary.
diffstat:
sys/arch/x68k/stand/boot/Makefile | 8 ++++----
sys/arch/x68k/stand/boot_ufs/Makefile | 14 +++++++-------
sys/arch/x68k/stand/boot_ustar/Makefile | 16 ++++++++--------
sys/arch/x68k/stand/xxboot/Makefile.xxboot | 24 ++++++++++++------------
4 files changed, 31 insertions(+), 31 deletions(-)
diffs (207 lines):
diff -r f042676916df -r 0e126f674391 sys/arch/x68k/stand/boot/Makefile
--- a/sys/arch/x68k/stand/boot/Makefile Sat Jan 18 05:41:48 2020 +0000
+++ b/sys/arch/x68k/stand/boot/Makefile Sat Jan 18 05:46:25 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.32 2020/01/18 05:41:48 isaki Exp $
+# $NetBSD: Makefile,v 1.33 2020/01/18 05:46:25 isaki Exp $
NOMAN= # defined
@@ -11,7 +11,7 @@
NEWVERSWHAT= "${BOOT}"
# text address
-TEXT= 006000
+TEXT= 0x6000
# RTC offset for netboot (XXX hardcoded for JST-9)
RTC_OFFSET= -540
@@ -34,7 +34,7 @@
CPPFLAGS+= -nostdinc -I$S -I${.OBJDIR} -I$M/stand/libsa
CPPFLAGS+= -I$M/stand/libiocs -I${COMMONDIR}
CPPFLAGS+= -D_STANDALONE -DHEAP_VARIABLE
-CPPFLAGS+= -DTEXTADDR="0x${TEXT}"
+CPPFLAGS+= -DTEXTADDR="${TEXT}"
CPPFLAGS+= -DBOOT=\"${BOOT}\" -DBOOT_VERS=\"${VERSION}\"
CPPFLAGS+= -DLIBSA_ENABLE_LS_OP
CPPFLAGS+= -DRTC_OFFSET=${RTC_OFFSET}
@@ -42,7 +42,7 @@
#CPPFLAGS+= -DDEBUG
CFLAGS= -Wno-main -Os -m68020-60
LINKFLAGS= -N -static -T ${.CURDIR}/../boot/boot.ldscript
-LINKFLAGS+= --defsym=TEXTADDR=0x$(TEXT)
+LINKFLAGS+= --defsym=TEXTADDR=$(TEXT)
ELF2AOUT_OPTS= -O
LIBIOCS!= cd $M/stand/libiocs && ${PRINTOBJDIR}
LIBSA!= cd $M/stand/libsa && ${PRINTOBJDIR}
diff -r f042676916df -r 0e126f674391 sys/arch/x68k/stand/boot_ufs/Makefile
--- a/sys/arch/x68k/stand/boot_ufs/Makefile Sat Jan 18 05:41:48 2020 +0000
+++ b/sys/arch/x68k/stand/boot_ufs/Makefile Sat Jan 18 05:46:25 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.32 2020/01/18 05:41:48 isaki Exp $
+# $NetBSD: Makefile,v 1.33 2020/01/18 05:46:26 isaki Exp $
NOMAN= # defined
@@ -10,9 +10,9 @@
END { print it }' ${VERSIONFILE}
NEWVERSWHAT= "${BOOT}"
-# text and bss addresses in hex
-TEXT= 0f0000 # Primary (me)
-BOOT_TEXT= 006000 # Secondary (/boot)
+# text and bss addresses
+TEXT= 0x0f0000 # Primary (me)
+BOOT_TEXT= 0x006000 # Secondary (/boot)
PROG= xx$(BOOT)
LINKS= ${BINDIR}/xx$(BOOT) ${BINDIR}/sd$(BOOT)
@@ -35,7 +35,7 @@
CFLAGS= -Os -fomit-frame-pointer -fno-unwind-tables
CFLAGS+= -m68020-60
CFLAGS+= -W -Wall -Wstrict-prototypes -Wmissing-prototypes
-CPPFLAGS+= -DTEXTADDR="0x$(TEXT)" -DBOOT_TEXTADDR="0x$(BOOT_TEXT)"
+CPPFLAGS+= -DTEXTADDR="$(TEXT)" -DBOOT_TEXTADDR="$(BOOT_TEXT)"
CPPFLAGS+= -DBOOT=\"$(BOOT)\" -DBOOT_VERS=\"$(VERSION)\"
CPPFLAGS+= -DSCSI_ADHOC_BOOTPART
#CPPFLAGS+= -DBOOT_DEBUG
@@ -43,7 +43,7 @@
CPPFLAGS+= -I${COMMONDIR} -I${LIBIOCS} -I${S} -I. -D_STANDALONE
AFLAGS= ${CFLAGS:M-[ID]*}
LINKFLAGS= -n -Bstatic -T ${.CURDIR}/${BOOT}.ldscript -M
-LINKFLAGS+= --defsym=TEXTADDR=0x$(TEXT)
+LINKFLAGS+= --defsym=TEXTADDR=$(TEXT)
LINKFLAGS+= -noinhibit-exec # XXX
.include "${.CURDIR}/../Makefile.booters"
@@ -61,7 +61,7 @@
$(LD) $(LINKFLAGS) -o $(PROG).x $(OBJS) $(LDADD) >$(PROG).map
@grep first_kbyte $(PROG).map
@if [ `${TOOL_AWK} \
- '/first_kbyte/ {print "eval(eval("$$1")-eval(0x'$(TEXT)'))"}' \
+ '/first_kbyte/ {print "eval(eval("$$1")-eval('$(TEXT)'))"}' \
$(PROG).map | ${TOOL_M4} -` -gt 1024 ]; \
then echo '$(BOOT): first_kbyte exceeds the first killobyte'; \
exit 1; \
diff -r f042676916df -r 0e126f674391 sys/arch/x68k/stand/boot_ustar/Makefile
--- a/sys/arch/x68k/stand/boot_ustar/Makefile Sat Jan 18 05:41:48 2020 +0000
+++ b/sys/arch/x68k/stand/boot_ustar/Makefile Sat Jan 18 05:46:25 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.26 2020/01/18 05:41:48 isaki Exp $
+# $NetBSD: Makefile,v 1.27 2020/01/18 05:46:26 isaki Exp $
NOMAN= # defined
@@ -10,9 +10,9 @@
END { print it }' ${VERSIONFILE}
NEWVERSWHAT= "${BOOT}"
-# text and bss addresses in hex
-TEXT= 002000 # Primary (me)
-BOOT_TEXT= 006000 # Secondary (/boot)
+# text and bss addresses
+TEXT= 0x2000 # Primary (me)
+BOOT_TEXT= 0x6000 # Secondary (/boot)
BOOT_MAXSIZE= 65536 # size enough to read /boot whole
@@ -30,7 +30,7 @@
.include "${S}/conf/newvers_stand.mk"
-CPPFLAGS+= -DTEXTADDR="0x$(TEXT)" -DBOOT_TEXTADDR="0x$(BOOT_TEXT)"
+CPPFLAGS+= -DTEXTADDR="$(TEXT)" -DBOOT_TEXTADDR="$(BOOT_TEXT)"
CPPFLAGS+= -DBOOT_MAXSIZE="$(BOOT_MAXSIZE)"
CPPFLAGS+= -DBOOT=\"$(BOOT)\" -DBOOT_VERS=\"$(VERSION)\"
CPPFLAGS+= -I${COMMONDIR} -I${LIBIOCS} -I${S} -I. -D_STANDALONE
@@ -38,7 +38,7 @@
AFLAGS= ${CFLAGS:M-[ID]*}
AFLAGS+= -Wa,-march=m68000 -Wa,-mcpu=m68000
LINKFLAGS= -n -Bstatic -T ${.CURDIR}/${BOOT}.ldscript -M
-LINKFLAGS+= --defsym=TEXTADDR=0x$(TEXT)
+LINKFLAGS+= --defsym=TEXTADDR=$(TEXT)
LINKFLAGS+= -noinhibit-exec # XXX
.include "${.CURDIR}/../Makefile.booters"
@@ -52,13 +52,13 @@
$(LD) $(LINKFLAGS) -o ${PROG} $(OBJS) $(LDADD) > $(PROG).map
@grep first_kbyte $(PROG).map
@if [ `${TOOL_AWK} \
- '/first_kbyte/ {print "eval(eval("$$1")-eval(0x'$(TEXT)'))"}' \
+ '/first_kbyte/ {print "eval(eval("$$1")-eval('$(TEXT)'))"}' \
$(PROG).map | ${TOOL_M4} -` -gt 1024 ]; \
then echo '$(BOOT): first_kbyte exceeds the first killobyte'; \
rm $(PROG) ; exit 1; \
fi
@if [ `${TOOL_AWK} \
- '/_edata/ {print "eval(eval("$$1")-eval(0x'$(TEXT)'))"}' \
+ '/_edata/ {print "eval(eval("$$1")-eval('$(TEXT)'))"}' \
$(PROG).map | ${TOOL_M4} -` -gt 8192 ]; \
then echo '$(BOOT): text+data is too large'; \
rm $(PROG) ; exit 1; \
diff -r f042676916df -r 0e126f674391 sys/arch/x68k/stand/xxboot/Makefile.xxboot
--- a/sys/arch/x68k/stand/xxboot/Makefile.xxboot Sat Jan 18 05:41:48 2020 +0000
+++ b/sys/arch/x68k/stand/xxboot/Makefile.xxboot Sat Jan 18 05:46:25 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.xxboot,v 1.7 2020/01/18 05:41:49 isaki Exp $
+# $NetBSD: Makefile.xxboot,v 1.8 2020/01/18 05:46:26 isaki Exp $
NOMAN= # defined
@@ -10,11 +10,11 @@
END { print it }' ${VERSIONFILE}
NEWVERSWHAT= "${BOOT}"
-# text and bss addresses in hex
-TEXT= 0f0000 # Primary (me)
-TEXTDATASIZE= 2000 # 8KB for UFS at maximum
+# text and bss addresses
+TEXT= 0x0f0000 # Primary (me)
+TEXTDATASIZE= 0x002000 # 8KB for UFS at maximum
# 30KB (=(16-1)*2048) for ISO9660 at max.
-BOOT_TEXT= 006000 # Secondary (/boot)
+BOOT_TEXT= 0x006000 # Secondary (/boot)
PROG= $(BOOT)
BINDIR= /usr/mdec
@@ -31,16 +31,16 @@
CFLAGS= -Os -fomit-frame-pointer -fno-unwind-tables
#CFLAGS+= -Wall
CPPFLAGS+= -D_STANDALONE
-CPPFLAGS+= -DTEXTADDR="0x$(TEXT)" -DBOOT_TEXTADDR="0x$(BOOT_TEXT)"
-CPPFLAGS+= -DTDSIZE="0x$(TEXTDATASIZE)"
+CPPFLAGS+= -DTEXTADDR="$(TEXT)" -DBOOT_TEXTADDR="$(BOOT_TEXT)"
+CPPFLAGS+= -DTDSIZE="$(TEXTDATASIZE)"
CPPFLAGS+= -DPROG=\"$(PROG)\" -DBOOT_VERS=\"$(VERSION)\"
CPPFLAGS+= -DBOOT_STAGE1 $(BOOTCPPFLAGS)
CPPFLAGS+= -nostdinc -I${.OBJDIR} -I${S}
CPPFLAGS+= -I$M/stand/libiocs -I$M/stand/libsa -I$M/stand/common
AFLAGS= ${CFLAGS:M-[ID]*}
LINKFLAGS= -n -Bstatic -T ${.CURDIR}/../xxboot.ldscript -M
-LINKFLAGS+= --defsym=TEXTADDR=0x$(TEXT)
-LINKFLAGS+= --defsym=TEXTDATASIZE=0x$(TEXTDATASIZE)
+LINKFLAGS+= --defsym=TEXTADDR=$(TEXT)
+LINKFLAGS+= --defsym=TEXTDATASIZE=$(TEXTDATASIZE)
LINKFLAGS+= -noinhibit-exec # XXX
LIBIOCS!= cd $M/stand/libiocs && ${PRINTOBJDIR}
LIBSA!= cd $M/stand/libsa && ${PRINTOBJDIR}
@@ -67,16 +67,16 @@
$(LD) $(LINKFLAGS) -o ${PROG} $(OBJS) $(LDLIBS) > $(PROG).map
@grep first_kbyte $(PROG).map
@if [ `${TOOL_AWK} \
- '/first_kbyte/ {print "eval(eval("$$1")-eval(0x'$(TEXT)'))"}' \
+ '/first_kbyte/ {print "eval(eval("$$1")-eval('$(TEXT)'))"}' \
$(PROG).map | ${TOOL_M4} -` -gt 1024 ]; \
then echo '$(BOOT): first_kbyte exceeds the first killobyte'; \
rm $(PROG) ; exit 1; \
fi
@if [ `${TOOL_AWK} \
- '/_edata/ {print "eval(eval("$$1")-eval(0x'$(TEXT)'))"}' \
+ '/_edata/ {print "eval(eval("$$1")-eval('$(TEXT)'))"}' \
$(PROG).map | ${TOOL_M4} -` \
-gt \
- `echo 'eval(0x$(TEXTDATASIZE))' | ${TOOL_M4} -` ]; \
+ `echo 'eval($(TEXTDATASIZE))' | ${TOOL_M4} -` ]; \
then echo '$(BOOT): text+data is too large'; \
rm $(PROG) ; exit 1; \
fi
Home |
Main Index |
Thread Index |
Old Index