[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.
This commit is contained in:
parent
ae6ff71edb
commit
5aa6e4493c
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
.include <src.opts.mk>
|
.include <src.opts.mk>
|
||||||
|
|
||||||
.if exists(${.CURDIR}/${MACHINE_ARCH})
|
.if exists(${.CURDIR}/${MACHINE_ARCH:S/powerpc64le/powerpc64/})
|
||||||
SUBDIR+= ${MACHINE_ARCH}
|
SUBDIR+= ${MACHINE_ARCH:S/powerpc64le/powerpc64/}
|
||||||
.else
|
.else
|
||||||
SUBDIR+= ${MACHINE_CPUARCH}
|
SUBDIR+= ${MACHINE_CPUARCH}
|
||||||
.endif
|
.endif
|
||||||
|
@ -15,8 +15,8 @@ LIBC_SRCTOP?= ${.CURDIR}
|
|||||||
# named MACHINE_CPUARCH, but some ABIs are different enough to require
|
# named MACHINE_CPUARCH, but some ABIs are different enough to require
|
||||||
# their own libc, so allow a directory named MACHINE_ARCH to override this.
|
# their own libc, so allow a directory named MACHINE_ARCH to override this.
|
||||||
|
|
||||||
.if exists(${LIBC_SRCTOP}/${MACHINE_ARCH})
|
.if exists(${LIBC_SRCTOP}/${MACHINE_ARCH:S/powerpc64le/powerpc64/})
|
||||||
LIBC_ARCH=${MACHINE_ARCH}
|
LIBC_ARCH=${MACHINE_ARCH:S/powerpc64le/powerpc64/}
|
||||||
.else
|
.else
|
||||||
LIBC_ARCH=${MACHINE_CPUARCH}
|
LIBC_ARCH=${MACHINE_CPUARCH}
|
||||||
.endif
|
.endif
|
||||||
|
@ -10,9 +10,14 @@ MDSRCS+= \
|
|||||||
memmove.S \
|
memmove.S \
|
||||||
memmove_vsx.S \
|
memmove_vsx.S \
|
||||||
memmove_resolver.c \
|
memmove_resolver.c \
|
||||||
strcpy_arch_2_05.S \
|
|
||||||
strcpy.c \
|
|
||||||
strcpy_resolver.c \
|
|
||||||
strncpy_arch_2_05.S \
|
strncpy_arch_2_05.S \
|
||||||
strncpy.c \
|
strncpy.c \
|
||||||
strncpy_resolver.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
|
||||||
|
@ -32,8 +32,8 @@ MAN?= rtld.1
|
|||||||
ACFLAGS+= -DLOCORE
|
ACFLAGS+= -DLOCORE
|
||||||
CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD -ffreestanding
|
CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD -ffreestanding
|
||||||
CFLAGS+= -I${SRCTOP}/lib/csu/common
|
CFLAGS+= -I${SRCTOP}/lib/csu/common
|
||||||
.if exists(${RTLD_ELF_DIR}/${MACHINE_ARCH})
|
.if exists(${RTLD_ELF_DIR}/${MACHINE_ARCH:S/powerpc64le/powerpc64/})
|
||||||
RTLD_ARCH= ${MACHINE_ARCH}
|
RTLD_ARCH= ${MACHINE_ARCH:S/powerpc64le/powerpc64/}
|
||||||
.else
|
.else
|
||||||
RTLD_ARCH= ${MACHINE_CPUARCH}
|
RTLD_ARCH= ${MACHINE_CPUARCH}
|
||||||
.endif
|
.endif
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
.include <bsd.compiler.mk>
|
.include <bsd.compiler.mk>
|
||||||
|
|
||||||
LIBC_SRCTOP=${SRCTOP}/lib/libc
|
LIBC_SRCTOP=${SRCTOP}/lib/libc
|
||||||
.if exists(${LIBC_SRCTOP}/${MACHINE_ARCH})
|
.if exists(${LIBC_SRCTOP}/${MACHINE_ARCH:S/powerpc64le/powerpc64/})
|
||||||
LIBC_ARCH=${MACHINE_ARCH}
|
LIBC_ARCH=${MACHINE_ARCH:S/powerpc64le/powerpc64/}
|
||||||
.else
|
.else
|
||||||
LIBC_ARCH=${MACHINE_CPUARCH}
|
LIBC_ARCH=${MACHINE_CPUARCH}
|
||||||
.endif
|
.endif
|
||||||
|
Loading…
Reference in New Issue
Block a user