aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarino <marino@FreeBSD.org>2017-02-03 13:50:24 +0800
committermarino <marino@FreeBSD.org>2017-02-03 13:50:24 +0800
commitca1e13680d5c262dc9e5db751c57854b1095ab6f (patch)
tree01cf0a66497115770518039cb3901d1cf49b3dc0
parent2d4e88e5054e839289e3e247c36c2c4e7d102be2 (diff)
downloadfreebsd-ports-gnome-ca1e13680d5c262dc9e5db751c57854b1095ab6f.tar.gz
freebsd-ports-gnome-ca1e13680d5c262dc9e5db751c57854b1095ab6f.tar.zst
freebsd-ports-gnome-ca1e13680d5c262dc9e5db751c57854b1095ab6f.zip
Add gnatcross-aarch64, a slave port of gnatdroid (C/Ada cross-compiler)
This is a FreeBSD/DF cross-compiler targeting FreeBSD/ARM64 (aarch64). It differs from devel/aarch64-none-elf-gcc in the following ways: 1) uses FreeBSD/ARM64 headers and libs (true sysroot) 2) Supports Ada front end 3) Supports Fortran front end (optionally, default off) 4) Supports ObjC front end (optionally, default off) It passes all but 5 ACATS tests: 1) c34005o (GNAT ICE, expand_shift_1 at expmed.c:2490) 2) c34007i (GNAT ICE, expand_shift_1 at expmed.c:2490) 3) cb1010a (stack check related) 4) cb1010c (stack check related) 5) cb1010d (stack check related) Ideally this cross-compiler will lead to a fully native Ada compiler for FreeBSD/ARM64 which leads to lang/gcc6-aux support, enabling the Ada framework for that platform.
-rw-r--r--lang/Makefile3
-rw-r--r--lang/gnatcross-aarch64/Makefile24
-rw-r--r--lang/gnatcross-aarch64/pkg-descr4
-rw-r--r--lang/gnatcross-binutils-aarch64/Makefile22
-rw-r--r--lang/gnatcross-binutils-aarch64/pkg-descr5
-rw-r--r--lang/gnatcross-binutils-aarch64/pkg-plist65
-rw-r--r--lang/gnatcross-sysroot-aarch64/Makefile44
-rw-r--r--lang/gnatcross-sysroot-aarch64/distinfo3
-rw-r--r--lang/gnatcross-sysroot-aarch64/pkg-descr4
9 files changed, 174 insertions, 0 deletions
diff --git a/lang/Makefile b/lang/Makefile
index 203cbc02e6d2..0f361f2e7da4 100644
--- a/lang/Makefile
+++ b/lang/Makefile
@@ -110,6 +110,9 @@
SUBDIR += ghc
SUBDIR += gjs
SUBDIR += gnat_util
+ SUBDIR += gnatcross-aarch64
+ SUBDIR += gnatcross-binutils-aarch64
+ SUBDIR += gnatcross-sysroot-aarch64
SUBDIR += gnatdroid-armv7
SUBDIR += gnatdroid-binutils
SUBDIR += gnatdroid-binutils-x86
diff --git a/lang/gnatcross-aarch64/Makefile b/lang/gnatcross-aarch64/Makefile
new file mode 100644
index 000000000000..f7b98c8cdc96
--- /dev/null
+++ b/lang/gnatcross-aarch64/Makefile
@@ -0,0 +1,24 @@
+# Created by: John Marino <marino@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= aarch64
+PORTREVISION= ${ARM64_PR}
+PKGNAMEPREFIX= gnatcross-
+
+MAINTAINER= marino@FreeBSD.org
+COMMENT= C/Ada cross-compiler, target: ${LABEL_TARGET}
+
+LABEL_TARGET= FreeBSD/ARM64
+DROID_TARGET= aarch64-aux-freebsd11.0
+ARG_ARCH= # don't specify
+ARG_FPU= # don't specify
+ARG_FLOATSOFT= # don't specify
+SRPREFIX= ${LOCALBASE}/FreeBSD_ARM64/sysroot
+GNATPREFIX= ${LOCALBASE}/FreeBSD_ARM64
+SYSROOT= gnatcross-sysroot-aarch64
+GDBINUTILS= gnatcross-binutils-aarch64
+MASTERDIR= ${.CURDIR}/../../lang/gnatdroid-armv7
+PATCHDIR= ${.CURDIR}/files
+DESCR= ${.CURDIR}/pkg-descr
+
+.include "${MASTERDIR}/Makefile"
diff --git a/lang/gnatcross-aarch64/pkg-descr b/lang/gnatcross-aarch64/pkg-descr
new file mode 100644
index 000000000000..490258c88875
--- /dev/null
+++ b/lang/gnatcross-aarch64/pkg-descr
@@ -0,0 +1,4 @@
+The gnatcross-aarch64 port builds a C/Ada cross-compiler based on GCC 6
+that targets the FreeBSD/ARM64 operating system.
+
+WWW: http://www.dragonlace.net
diff --git a/lang/gnatcross-binutils-aarch64/Makefile b/lang/gnatcross-binutils-aarch64/Makefile
new file mode 100644
index 000000000000..e5dc0ef470af
--- /dev/null
+++ b/lang/gnatcross-binutils-aarch64/Makefile
@@ -0,0 +1,22 @@
+# Created by: John Marino <marino@FreeBSD.org>
+# $FreeBSD$
+
+PORTREVISION= 0
+PKGNAMEPREFIX= gnatcross-
+PKGNAMESUFFIX= -aarch64
+
+MAINTAINER= marino@FreeBSD.org
+COMMENT= Infrastructure for C/Ada FreeBSD cross-compiler (aarch64)
+
+BRANCH2= # Assume aarch64 will always be only CPU for FreeBSD/ARM64
+XCCTARGET= aarch64-aux-freebsd11.0
+PREFIX= ${LOCALBASE}/FreeBSD_ARM64
+SRPREFIX= ${PREFIX}/sysroot
+SYSROOT= gnatcross-sysroot-aarch64
+MASTERDIR= ${.CURDIR}/../../lang/gnatdroid-binutils
+PLIST= ${.CURDIR}/pkg-plist
+DESCR= ${.CURDIR}/pkg-descr
+
+PLIST_SUB= AMD64=${ARCH:S/i386/"@comment "/:S/${ARCH}/""/}
+
+.include "${MASTERDIR}/Makefile"
diff --git a/lang/gnatcross-binutils-aarch64/pkg-descr b/lang/gnatcross-binutils-aarch64/pkg-descr
new file mode 100644
index 000000000000..0527a132905a
--- /dev/null
+++ b/lang/gnatcross-binutils-aarch64/pkg-descr
@@ -0,0 +1,5 @@
+This package is a dependency of lang/gnatdroid-x86. It provides the
+cross-tools required to build the GNAT FreeBSD->x86 cross-compiler that
+is gnatdroid, as well as any binaries that it produces.
+
+WWW: http://www.dragonlace.net
diff --git a/lang/gnatcross-binutils-aarch64/pkg-plist b/lang/gnatcross-binutils-aarch64/pkg-plist
new file mode 100644
index 000000000000..00b00ae8b295
--- /dev/null
+++ b/lang/gnatcross-binutils-aarch64/pkg-plist
@@ -0,0 +1,65 @@
+%%TARGET%%/bin/ar
+%%TARGET%%/bin/as
+%%TARGET%%/bin/ld
+%%TARGET%%/bin/ld.bfd
+%%TARGET%%/bin/nm
+%%TARGET%%/bin/objcopy
+%%TARGET%%/bin/objdump
+%%TARGET%%/bin/ranlib
+%%TARGET%%/bin/readelf
+%%TARGET%%/bin/strip
+%%TARGET%%/lib/ldscripts/aarch64elf.x
+%%TARGET%%/lib/ldscripts/aarch64elf.xbn
+%%TARGET%%/lib/ldscripts/aarch64elf.xc
+%%TARGET%%/lib/ldscripts/aarch64elf.xd
+%%TARGET%%/lib/ldscripts/aarch64elf.xdc
+%%TARGET%%/lib/ldscripts/aarch64elf.xdw
+%%TARGET%%/lib/ldscripts/aarch64elf.xn
+%%TARGET%%/lib/ldscripts/aarch64elf.xr
+%%TARGET%%/lib/ldscripts/aarch64elf.xs
+%%TARGET%%/lib/ldscripts/aarch64elf.xsc
+%%TARGET%%/lib/ldscripts/aarch64elf.xsw
+%%TARGET%%/lib/ldscripts/aarch64elf.xu
+%%TARGET%%/lib/ldscripts/aarch64elf.xw
+%%TARGET%%/lib/ldscripts/aarch64fbsd.x
+%%TARGET%%/lib/ldscripts/aarch64fbsd.xbn
+%%TARGET%%/lib/ldscripts/aarch64fbsd.xc
+%%TARGET%%/lib/ldscripts/aarch64fbsd.xd
+%%TARGET%%/lib/ldscripts/aarch64fbsd.xdc
+%%TARGET%%/lib/ldscripts/aarch64fbsd.xdw
+%%TARGET%%/lib/ldscripts/aarch64fbsd.xn
+%%TARGET%%/lib/ldscripts/aarch64fbsd.xr
+%%TARGET%%/lib/ldscripts/aarch64fbsd.xs
+%%TARGET%%/lib/ldscripts/aarch64fbsd.xsc
+%%TARGET%%/lib/ldscripts/aarch64fbsd.xsw
+%%TARGET%%/lib/ldscripts/aarch64fbsd.xu
+%%TARGET%%/lib/ldscripts/aarch64fbsd.xw
+%%TARGET%%/lib/ldscripts/aarch64fbsdb.x
+%%TARGET%%/lib/ldscripts/aarch64fbsdb.xbn
+%%TARGET%%/lib/ldscripts/aarch64fbsdb.xc
+%%TARGET%%/lib/ldscripts/aarch64fbsdb.xd
+%%TARGET%%/lib/ldscripts/aarch64fbsdb.xdc
+%%TARGET%%/lib/ldscripts/aarch64fbsdb.xdw
+%%TARGET%%/lib/ldscripts/aarch64fbsdb.xn
+%%TARGET%%/lib/ldscripts/aarch64fbsdb.xr
+%%TARGET%%/lib/ldscripts/aarch64fbsdb.xs
+%%TARGET%%/lib/ldscripts/aarch64fbsdb.xsc
+%%TARGET%%/lib/ldscripts/aarch64fbsdb.xsw
+%%TARGET%%/lib/ldscripts/aarch64fbsdb.xu
+%%TARGET%%/lib/ldscripts/aarch64fbsdb.xw
+bin/%%TARGET%%-addr2line
+bin/%%TARGET%%-ar
+bin/%%TARGET%%-as
+bin/%%TARGET%%-c++filt
+bin/%%TARGET%%-elfedit
+bin/%%TARGET%%-gprof
+bin/%%TARGET%%-ld
+bin/%%TARGET%%-ld.bfd
+bin/%%TARGET%%-nm
+bin/%%TARGET%%-objcopy
+bin/%%TARGET%%-objdump
+bin/%%TARGET%%-ranlib
+bin/%%TARGET%%-readelf
+bin/%%TARGET%%-size
+bin/%%TARGET%%-strings
+bin/%%TARGET%%-strip
diff --git a/lang/gnatcross-sysroot-aarch64/Makefile b/lang/gnatcross-sysroot-aarch64/Makefile
new file mode 100644
index 000000000000..25ea775ab920
--- /dev/null
+++ b/lang/gnatcross-sysroot-aarch64/Makefile
@@ -0,0 +1,44 @@
+# Created by: John Marino <marino@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= sysroot
+PORTVERSION= 1
+CATEGORIES= lang
+MASTER_SITES= ${PUB_FREEBSD}/releases/arm64/aarch64/11.0-RELEASE/:R11
+PKGNAMEPREFIX= gnatcross-
+PKGNAMESUFFIX= -aarch64
+DIST_SUBDIR= gnatcross/arm64-aarch64/${RELEASE}
+
+MAINTAINER= marino@FreeBSD.org
+COMMENT= FreeBSD sysroots for C/Ada cross-compiler (${ARCH})
+
+NO_BUILD= yes
+NO_MTREE= yes
+
+PUB_FREEBSD= ftp://ftp.freebsd.org/pub/FreeBSD
+PREFIX= ${LOCALBASE}/FreeBSD_ARM64
+
+ONLY_FOR_ARCHS= i386 amd64 # avoid aarch64 x aarch64
+EXTRACT_AFTER_ARGS= lib/ usr/include/ usr/lib/
+
+OPTIONS_SINGLE= SG1
+OPTIONS_SINGLE_SG1= RELEASE_11_0
+OPTIONS_DEFAULT= RELEASE_11_0
+
+RELEASE_11_0_DESC= FreeBSD 11.0 Release
+RELEASE_11_0_DISTFILES= base.txz:R11
+RELEASE_11_0_VARS= RELEASE=R11_0 CTARGET=aarch64-aux-freebsd11.0
+
+post-extract:
+ /bin/chflags -R noschg ${WRKDIR}
+
+do-install:
+ @${MKDIR} ${STAGEDIR}${PREFIX}/sysroot
+ @${MV} ${WRKDIR}/lib ${STAGEDIR}${PREFIX}/sysroot
+ @${MV} ${WRKDIR}/usr ${STAGEDIR}${PREFIX}/sysroot
+ @echo ${CTARGET} > ${STAGEDIR}${PREFIX}/sysroot/target_triplet
+ @(cd ${STAGEDIR}${PREFIX}; ${FIND} sysroot -type d -empty -delete)
+ @(cd ${STAGEDIR}${PREFIX}; ${FIND} sysroot \( -type f -or -type l \) \
+ | ${SORT} >> ${TMPPLIST})
+
+.include <bsd.port.mk>
diff --git a/lang/gnatcross-sysroot-aarch64/distinfo b/lang/gnatcross-sysroot-aarch64/distinfo
new file mode 100644
index 000000000000..9af54e2a4d1f
--- /dev/null
+++ b/lang/gnatcross-sysroot-aarch64/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1486033400
+SHA256 (gnatcross/arm64-aarch64/R11_0/base.txz) = 16e9d744c39ef8ead3584815071a9086db10e71ef93e0108d5f490fe103b4bba
+SIZE (gnatcross/arm64-aarch64/R11_0/base.txz) = 78856068
diff --git a/lang/gnatcross-sysroot-aarch64/pkg-descr b/lang/gnatcross-sysroot-aarch64/pkg-descr
new file mode 100644
index 000000000000..94676c392f3a
--- /dev/null
+++ b/lang/gnatcross-sysroot-aarch64/pkg-descr
@@ -0,0 +1,4 @@
+This package is used by the lang/gnatcross-aarch64 Ada cross-compiler to
+install the system root of FreeBSD ARM64 (aarch64).
+
+WWW: http://www.dragonlace.net