0c72282747
only adds support for kernel-toolchain, however it is expected further changes to add kernel and userland support will be committed as they are reviewed. As our copy of binutils is too old the devel/aarch64-binutils port needs to be installed to pull in a linker. To build either TARGET needs to be set to arm64, or TARGET_ARCH set to aarch64. The latter is set so uname -p will return aarch64 as existing third party software expects this. Differential Revision: https://reviews.freebsd.org/D2005 Relnotes: Yes Sponsored by: The FreeBSD Foundation
45 lines
999 B
Makefile
45 lines
999 B
Makefile
# $FreeBSD$
|
|
|
|
.PATH: ${.CURDIR}/../common
|
|
|
|
SRCS= crt1.c crti.S crtn.S
|
|
OBJS= ${SRCS:N*.h:R:S/$/.o/g}
|
|
OBJS+= Scrt1.o gcrt1.o
|
|
CFLAGS+= -I${.CURDIR}/../common \
|
|
-I${.CURDIR}/../../libc/include
|
|
|
|
all: ${OBJS}
|
|
|
|
CLEANFILES= ${OBJS}
|
|
CLEANFILES+= crt1.s gcrt1.s Scrt1.s
|
|
|
|
# See the comment in lib/csu/common/crtbrand.c for the reason crt1.c is not
|
|
# directly compiled to .o files.
|
|
|
|
crt1.s: crt1.c
|
|
${CC} ${CFLAGS} -S -o ${.TARGET} ${.CURDIR}/crt1.c
|
|
sed ${SED_FIX_NOTE} ${.TARGET}
|
|
|
|
crt1.o: crt1.s
|
|
${CC} ${ACFLAGS} -c -o ${.TARGET} crt1.s
|
|
|
|
gcrt1.s: crt1.c
|
|
${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c
|
|
sed ${SED_FIX_NOTE} ${.TARGET}
|
|
|
|
gcrt1.o: gcrt1.s
|
|
${CC} ${ACFLAGS} -c -o ${.TARGET} gcrt1.s
|
|
|
|
Scrt1.s: crt1.c
|
|
${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1.c
|
|
sed ${SED_FIX_NOTE} ${.TARGET}
|
|
|
|
Scrt1.o: Scrt1.s
|
|
${CC} ${ACFLAGS} -c -o ${.TARGET} Scrt1.s
|
|
|
|
realinstall:
|
|
${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
|
${OBJS} ${DESTDIR}${LIBDIR}
|
|
|
|
.include <bsd.lib.mk>
|