Module Name: src
Committed By: christos
Date: Thu Nov 7 19:52:56 UTC 2013
Modified Files:
src/sys/arch/sun68k/stand: Makefile.inc
src/sys/arch/sun68k/stand/libsa: Makefile
Log Message:
Revert previous change:
gcc-4.8.1 converts -mc68000 to -mcpu=68000 which breaks gas. gas even
breaks with -mcpu=68010, but works with -march=68010 so we'll go with that.
To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/sun68k/stand/Makefile.inc
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/sun68k/stand/libsa/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/sun68k/stand/Makefile.inc
diff -u src/sys/arch/sun68k/stand/Makefile.inc:1.20 src/sys/arch/sun68k/stand/Makefile.inc:1.21
--- src/sys/arch/sun68k/stand/Makefile.inc:1.20 Wed Nov 6 19:43:15 2013
+++ src/sys/arch/sun68k/stand/Makefile.inc Thu Nov 7 14:52:56 2013
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.20 2013/11/07 00:43:15 christos Exp $
+# $NetBSD: Makefile.inc,v 1.21 2013/11/07 19:52:56 christos Exp $
# Must have S=/usr/src/sys (or equivalent)
# But note: this is w.r.t. a subdirectory
@@ -18,7 +18,13 @@ RELOC?= 240000
DEFS?= -Dsun3 -D_STANDALONE -D__daddr_t=int32_t
INCL?= -I. -I${.CURDIR} -I${.CURDIR}/../libsa -I${S}/lib/libsa -I${S}
-CPUFLAGS= -m68020 -Wa,-mc68020
+.if defined(HAVE_GCC) && ${HAVE_GCC} >= 48
+# gcc 4.8 convers -mc68000 to -mcpu=68000 and that breaks gas
+# which works for -march=68010 but breaks for -mcpu=68010
+CPUFLAGS= -march=68010
+.else
+CPUFLAGS= -mc68000 -Wa,-mc68010
+.endif
COPTS= -Os -fno-defer-pop -ffreestanding -fno-unwind-tables
CFLAGS= -msoft-float
CPPFLAGS= ${DEFS} ${DEBUG} ${INCL}
Index: src/sys/arch/sun68k/stand/libsa/Makefile
diff -u src/sys/arch/sun68k/stand/libsa/Makefile:1.30 src/sys/arch/sun68k/stand/libsa/Makefile:1.31
--- src/sys/arch/sun68k/stand/libsa/Makefile:1.30 Wed Nov 6 19:43:15 2013
+++ src/sys/arch/sun68k/stand/libsa/Makefile Thu Nov 7 14:52:56 2013
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.30 2013/11/07 00:43:15 christos Exp $
+# $NetBSD: Makefile,v 1.31 2013/11/07 19:52:56 christos Exp $
# Logically src/sys
+.include <bsd.own.mk>
S!= cd ${.CURDIR}/../../../..; pwd
DIR_SA=${S}/lib/libsa
DIR_KERN=${S}/lib/libkern ${S}/lib/libkern/arch/m68k
@@ -12,8 +13,15 @@ DIR_LIBC=${S}/../common/lib/libc
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} -I${S}/arch
-AFLAGS= -Wa,-m68020 -Wa,-m68851
-CFLAGS= -m68020 ${AFLAGS} -msoft-float
+AFLAGS= -Wa,-mc68020 -Wa,-mc68851
+.if defined(HAVE_GCC) && ${HAVE_GCC} >= 48
+# gcc 4.8 convers -mc68000 to -mcpu=68000 and that breaks gas
+# which works for -march=68010 but breaks for -mcpu=68010
+CFLAGS= -march=68010
+.else
+CFLAGS= -mc68000 -Wa,-mc68010
+.endif
+CFLAGS+= -Wa,-m68851 -msoft-float
CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
COPTS= -Os -fno-defer-pop -ffreestanding -fno-unwind-tables
CPPFLAGS= ${DEFS} ${DEBUG} ${INCL}