Date: Wed, 23 Sep 2020 00:21:51 +0000 (UTC) From: Brandon Bergren <bdragon@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366039 - in head: lib/csu lib/libc lib/libc/powerpc64/string libexec/rtld-elf libexec/rtld-elf/rtld-libc Message-ID: <202009230021.08N0LpJx024862@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bdragon Date: Wed Sep 23 00:21:51 2020 New Revision: 366039 URL: https://svnweb.freebsd.org/changeset/base/366039 Log: [PowerPC64LE] Use a shared LIBC_ARCH for powerpc64le. Given that we have converted to ELFv2 for BE already, endianness is the only difference between the two ARCHs. As such, there is no need to differentiate LIBC_ARCH between the two. Combining them like this lets us avoid needing to have two copies of several bits for no good reason. Sponsored by: Tag1 Consulting, Inc. Modified: head/lib/csu/Makefile head/lib/libc/Makefile head/lib/libc/powerpc64/string/Makefile.inc head/libexec/rtld-elf/Makefile head/libexec/rtld-elf/rtld-libc/Makefile.inc Modified: head/lib/csu/Makefile ============================================================================== --- head/lib/csu/Makefile Wed Sep 23 00:13:58 2020 (r366038) +++ head/lib/csu/Makefile Wed Sep 23 00:21:51 2020 (r366039) @@ -2,8 +2,8 @@ .include <src.opts.mk> -.if exists(${.CURDIR}/${MACHINE_ARCH}) -SUBDIR+= ${MACHINE_ARCH} +.if exists(${.CURDIR}/${MACHINE_ARCH:S/powerpc64le/powerpc64/}) +SUBDIR+= ${MACHINE_ARCH:S/powerpc64le/powerpc64/} .else SUBDIR+= ${MACHINE_CPUARCH} .endif Modified: head/lib/libc/Makefile ============================================================================== --- head/lib/libc/Makefile Wed Sep 23 00:13:58 2020 (r366038) +++ head/lib/libc/Makefile Wed Sep 23 00:21:51 2020 (r366039) @@ -15,8 +15,8 @@ LIBC_SRCTOP?= ${.CURDIR} # named MACHINE_CPUARCH, but some ABIs are different enough to require # their own libc, so allow a directory named MACHINE_ARCH to override this. -.if exists(${LIBC_SRCTOP}/${MACHINE_ARCH}) -LIBC_ARCH=${MACHINE_ARCH} +.if exists(${LIBC_SRCTOP}/${MACHINE_ARCH:S/powerpc64le/powerpc64/}) +LIBC_ARCH=${MACHINE_ARCH:S/powerpc64le/powerpc64/} .else LIBC_ARCH=${MACHINE_CPUARCH} .endif Modified: head/lib/libc/powerpc64/string/Makefile.inc ============================================================================== --- head/lib/libc/powerpc64/string/Makefile.inc Wed Sep 23 00:13:58 2020 (r366038) +++ head/lib/libc/powerpc64/string/Makefile.inc Wed Sep 23 00:21:51 2020 (r366039) @@ -10,9 +10,14 @@ MDSRCS+= \ memmove.S \ memmove_vsx.S \ memmove_resolver.c \ - strcpy_arch_2_05.S \ - strcpy.c \ - strcpy_resolver.c \ strncpy_arch_2_05.S \ strncpy.c \ strncpy_resolver.c + +# XXX Port strcpy to LE. +.if ${MACHINE_ARCH} == "powerpc64" +MDSRCS+= \ + strcpy_arch_2_05.S \ + strcpy.c \ + strcpy_resolver.c +.endif Modified: head/libexec/rtld-elf/Makefile ============================================================================== --- head/libexec/rtld-elf/Makefile Wed Sep 23 00:13:58 2020 (r366038) +++ head/libexec/rtld-elf/Makefile Wed Sep 23 00:21:51 2020 (r366039) @@ -32,8 +32,8 @@ MAN?= rtld.1 ACFLAGS+= -DLOCORE CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD -ffreestanding CFLAGS+= -I${SRCTOP}/lib/csu/common -.if exists(${RTLD_ELF_DIR}/${MACHINE_ARCH}) -RTLD_ARCH= ${MACHINE_ARCH} +.if exists(${RTLD_ELF_DIR}/${MACHINE_ARCH:S/powerpc64le/powerpc64/}) +RTLD_ARCH= ${MACHINE_ARCH:S/powerpc64le/powerpc64/} .else RTLD_ARCH= ${MACHINE_CPUARCH} .endif Modified: head/libexec/rtld-elf/rtld-libc/Makefile.inc ============================================================================== --- head/libexec/rtld-elf/rtld-libc/Makefile.inc Wed Sep 23 00:13:58 2020 (r366038) +++ head/libexec/rtld-elf/rtld-libc/Makefile.inc Wed Sep 23 00:21:51 2020 (r366039) @@ -5,8 +5,8 @@ .include <bsd.compiler.mk> LIBC_SRCTOP=${SRCTOP}/lib/libc -.if exists(${LIBC_SRCTOP}/${MACHINE_ARCH}) -LIBC_ARCH=${MACHINE_ARCH} +.if exists(${LIBC_SRCTOP}/${MACHINE_ARCH:S/powerpc64le/powerpc64/}) +LIBC_ARCH=${MACHINE_ARCH:S/powerpc64le/powerpc64/} .else LIBC_ARCH=${MACHINE_CPUARCH} .endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009230021.08N0LpJx024862>