From 3adabe6283f026d21bdac5d05607033e3bb49785 Mon Sep 17 00:00:00 2001 From: mrg Date: Fri, 12 May 2006 01:23:51 +0000 Subject: [PATCH] - -mcpu=i386 is gone in GCC4 - we need -Wno-attributes (to avoid __packed__ warnings) - use -Wno-pointer-sign - remove some redundancy from pxeboot/Makefile --- sys/arch/i386/stand/Makefile.booters | 8 ++++++-- sys/arch/i386/stand/Makefile.inc | 4 +++- sys/arch/i386/stand/boot/Makefile.boot | 9 ++++++++- sys/arch/i386/stand/bootxx/Makefile.bootxx | 6 +++++- sys/arch/i386/stand/pxeboot/Makefile | 8 +++----- 5 files changed, 25 insertions(+), 10 deletions(-) diff --git a/sys/arch/i386/stand/Makefile.booters b/sys/arch/i386/stand/Makefile.booters index e26cbe73f3d6..77abb3080318 100644 --- a/sys/arch/i386/stand/Makefile.booters +++ b/sys/arch/i386/stand/Makefile.booters @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.booters,v 1.62 2005/12/11 12:17:47 christos Exp $ +# $NetBSD: Makefile.booters,v 1.63 2006/05/12 01:23:51 mrg Exp $ .include @@ -16,7 +16,11 @@ LIBC= # nothing CPUFLAGS= -m32 CPPFLAGS+= -DBOOT_ELF64 .else -CPUFLAGS= -mcpu=i386 +.if ${HAVE_GCC} == 3 +CPUFLAGS= -mcpu=i386 +.else +CPUFLAGS= -march=i386 -mtune=i386 -Wno-attributes +.endif .endif COPTS= -Os -ffreestanding diff --git a/sys/arch/i386/stand/Makefile.inc b/sys/arch/i386/stand/Makefile.inc index cdb40b88ab2b..406ae7479c09 100644 --- a/sys/arch/i386/stand/Makefile.inc +++ b/sys/arch/i386/stand/Makefile.inc @@ -1,3 +1,5 @@ -# $NetBSD: Makefile.inc,v 1.1 2002/02/17 20:03:06 thorpej Exp $ +# $NetBSD: Makefile.inc,v 1.2 2006/05/12 01:23:51 mrg Exp $ BINDIR= /usr/mdec + +CFLAGS+= -Wno-pointer-sign diff --git a/sys/arch/i386/stand/boot/Makefile.boot b/sys/arch/i386/stand/boot/Makefile.boot index cb2c38c48845..ce4622423a32 100644 --- a/sys/arch/i386/stand/boot/Makefile.boot +++ b/sys/arch/i386/stand/boot/Makefile.boot @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.boot,v 1.25 2005/12/11 12:17:47 christos Exp $ +# $NetBSD: Makefile.boot,v 1.26 2006/05/12 01:23:51 mrg Exp $ S= ${.CURDIR}/../../../../../ @@ -46,7 +46,11 @@ LIBKERN_ARCH=i386 KERNMISCMAKEFLAGS="LIBKERN_ARCH=i386" CPPFLAGS+= -DBOOT_ELF64 .else +.if ${HAVE_GCC} == 3 CPUFLAGS= -mcpu=i386 +.else +CPUFLAGS= -march=i386 -mtune=i386 +.endif .endif COPTS+= -ffreestanding @@ -77,6 +81,9 @@ SAMISCCPPFLAGS+= -DHEAP_START=0x20000 -DHEAP_LIMIT=0x50000 SAMISCMAKEFLAGS+= SA_USE_CREAD=yes # Read compressed kernels SAMISCMAKEFLAGS+= SA_INCLUDE_NET=no # Netboot via TFTP, NFS +.if ${HAVE_GCC} == 4 +CPPFLAGS+= -Wno-pointer-sign +.endif # CPPFLAGS+= -DBOOTXX_RAID1_SUPPORT diff --git a/sys/arch/i386/stand/bootxx/Makefile.bootxx b/sys/arch/i386/stand/bootxx/Makefile.bootxx index 5e2d188ca3b9..8f57b4a6d8e7 100644 --- a/sys/arch/i386/stand/bootxx/Makefile.bootxx +++ b/sys/arch/i386/stand/bootxx/Makefile.bootxx @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.bootxx,v 1.19 2005/12/11 12:17:48 christos Exp $ +# $NetBSD: Makefile.bootxx,v 1.20 2006/05/12 01:23:51 mrg Exp $ S= ${.CURDIR}/../../../../../ @@ -57,7 +57,11 @@ LIBKERN_ARCH=i386 KERNMISCMAKEFLAGS="LIBKERN_ARCH=i386" CPPFLAGS+= -DBOOT_ELF64 .else +.if ${HAVE_GCC} == 3 CPUFLAGS= -mcpu=i386 +.else +CPUFLAGS= -march=i386 -mtune=i386 +.endif .endif COPTS+= -ffreestanding diff --git a/sys/arch/i386/stand/pxeboot/Makefile b/sys/arch/i386/stand/pxeboot/Makefile index 648f71b07ac7..b602415fd637 100644 --- a/sys/arch/i386/stand/pxeboot/Makefile +++ b/sys/arch/i386/stand/pxeboot/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.9 2005/11/11 21:42:13 dsl Exp $ +# $NetBSD: Makefile,v 1.10 2006/05/12 01:23:51 mrg Exp $ S= ${.CURDIR}/../../../../ @@ -19,15 +19,13 @@ SRCS= main.c dev_net.c devopen.c conf.c exec.c pxe.c pxe_call.S .PATH: ${.CURDIR}/../libsa SRCS+= nfs.c +.include + .if ${MACHINE} == "amd64" LD+= -m elf_i386 AFLAGS+= -m32 -CPUFLAGS= -m32 LIBKERN_ARCH=i386 KERNMISCMAKEFLAGS="LIBKERN_ARCH=i386" -CPPFLAGS+= -DBOOT_ELF64 -.else -CPUFLAGS= -mcpu=i386 .endif CPPFLAGS+= -DSLOW # for libz