Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Aug 2019 17:34:08 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r351515 - in stable: 11/stand 11/stand/i386/boot2 11/stand/libsa 12/stand 12/stand/i386/boot2 12/stand/libsa
Message-ID:  <201908261734.x7QHY85Z027008@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Mon Aug 26 17:34:07 2019
New Revision: 351515
URL: https://svnweb.freebsd.org/changeset/base/351515

Log:
  MFC r351119, r351135-r351136, r351412: stand xtoolchain-llvm90 fixes
  
  r351119:
  stand: push LIBC_SRC up into defs.mk
  
  Other parts of stand/ that don't use libsa will need to grab bits from libc
  shortly. Push LIBC_SRC up to defs.mk in advance of this so that they can use
  it, and rename it to LIBCSRC to match the convention of the rest of the *SRC
  variables in this file.
  
  r351135:
  stand: boot2: fix build with xtoolchain-llvm90
  
  ufsread.c grows a dependency on __ashldi3 with llvm90. Grab ashldi3.c out of
  compiler-rt rather than trying to link against libsa (for now).
  -Wno-missing-prototypes is necessary to compile ashldi3.c standalone.
  
  r351136:
  stand: gptboot: fix build with xtoolchain-llvm90
  
  ufsread.c grows a dependency on __ashldi3 with llvm90. For gptboot, just
  start pulling in ashldi3.c ashrdi3.c lshrdi3.c into libsa for all archs as
  the number of archs requiring one or more of them keeps growing. qdivrem.c
  and quad.h can be trivially kicked out of libsa if we start pulling these
  from compiler-rt as qdivrem was only used to implement umoddi3, divdi3,
  moddi3 (also in qdivrem.c).
  
  r351412:
  stand: boot2: fix amd64-xtoolchain-gcc build
  
  -Wno-missing-declarations is the GCC equivalent of
  -Wno-missing-prototypes... this was overlooked in r351135.

Deleted:
  stable/12/stand/libsa/qdivrem.c
  stable/12/stand/libsa/quad.h
Modified:
  stable/12/stand/defs.mk
  stable/12/stand/i386/boot2/Makefile
  stable/12/stand/libsa/Makefile
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Deleted:
  stable/11/stand/libsa/qdivrem.c
  stable/11/stand/libsa/quad.h
Modified:
  stable/11/stand/defs.mk
  stable/11/stand/i386/boot2/Makefile
  stable/11/stand/libsa/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/stand/defs.mk
==============================================================================
--- stable/12/stand/defs.mk	Mon Aug 26 17:27:36 2019	(r351514)
+++ stable/12/stand/defs.mk	Mon Aug 26 17:34:07 2019	(r351515)
@@ -29,6 +29,7 @@ SASRC=		${BOOTSRC}/libsa
 SYSDIR=		${SRCTOP}/sys
 UBOOTSRC=	${BOOTSRC}/uboot
 ZFSSRC=		${SASRC}/zfs
+LIBCSRC=	${SRCTOP}/lib/libc
 
 BOOTOBJ=	${OBJTOP}/stand
 

Modified: stable/12/stand/i386/boot2/Makefile
==============================================================================
--- stable/12/stand/i386/boot2/Makefile	Mon Aug 26 17:27:36 2019	(r351514)
+++ stable/12/stand/i386/boot2/Makefile	Mon Aug 26 17:34:07 2019	(r351515)
@@ -78,7 +78,12 @@ boot2.ldr:
 boot2.bin: boot2.out
 	${OBJCOPY} -S -O binary boot2.out ${.TARGET}
 
-boot2.out: ${BTXCRT} boot2.o sio.o
+# For __ashldi3
+.PATH: ${SRCTOP}/contrib/compiler-rt/lib/builtins
+CFLAGS.ashldi3.c=	-Wno-missing-prototypes -Wno-missing-declarations
+CLEANFILES+=	ashldi3.o
+
+boot2.out: ${BTXCRT} boot2.o sio.o ashldi3.o
 	${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC}
 
 SRCS=	boot2.c boot2.h

Modified: stable/12/stand/libsa/Makefile
==============================================================================
--- stable/12/stand/libsa/Makefile	Mon Aug 26 17:27:36 2019	(r351514)
+++ stable/12/stand/libsa/Makefile	Mon Aug 26 17:34:07 2019	(r351515)
@@ -9,7 +9,6 @@
 .include <bsd.init.mk>
 
 LIBSA_CPUARCH?=${MACHINE_CPUARCH}
-LIBC_SRC=	${SRCTOP}/lib/libc
 
 LIB?=		sa
 
