From f7eb23ee34173aa9b90b96d2b74b6666bce82678 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Mon, 3 Dec 2018 19:16:34 +0000 Subject: [PATCH] stand/i386: rename .s to .S to use Clang IAS As part of the migration away from obsolete binutils we want to retire GNU as. Most assembly files used on amd64 have a .S extension and (via rules in share/mk/bsd.suffixes.mk) are assembled with Clang's Integrated Assembler (IAS). Rename files in stand/i386 to .S to use the integrated assembler. Clang's IAS supports the defsym option (via -Wa,) but only with one dash, not two. As both -defsym and --defsym are accepted by GNU as, use the former. PR: 233611 Reviewed by: tsoome Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18369 --- stand/i386/kgzldr/Makefile | 4 ++-- stand/i386/kgzldr/{crt.s => crt.S} | 0 stand/i386/kgzldr/{sio.s => sio.S} | 0 stand/i386/kgzldr/{start.s => start.S} | 0 stand/i386/mbr/Makefile | 4 ++-- stand/i386/mbr/{mbr.s => mbr.S} | 0 stand/i386/pmbr/Makefile | 6 ++++-- stand/i386/pmbr/{pmbr.s => pmbr.S} | 0 8 files changed, 8 insertions(+), 6 deletions(-) rename stand/i386/kgzldr/{crt.s => crt.S} (100%) rename stand/i386/kgzldr/{sio.s => sio.S} (100%) rename stand/i386/kgzldr/{start.s => start.S} (100%) rename stand/i386/mbr/{mbr.s => mbr.S} (100%) rename stand/i386/pmbr/{pmbr.s => pmbr.S} (100%) diff --git a/stand/i386/kgzldr/Makefile b/stand/i386/kgzldr/Makefile index 281f1c9f1ba0..96ba94ee535f 100644 --- a/stand/i386/kgzldr/Makefile +++ b/stand/i386/kgzldr/Makefile @@ -7,7 +7,7 @@ STRIP= BINMODE=${LIBMODE} BINDIR= ${LIBDIR} -SRCS= start.s boot.c subr_inflate.c lib.c crt.s sio.s +SRCS= start.S boot.c subr_inflate.c lib.c crt.S sio.S CFLAGS= -Os CFLAGS+=-DKZIP NO_SHARED= @@ -15,6 +15,6 @@ LDFLAGS+=-Wl,-r .PATH: ${SYSDIR}/kern BOOT_COMCONSOLE_PORT?= 0x3f8 -AFLAGS+=--defsym SIO_PRT=${BOOT_COMCONSOLE_PORT} +ACFLAGS+=-Wa,-defsym,SIO_PRT=${BOOT_COMCONSOLE_PORT} .include diff --git a/stand/i386/kgzldr/crt.s b/stand/i386/kgzldr/crt.S similarity index 100% rename from stand/i386/kgzldr/crt.s rename to stand/i386/kgzldr/crt.S diff --git a/stand/i386/kgzldr/sio.s b/stand/i386/kgzldr/sio.S similarity index 100% rename from stand/i386/kgzldr/sio.s rename to stand/i386/kgzldr/sio.S diff --git a/stand/i386/kgzldr/start.s b/stand/i386/kgzldr/start.S similarity index 100% rename from stand/i386/kgzldr/start.s rename to stand/i386/kgzldr/start.S diff --git a/stand/i386/mbr/Makefile b/stand/i386/mbr/Makefile index 26018ffb1378..dca202cb815b 100644 --- a/stand/i386/mbr/Makefile +++ b/stand/i386/mbr/Makefile @@ -3,14 +3,14 @@ PROG= mbr STRIP= BINMODE=${NOBINMODE} -SRCS= ${PROG}.s +SRCS= ${PROG}.S # MBR flags: 0x80 -- try packet interface (also known as EDD or LBA) BOOT_MBR_FLAGS?= 0x80 ORG= 0x600 -AFLAGS+=--defsym FLAGS=${BOOT_MBR_FLAGS} +ACFLAGS+=-Wa,-defsym,FLAGS=${BOOT_MBR_FLAGS} LDFLAGS+=${LDFLAGS_BIN} .include diff --git a/stand/i386/mbr/mbr.s b/stand/i386/mbr/mbr.S similarity index 100% rename from stand/i386/mbr/mbr.s rename to stand/i386/mbr/mbr.S diff --git a/stand/i386/pmbr/Makefile b/stand/i386/pmbr/Makefile index bfd6209f0406..e09bb610fc18 100644 --- a/stand/i386/pmbr/Makefile +++ b/stand/i386/pmbr/Makefile @@ -3,11 +3,13 @@ PROG= pmbr STRIP= BINMODE=${NOBINMODE} -SRCS= ${PROG}.s +SRCS= ${PROG}.S + +BOOT_MBR_FLAGS?= 0 ORG= 0x600 -AFLAGS+=--defsym FLAGS=${BOOT_MBR_FLAGS} +ACFLAGS+=-Wa,-defsym,FLAGS=${BOOT_MBR_FLAGS} LDFLAGS+=${LDFLAGS_BIN} .include diff --git a/stand/i386/pmbr/pmbr.s b/stand/i386/pmbr/pmbr.S similarity index 100% rename from stand/i386/pmbr/pmbr.s rename to stand/i386/pmbr/pmbr.S