add support for arm64 lse.S.
arm64 userland much happier now. /usr/bin/gcc as gcc 10 on arm64 is fine, build is complete, though i did not test xsrc yet.
This commit is contained in:
parent
d44b5d46ab
commit
cab9e0888f
42
external/gpl3/gcc/lib/libgcc/Makefile.inc
vendored
42
external/gpl3/gcc/lib/libgcc/Makefile.inc
vendored
@ -1,4 +1,4 @@
|
||||
# $NetBSD: Makefile.inc,v 1.47 2021/04/12 00:05:55 mrg Exp $
|
||||
# $NetBSD: Makefile.inc,v 1.48 2021/04/17 10:54:46 mrg Exp $
|
||||
|
||||
LIBGCC_MACHINE_ARCH?=${MACHINE_ARCH:S/earmv5/earm/}
|
||||
GCC_MACHINE_SUBDIR=${MACHINE_CPU:C/powerpc.*/rs6000/:C/x86_64/i386/}
|
||||
@ -30,9 +30,11 @@ CPPFLAGS+= ${G_INTERNAL_CFLAGS:M-DHAVE_CC_TLS}
|
||||
.if ${LIBGCC_MACHINE_ARCH} == "powerpc" || \
|
||||
${LIBGCC_MACHINE_ARCH} == "sh3el" || \
|
||||
${LIBGCC_MACHINE_ARCH} == "sh3eb" || \
|
||||
${LIBGCC_MACHINE_ARCH} == "m68000"
|
||||
${LIBGCC_MACHINE_ARCH} == "m68000" || \
|
||||
${LIBGCC_MACHINE_ARCH} == "aarch64" || \
|
||||
${LIBGCC_MACHINE_ARCH} == "aarch64eb"
|
||||
_TRADITIONAL_CPP=
|
||||
COMPILE.S= ${CC} ${AFLAGS} ${CPPFLAGS} -c
|
||||
COMPILE.S= ${CC} ${AFLAGS} ${CPPFLAGS} ${CPPFLAGS.${.IMPSRC:T}} -c
|
||||
.endif
|
||||
|
||||
.if ${LIBGCC_MACHINE_ARCH} == "powerpc"
|
||||
@ -166,6 +168,40 @@ ${LIB1ASMFUNCS}: ${.CURDIR}/Makefile
|
||||
printf '#define L${.PREFIX}\n#include <${G_LIB1ASMSRC}>\n' >${.TARGET}
|
||||
.endif
|
||||
|
||||
.if ${LIB} == "gcc" && \
|
||||
(${LIBGCC_MACHINE_ARCH} == "aarch64" || \
|
||||
${LIBGCC_MACHINE_ARCH} == "aarch64be") # {
|
||||
# XXX lse.S objects are placed directly into "libgcc-objects" for GCC, and
|
||||
# are not pulled out by mknative-gcc easily.
|
||||
. for s in 1 2 4 8 16
|
||||
. for m in 1 2 3 4
|
||||
. for n in cas
|
||||
LSE_NAMES+= ${n}_${s}_${m}
|
||||
CPPFLAGS.${n}_${s}_${m}+= -DL_${n} -DSIZE=${s} -DMODEL=${m}
|
||||
. endfor
|
||||
. endfor
|
||||
. endfor
|
||||
|
||||
. for s in 1 2 4 8
|
||||
. for m in 1 2 3 4
|
||||
. for n in swp ldadd ldclr ldeor ldset
|
||||
LSE_NAMES+= ${n}_${s}_${m}
|
||||
CPPFLAGS.${n}_${s}_${m}+= -DL_${n} -DSIZE=${s} -DMODEL=${m}
|
||||
. endfor
|
||||
. endfor
|
||||
. endfor
|
||||
|
||||
LSE_SRC= ${GNUHOSTDIST}/libgcc/config/aarch64/lse.S
|
||||
|
||||
${LSE_NAMES:=.o}: ${LSE_SRC} Makefile
|
||||
${_MKTARGET_COMPILE}
|
||||
${COMPILE.S} ${CPPFLAGS.${.TARGET:T:.o=}} -o ${.TARGET} ${LSE_SRC}
|
||||
|
||||
# lse-init.c currently compiles to nothing for us
|
||||
G_LIB2ADD+= ${GNUHOSTDIST}/libgcc/config/aarch64/lse-init.c
|
||||
|
||||
.endif # } arm64
|
||||
|
||||
# Use dynamic sources to arrange for the C file to be the first dependency
|
||||
# so ${.IMPSRC} will work.
|
||||
|
||||
|
5
external/gpl3/gcc/lib/libgcc/libgcc/Makefile
vendored
5
external/gpl3/gcc/lib/libgcc/libgcc/Makefile
vendored
@ -1,4 +1,4 @@
|
||||
# $NetBSD: Makefile,v 1.29 2021/04/12 00:05:55 mrg Exp $
|
||||
# $NetBSD: Makefile,v 1.30 2021/04/17 10:54:46 mrg Exp $
|
||||
|
||||
REQUIRETOOLS= yes
|
||||
NOLINT= # defined
|
||||
@ -32,7 +32,8 @@ LIB2ADD_EDITED= ${G_LIB2ADD:T:S/.asm/.S/}
|
||||
SRCS+= ${LIB2FUNCS} ${LIB2FUNCS_ST} ${LIB2DIVMOD} \
|
||||
${LIB2ADD_EDITED} \
|
||||
${LIB2ADD_HACK:T:S/.asm/.S/} \
|
||||
${G_LIB2ADD_ST:T} ${LIB1ASMFUNCS}
|
||||
${G_LIB2ADD_ST:T} ${LIB1ASMFUNCS} \
|
||||
${LSE_NAMES:=.o}
|
||||
.if ${MKPIC} == "no"
|
||||
.if empty(LIBGCC_MACHINE_ARCH:Mearm*)
|
||||
SRCS+= ${LIB2_EH} ${LIB2_EHASM}
|
||||
|
Loading…
Reference in New Issue
Block a user