summaryrefslogtreecommitdiffstats
path: root/lib/csu/aarch64/Makefile
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2015-03-19 13:53:47 +0000
committerandrew <andrew@FreeBSD.org>2015-03-19 13:53:47 +0000
commit0c72282747e49fc0753ced46a2a4cd43aea47717 (patch)
treea985d3c5d75467caa5308f28df85fb64dbe133b4 /lib/csu/aarch64/Makefile
parentab82d6c5f8b333c56da5c09c5bb1d0caedd858d5 (diff)
downloadFreeBSD-src-0c72282747e49fc0753ced46a2a4cd43aea47717.zip
FreeBSD-src-0c72282747e49fc0753ced46a2a4cd43aea47717.tar.gz
Start to import support for the AArch64 architecture from ARM. This change
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
Diffstat (limited to 'lib/csu/aarch64/Makefile')
-rw-r--r--lib/csu/aarch64/Makefile44
1 files changed, 44 insertions, 0 deletions
diff --git a/lib/csu/aarch64/Makefile b/lib/csu/aarch64/Makefile
new file mode 100644
index 0000000..bf4c7b1
--- /dev/null
+++ b/lib/csu/aarch64/Makefile
@@ -0,0 +1,44 @@
+# $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>
OpenPOWER on IntegriCloud