diff --git a/lib/csu/Makefile b/lib/csu/Makefile index 9b7d1beb76d6..3f45c5eb3afc 100644 --- a/lib/csu/Makefile +++ b/lib/csu/Makefile @@ -2,8 +2,8 @@ .include -.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 diff --git a/lib/libc/Makefile b/lib/libc/Makefile index d5cfe7e50013..d93091530721 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -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 diff --git a/lib/libc/powerpc64/string/Makefile.inc b/lib/libc/powerpc64/string/Makefile.inc index 7cedf0dc3d63..14f0845595c9 100644 --- a/lib/libc/powerpc64/string/Makefile.inc +++ b/lib/libc/powerpc64/string/Makefile.inc @@ -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 diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile index 2309e0c17dd1..cda56390ebe7 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -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 diff --git a/libexec/rtld-elf/rtld-libc/Makefile.inc b/libexec/rtld-elf/rtld-libc/Makefile.inc index e5759b5dcf91..74ac3668f1ad 100644 --- a/libexec/rtld-elf/rtld-libc/Makefile.inc +++ b/libexec/rtld-elf/rtld-libc/Makefile.inc @@ -5,8 +5,8 @@ .include 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