Subject: Re: toolchain/34528: when crosscompiling for sun3, can't specify -m68020
To: None <toolchain-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: netbsd-bugs
Date: 09/15/2006 16:20:02
The following reply was made to PR toolchain/34528; it has been noted by GNATS.
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: sigmfsk@aol.com
Cc: gnats-bugs@NetBSD.org, toolchain-manager@NetBSD.org,
gnats-admin@NetBSD.org, thorpej@shagadelic.org,
tsutsui@ceres.dti.ne.jp
Subject: Re: toolchain/34528: when crosscompiling for sun3, can't specify -m68020
Date: Sat, 16 Sep 2006 01:15:37 +0900
thorpej@shagadelic.org wrote:
> >> That's annoying. libsa/Makefile should completely override and
> >> ignore
> >> ANY user-specified settings. i386 standalone code does this, IIRC.
> >
> > Hmm. It just overrides CPUFLAGS and COPTS in Makefile.
> > Should sun68k/stand follow it?
>
> Yes.
Okay, please try the attached patch.
BTW, current sun68k/stand requires include files in DESTDIR.
I'll also fix it later.
---
Izumi Tsutsui
Index: sys/arch/sun68k/stand/Makefile.inc
===================================================================
RCS file: /cvsroot/src/sys/arch/sun68k/stand/Makefile.inc,v
retrieving revision 1.11
diff -u -r1.11 Makefile.inc
--- sys/arch/sun68k/stand/Makefile.inc 11 Dec 2005 12:19:29 -0000 1.11
+++ sys/arch/sun68k/stand/Makefile.inc 15 Sep 2006 15:42:48 -0000
@@ -16,8 +16,10 @@
DEFS?= -Dsun3 -D_STANDALONE -D__daddr_t=int32_t
INCL?= -I. -I${.CURDIR} -I${.CURDIR}/../libsa -I${S}/lib/libsa -I${S}
-CFLAGS= -mc68000 -Wa,-mc68010 -Os -msoft-float -fno-defer-pop -ffreestanding
-CPPFLAGS= ${DEFS} ${DBG} ${INCL}
+CPUFLAGS= -mc68000 -Wa,-mc68010
+COPTS= -Os -fno-defer-pop -ffreestanding
+CFLAGS= -msoft-float
+CPPFLAGS= ${DEFS} ${DEBUG} ${INCL}
SRTOBJ= ${LIBSA}/SRT0.o ${LIBSA}/SRT1.o
SRTLIB= ${LIBSA}/libsa.a
Index: sys/arch/sun68k/stand/libsa/Makefile
===================================================================
RCS file: /cvsroot/src/sys/arch/sun68k/stand/libsa/Makefile,v
retrieving revision 1.22
diff -u -r1.22 Makefile
--- sys/arch/sun68k/stand/libsa/Makefile 26 Jan 2006 22:16:08 -0000 1.22
+++ sys/arch/sun68k/stand/libsa/Makefile 15 Sep 2006 15:42:48 -0000
@@ -13,6 +13,8 @@
NOPIC=# defined
NOPROFILE=# defined
+.include <bsd.own.mk>
+
# Logically src/sys
S=${.CURDIR}/../../../..
DIR_SA=${S}/lib/libsa
@@ -26,14 +28,15 @@
${DIR_LIBC}/string ${DIR_LIBC}/arch/m68k/string \
${S}/arch/sun68k/sun68k
-# DBG= -DDEBUG -DNETIF_DEBUG -DNFS_DEBUG -DRPC_DEBUG \
+# DEBUG= -DDEBUG -DNETIF_DEBUG -DNFS_DEBUG -DRPC_DEBUG \
# -DNET_DEBUG -DRARP_DEBUG -DETHER_DEBUG -DDEBUG_PROM
-
+CPUFLAGS= # ignore settings in /etc/mk.conf
DEFS= -Dsun3 -D_STANDALONE -D__daddr_t=int32_t
INCL= -I. -I${.CURDIR} -I${S}/lib/libsa -I${S}
AFLAGS= -Wa,-mc68020 -Wa,-mc68851
-CFLAGS= -mc68000 -Wa,-mc68010 -Wa,-m68851 -Os -msoft-float -fno-defer-pop -ffreestanding
-CPPFLAGS= ${DEFS} ${DBG} ${INCL}
+CFLAGS= -mc68000 -Wa,-mc68010 -Wa,-m68851 -msoft-float
+COPTS= -Os -fno-defer-pop -ffreestanding
+CPPFLAGS= ${DEFS} ${DEBUG} ${INCL}
CLEANFILES= SRT0.o SRT1.o vers.c
SRC_net= net.c ether.c arp.c ip_cksum.c rarp.c
@@ -66,7 +69,6 @@
libinstall::
-.include <bsd.own.mk>
.undef DESTDIR=
.include <bsd.lib.mk>