From owner-svn-src-head@freebsd.org Thu Aug 27 23:46:46 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CD219C3BC7; Thu, 27 Aug 2015 23:46:46 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6B17638; Thu, 27 Aug 2015 23:46:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t7RNkjvF014003; Thu, 27 Aug 2015 23:46:45 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t7RNkg6C013955; Thu, 27 Aug 2015 23:46:42 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201508272346.t7RNkg6C013955@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 27 Aug 2015 23:46:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287227 - in head: lib/libstand share/mk sys/boot/efi sys/boot/ficl sys/boot/i386 sys/boot/libstand32 sys/boot/pc98 sys/boot/userboot/ficl sys/boot/userboot/libstand sys/boot/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Aug 2015 23:46:46 -0000 Author: imp Date: Thu Aug 27 23:46:42 2015 New Revision: 287227 URL: https://svnweb.freebsd.org/changeset/base/287227 Log: Use CFLAGS_NO_SIMD in preference to varying lists of -mno-xxxx flags. Go ahead and defined -D_STANDALONE for all targets (only strictly needed for some architecture, but harmless on those it isn't required for). Also add -msoft-float to all architectures uniformly rather that higgley piggley like it is today. Differential Revision: https://reviews.freebsd.org/D3496 Added: head/share/mk/bsd.stand.mk (contents, props changed) Modified: head/lib/libstand/Makefile head/sys/boot/efi/Makefile.inc head/sys/boot/ficl/Makefile head/sys/boot/i386/Makefile.inc head/sys/boot/libstand32/Makefile head/sys/boot/pc98/Makefile.inc head/sys/boot/userboot/ficl/Makefile head/sys/boot/userboot/libstand/Makefile head/sys/boot/zfs/Makefile Modified: head/lib/libstand/Makefile ============================================================================== --- head/lib/libstand/Makefile Thu Aug 27 23:46:11 2015 (r287226) +++ head/lib/libstand/Makefile Thu Aug 27 23:46:42 2015 (r287227) @@ -21,34 +21,8 @@ MAN= libstand.3 WARNS?= 0 -CFLAGS+= -ffreestanding -Wformat CFLAGS+= -I${LIBSTAND_SRC} -.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" -CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float -.endif -.if ${MACHINE_CPUARCH} == "i386" -CFLAGS.gcc+= -mpreferred-stack-boundary=2 -.endif -.if ${MACHINE_CPUARCH} == "amd64" -CFLAGS+= -fPIC -mno-red-zone -.endif -.if ${MACHINE} == "pc98" -CFLAGS+= -Os -.endif -.if ${MACHINE_CPUARCH} == "powerpc" -CFLAGS+= -msoft-float -D_STANDALONE -DNETIF_DEBUG -.endif -.if ${MACHINE_CPUARCH} == "arm" -CFLAGS+= -msoft-float -D_STANDALONE -.endif -.if ${MACHINE_CPUARCH} == "aarch64" -CFLAGS+= -D_STANDALONE -mgeneral-regs-only -.endif -.if ${MACHINE_CPUARCH} == "mips" -CFLAGS+= -G0 -fno-pic -mno-abicalls -.endif - # standalone components and stuff we have modified locally SRCS+= gzguts.h zutil.h __main.c assert.c bcd.c bswap.c environment.c getopt.c gets.c \ globals.c pager.c printf.c strdup.c strerror.c strtol.c strtoul.c random.c \ @@ -168,4 +142,5 @@ SRCS+= pkgfs.c SRCS+= nandfs.c .endif +.include .include Added: head/share/mk/bsd.stand.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/mk/bsd.stand.mk Thu Aug 27 23:46:42 2015 (r287227) @@ -0,0 +1,24 @@ +# $FreeBSD$ +# +# Common definitons for programs building in the stand-alone environment +# and/or using libstand. +# + +CFLAGS+= -ffreestanding -Wformat +CFLAGS+= ${CFLAGS_NO_SIMD} -msoft-float -D_STANDALONE + +.if ${MACHINE_CPUARCH} == "i386" +CFLAGS.gcc+= -mpreferred-stack-boundary=2 +.endif +.if ${MACHINE_CPUARCH} == "amd64" +CFLAGS+= -fPIC -mno-red-zone +.endif +.if ${MACHINE} == "pc98" +CFLAGS+= -Os +.endif +.if ${MACHINE_CPUARCH} == "aarch64" +CFLAGS+= -mgeneral-regs-only +.endif +.if ${MACHINE_CPUARCH} == "mips" +CFLAGS+= -G0 -fno-pic -mno-abicalls +.endif Modified: head/sys/boot/efi/Makefile.inc ============================================================================== --- head/sys/boot/efi/Makefile.inc Thu Aug 27 23:46:11 2015 (r287226) +++ head/sys/boot/efi/Makefile.inc Thu Aug 27 23:46:42 2015 (r287227) @@ -4,19 +4,18 @@ BINDIR?= /boot .if ${MACHINE_CPUARCH} == "i386" CFLAGS+= -march=i386 +CFLAGS+= -mno-aes .endif # Options used when building app-specific efi components # See conf/kern.mk for the correct set of these -CFLAGS+= -ffreestanding -Wformat -msoft-float +CFLAGS+= -ffreestanding -Wformat -msoft-float ${CFLAGS_NO_SIMD} LDFLAGS+= -nostdlib .if ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -fshort-wchar CFLAGS+= -mno-red-zone -CFLAGS+= -mno-mmx -mno-sse -CFLAGS.clang+= -mno-aes -mno-avx +CFLAGS+= -mno-aes .endif - .include "../Makefile.inc" Modified: head/sys/boot/ficl/Makefile ============================================================================== --- head/sys/boot/ficl/Makefile Thu Aug 27 23:46:11 2015 (r287226) +++ head/sys/boot/ficl/Makefile Thu Aug 27 23:46:42 2015 (r287227) @@ -15,30 +15,14 @@ BASE_SRCS= dict.c ficl.c fileaccess.c fl SRCS= ${BASE_SRCS} sysdep.c softcore.c CLEANFILES= softcore.c testmain testmain.o -CFLAGS+= -ffreestanding .if ${MACHINE_CPUARCH} == "i386" || \ (${MACHINE_CPUARCH} == "amd64" && defined(FICL32)) CFLAGS+= -march=i386 -CFLAGS.gcc+= -mpreferred-stack-boundary=2 -.endif -.if ${MACHINE_CPUARCH} == "amd64" -CFLAGS+= -mno-red-zone -.endif -.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" -CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float -.endif -.if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "mips" -CFLAGS+= -msoft-float -.endif -.if ${MACHINE} == "pc98" -CFLAGS+= -Os -DPC98 -.endif -.if ${MACHINE_CPUARCH} == "mips" -CFLAGS+= -G0 -fno-pic -mno-abicalls .endif .if HAVE_PNP CFLAGS+= -DHAVE_PNP .endif +.include .ifmake testmain CFLAGS+= -DTESTMAIN -D_TESTMAIN SRCS+= testmain.c Modified: head/sys/boot/i386/Makefile.inc ============================================================================== --- head/sys/boot/i386/Makefile.inc Thu Aug 27 23:46:11 2015 (r287226) +++ head/sys/boot/i386/Makefile.inc Thu Aug 27 23:46:42 2015 (r287227) @@ -7,7 +7,7 @@ BINDIR?= /boot LOADER_ADDRESS?=0x200000 CFLAGS+= -march=i386 -ffreestanding CFLAGS.gcc+= -mpreferred-stack-boundary=2 -CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float +CFLAGS+= ${CFLAGS_NO_SIMD} -msoft-float LDFLAGS+= -nostdlib .if ${MACHINE_CPUARCH} == "amd64" Modified: head/sys/boot/libstand32/Makefile ============================================================================== --- head/sys/boot/libstand32/Makefile Thu Aug 27 23:46:11 2015 (r287226) +++ head/sys/boot/libstand32/Makefile Thu Aug 27 23:46:42 2015 (r287227) @@ -22,29 +22,6 @@ NO_PIC= WARNS?= 0 -CFLAGS+= -ffreestanding -Wformat -CFLAGS+= -I${LIBSTAND_SRC} - -.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" -CFLAGS.gcc+= -mpreferred-stack-boundary=2 -CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float -.endif -.if ${MACHINE} == "pc98" -CFLAGS+= -Os -.endif -.if ${MACHINE_CPUARCH} == "powerpc" -CFLAGS+= -msoft-float -D_STANDALONE -DNETIF_DEBUG -.endif -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "powerpc64" -CFLAGS+= -m32 -I. -.endif -.if ${MACHINE_CPUARCH} == "arm" -CFLAGS+= -msoft-float -D_STANDALONE -.endif -.if ${MACHINE_CPUARCH} == "mips" -CFLAGS+= -G0 -fno-pic -mno-abicalls -.endif - # standalone components and stuff we have modified locally SRCS+= gzguts.h zutil.h __main.c assert.c bcd.c bswap.c environment.c getopt.c gets.c \ globals.c pager.c printf.c strdup.c strerror.c strtol.c strtoul.c random.c \ @@ -164,6 +141,7 @@ SRCS+= pkgfs.c SRCS+= nandfs.c .endif +.include .include .if ${MACHINE_CPUARCH} == "amd64" Modified: head/sys/boot/pc98/Makefile.inc ============================================================================== --- head/sys/boot/pc98/Makefile.inc Thu Aug 27 23:46:11 2015 (r287226) +++ head/sys/boot/pc98/Makefile.inc Thu Aug 27 23:46:42 2015 (r287227) @@ -7,7 +7,7 @@ BINDIR?= /boot LOADER_ADDRESS?=0x200000 CFLAGS+= -march=i386 -ffreestanding CFLAGS.gcc+= -mpreferred-stack-boundary=2 -CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float +CFLAGS+= ${CFLAGS_NO_SIMD} -msoft-float CFLAGS+= -Os -DPC98 LDFLAGS+= -nostdlib Modified: head/sys/boot/userboot/ficl/Makefile ============================================================================== --- head/sys/boot/userboot/ficl/Makefile Thu Aug 27 23:46:11 2015 (r287226) +++ head/sys/boot/userboot/ficl/Makefile Thu Aug 27 23:46:42 2015 (r287227) @@ -10,24 +10,10 @@ BASE_SRCS= dict.c ficl.c fileaccess.c fl SRCS= ${BASE_SRCS} sysdep.c softcore.c CLEANFILES= softcore.c testmain testmain.o -CFLAGS+= -ffreestanding -fPIC -.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" -#CFLAGS+= -march=i386 -CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -.endif -.if ${MACHINE_CPUARCH} == "i386" -CFLAGS.gcc+= -mpreferred-stack-boundary=2 -CFLAGS+= -mno-sse3 -.endif -.if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm" -CFLAGS+= -msoft-float -.endif -.if ${MACHINE} == "pc98" -CFLAGS+= -Os -DPC98 -.endif .if HAVE_PNP CFLAGS+= -DHAVE_PNP .endif +.include .ifmake testmain CFLAGS+= -DTESTMAIN -D_TESTMAIN SRCS+= testmain.c Modified: head/sys/boot/userboot/libstand/Makefile ============================================================================== --- head/sys/boot/userboot/libstand/Makefile Thu Aug 27 23:46:11 2015 (r287226) +++ head/sys/boot/userboot/libstand/Makefile Thu Aug 27 23:46:42 2015 (r287227) @@ -22,26 +22,6 @@ NO_PIC= WARNS?= 0 -CFLAGS+= -ffreestanding -Wformat -fPIC -CFLAGS+= -I${LIBSTAND_SRC} - -.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" -CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -.endif -.if ${MACHINE_CPUARCH} == "i386" -CFLAGS.gcc+= -mpreferred-stack-boundary=2 -CFLAGS+= -mno-sse3 -.endif -.if ${MACHINE} == "pc98" -CFLAGS+= -Os -.endif -.if ${MACHINE_CPUARCH} == "powerpc" -CFLAGS+= -msoft-float -D_STANDALONE -DNETIF_DEBUG -.endif -.if ${MACHINE_CPUARCH} == "arm" -CFLAGS+= -msoft-float -D_STANDALONE -.endif - # standalone components and stuff we have modified locally SRCS+= gzguts.h zutil.h __main.c assert.c bcd.c bswap.c environment.c getopt.c gets.c \ globals.c pager.c printf.c strdup.c strerror.c strtol.c strtoul.c random.c \ @@ -152,4 +132,5 @@ SRCS+= ufs.c nfs.c cd9660.c tftp.c gzipf SRCS+= dosfs.c ext2fs.c SRCS+= splitfs.c +.include .include Modified: head/sys/boot/zfs/Makefile ============================================================================== --- head/sys/boot/zfs/Makefile Thu Aug 27 23:46:11 2015 (r287226) +++ head/sys/boot/zfs/Makefile Thu Aug 27 23:46:42 2015 (r287227) @@ -10,14 +10,8 @@ CFLAGS+= -I${.CURDIR}/../common -I${.CUR CFLAGS+= -I${.CURDIR}/../../../lib/libstand CFLAGS+= -I${.CURDIR}/../../cddl/boot/zfs -CFLAGS+= -ffreestanding .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -march=i386 -CFLAGS.gcc+= -mpreferred-stack-boundary=2 -CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float -.endif -.if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm" -CFLAGS+= -msoft-float .endif .if ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -m32 @@ -31,6 +25,7 @@ machine: ln -sf ${.CURDIR}/../../i386/include machine .endif +.include .include .if ${MACHINE_CPUARCH} == "amd64"