@@ -21,20 +20,20 @@ SRCS+=	gzguts.h zutil.h __main.c abort.c assert.c bcd.
 # private (pruned) versions of libc string functions
 SRCS+=	strcasecmp.c
 
-.PATH: ${LIBC_SRC}/net
+.PATH: ${LIBCSRC}/net
 
 SRCS+= ntoh.c
 
 # string functions from libc
-.PATH: ${LIBC_SRC}/string
+.PATH: ${LIBCSRC}/string
 SRCS+=	bcmp.c bcopy.c bzero.c ffs.c fls.c \
 	memccpy.c memchr.c memcmp.c memcpy.c memmove.c memset.c \
-	qdivrem.c strcat.c strchr.c strcmp.c strcpy.c stpcpy.c stpncpy.c \
+	strcat.c strchr.c strcmp.c strcpy.c stpcpy.c stpncpy.c \
 	strcspn.c strlcat.c strlcpy.c strlen.c strncat.c strncmp.c strncpy.c \
 	strnlen.c strpbrk.c strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c
 
 # stdlib functions from libc
-.PATH: ${LIBC_SRC}/stdlib
+.PATH: ${LIBCSRC}/stdlib
 SRCS+=	abs.c strtol.c strtoll.c strtoul.c strtoull.c
 
 # common boot code
@@ -42,7 +41,7 @@ SRCS+=	abs.c strtol.c strtoll.c strtoul.c strtoull.c
 SRCS+=	subr_boot.c
 
 .if ${MACHINE_CPUARCH} == "arm"
-.PATH: ${LIBC_SRC}/arm/gen
+.PATH: ${LIBCSRC}/arm/gen
 
 # Do not generate movt/movw, because the relocation fixup for them does not
 # translate to the -Bsymbolic -pie format required by self_reloc() in loader(8).
@@ -54,36 +53,30 @@ CFLAGS.clang+=	-mno-movt
 .endif
 CFLAGS.clang+=	-mfpu=none
 
-# Compiler support functions
-.PATH: ${SRCTOP}/contrib/compiler-rt/lib/builtins/
-# __clzsi2 and ctzsi2 for various builtin functions
-SRCS+=	clzsi2.c ctzsi2.c
-# Divide and modulus functions called by the compiler
-SRCS+=	 divmoddi4.c  divmodsi4.c  divdi3.c  divsi3.c  moddi3.c  modsi3.c
-SRCS+=	udivmoddi4.c udivmodsi4.c udivdi3.c udivsi3.c umoddi3.c umodsi3.c
-
 .PATH: ${SRCTOP}/contrib/compiler-rt/lib/builtins/arm/
 SRCS+=	aeabi_idivmod.S aeabi_ldivmod.S aeabi_uidivmod.S aeabi_uldivmod.S
 SRCS+=	aeabi_memcmp.S aeabi_memcpy.S aeabi_memmove.S aeabi_memset.S
 .endif
 
 .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "riscv"
-.PATH: ${LIBC_SRC}/${MACHINE_CPUARCH}/gen
+.PATH: ${LIBCSRC}/${MACHINE_CPUARCH}/gen
 .endif
 
-.if ${MACHINE_CPUARCH} == "powerpc"
-.PATH: ${LIBC_SRC}/quad
+# Compiler support functions
+.PATH: ${SRCTOP}/contrib/compiler-rt/lib/builtins/
+# __clzsi2 and ctzsi2 for various builtin functions
+SRCS+=	clzsi2.c ctzsi2.c
+# Divide and modulus functions called by the compiler
+SRCS+=	divmoddi4.c  divmodsi4.c  divdi3.c  divsi3.c  moddi3.c  modsi3.c
+SRCS+=	udivmoddi4.c udivmodsi4.c udivdi3.c udivsi3.c umoddi3.c umodsi3.c
 SRCS+=	ashldi3.c ashrdi3.c lshrdi3.c
+
+.if ${MACHINE_CPUARCH} == "powerpc"
 SRCS+=	syncicache.c
 .endif
 
-.if ${MACHINE_CPUARCH} == "mips"
-.PATH: ${LIBC_SRC}/quad
-SRCS+=	ashldi3.c ashrdi3.c lshrdi3.c
-.endif
-
 # uuid functions from libc
-.PATH: ${LIBC_SRC}/uuid
+.PATH: ${LIBCSRC}/uuid
 SRCS+= uuid_create_nil.c uuid_equal.c uuid_from_string.c uuid_is_nil.c uuid_to_string.c
 
 # _setjmp/_longjmp



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908261734.x7QHY85Z027008>