Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Apr 2021 16:36:23 GMT
From:      Neel Chauhan <nc@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 4a19295b952c - main - lang/mecrisp-stellaris: fix build problems
Message-ID:  <202104231636.13NGaNhK043200@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by nc:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4a19295b952c805bea86aea01125d6180eccb7a2

commit 4a19295b952c805bea86aea01125d6180eccb7a2
Author:     Neel Chauhan <nc@FreeBSD.org>
AuthorDate: 2021-04-23 16:34:45 +0000
Commit:     Neel Chauhan <nc@FreeBSD.org>
CommitDate: 2021-04-23 16:36:24 +0000

    lang/mecrisp-stellaris: fix build problems
    
    PR:             254945
    Submitted by:   Robert Clausecker <fuz AT fuz DOT su> (maintainer)
    MFH:            2021Q2
---
 lang/mecrisp-stellaris/Makefile                    | 29 +++++++++++-----------
 ...-mecrisp-stellaris-source_freebsd-ra_terminal.s | 25 +++++++++++++++++++
 lang/mecrisp-stellaris/pkg-message                 |  8 ++++++
 3 files changed, 48 insertions(+), 14 deletions(-)

diff --git a/lang/mecrisp-stellaris/Makefile b/lang/mecrisp-stellaris/Makefile
index bb53237c3390..fb5383be14b9 100644
--- a/lang/mecrisp-stellaris/Makefile
+++ b/lang/mecrisp-stellaris/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	mecrisp-stellaris
 DISTVERSION=	2.5.8
+PORTREVISION=	1
 CATEGORIES=	lang
 MASTER_SITES=	SF/mecrisp
 
@@ -9,10 +10,22 @@ COMMENT=	Native code Forth system for ARM
 LICENSE=	GPLv3+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
+OPTIONS_DEFINE=		EXTRAS
+OPTIONS_DEFAULT=	EXTRAS
+EXTRAS_DESC=		Add disassembler and math library to Forth core
+EXTRAS_VARS=		PROGRAM=mecrisp-stellaris-freebsd-with-disassembler-and-math
+EXTRAS_VARS_OFF=	PROGRAM=mecrisp-stellaris-freebsd
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 1300000
 ONLY_FOR_ARCHS=	armv6 armv7
+.else
+ONLY_FOR_ARCHS=	armv6 armv7 aarch64
+.endif
 ONLY_FOR_ARCHS_REASON=	written in ARM assembly
 
-BUILD_DEPENDS=	binutils>2.33:devel/binutils
+BUILD_DEPENDS=	arm-none-eabi-binutils>2.25:devel/binutils@arm_none_eabi
 
 AFLAGS.armv6=	-march=armv6 --defsym m0core=1
 MAKE_ENV+=	AFLAGS="${AFLAGS.${ARCH}}"
@@ -20,18 +33,6 @@ MAKE_ENV+=	AFLAGS="${AFLAGS.${ARCH}}"
 # stripping eats our hand-crafted ELF binaries, so don't do that
 # the binaries are free of symbols or stuff like that anyway
 STRIP=
-# definitions assuming we build on ARM
-BINARY_ALIAS=	arm-none-eabi-as=${LOCALBASE}/bin/${AS} \
-		arm-none-eabi-ld=${LOCALBASE}/bin/${LD} \
-		arm-none-eabi-objcopy=${LOCALBASE}/bin/${OBJCOPY}
-
-OPTIONS_DEFINE=		EXTRAS
-OPTIONS_DEFAULT=	EXTRAS
-EXTRAS_DESC=		Add disassembler and math library to Forth core
-EXTRAS_VARS=		PROGRAM=mecrisp-stellaris-freebsd-with-disassembler-and-math
-EXTRAS_VARS_OFF=	PROGRAM=mecrisp-stellaris-freebsd
-
-.include <bsd.port.options.mk>
 
 # Can't use the release script as it tries to build a bunch of stuff
 # that won't build correctly.  This does the relevant parts manually.
@@ -47,4 +48,4 @@ do-install:
 	cd ${WRKSRC}/common; ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}
 	${INSTALL_PROGRAM} ${WRKSRC}/freebsd-ra/${PROGRAM} ${STAGEDIR}${PREFIX}/bin/mecrisp-stellaris
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/lang/mecrisp-stellaris/files/patch-mecrisp-stellaris-source_freebsd-ra_terminal.s b/lang/mecrisp-stellaris/files/patch-mecrisp-stellaris-source_freebsd-ra_terminal.s
new file mode 100644
index 000000000000..9aecba07f8bb
--- /dev/null
+++ b/lang/mecrisp-stellaris/files/patch-mecrisp-stellaris-source_freebsd-ra_terminal.s
@@ -0,0 +1,25 @@
+--- mecrisp-stellaris-source/freebsd-ra/terminal.s.orig	2021-04-10 12:49:15 UTC
++++ mecrisp-stellaris-source/freebsd-ra/terminal.s
+@@ -167,7 +167,6 @@ serial_key: @ ( -- c ) Receive one character
+ cacheflush:
+ @ -----------------------------------------------------------------------------
+ 
+-.ifdef m0core
+   @ ARMv6 hat keine Speicherbarrieren.  Das muss über einen syscall realisiert werden
+   push {r4-r7, lr}
+   movs r0, #0      @ ARM_SYNC_ICACHE
+@@ -180,14 +179,6 @@ cacheflush:
+   @ Datenstruktur arm_sync_icache_args für den sysarch-Aufruf
+ 0:.word incipit
+   .word totalsize
+-
+-.else
+-  @ auf ARMv7 und später nehmen wir einfach die Barrien-Befehle
+-  dmb
+-  dsb
+-  isb  
+-  bx lr
+-.endif
+ 
+ @ -----------------------------------------------------------------------------
+   Wortbirne Flag_foldable_0, "arguments" @ ( -- a-addr )
diff --git a/lang/mecrisp-stellaris/pkg-message b/lang/mecrisp-stellaris/pkg-message
new file mode 100644
index 000000000000..bbf2f9f716c8
--- /dev/null
+++ b/lang/mecrisp-stellaris/pkg-message
@@ -0,0 +1,8 @@
+This port is written in ARM32 assembly.  On ARM64 systems, it only runs
+on those that support the AArch32 execution state in EL0.  If the port
+does not run, check dmesg for a line like
+
+    Processor Features 0 = <AdvSIMD,FP,EL3 32,EL2 32,EL1 32,EL0 32>
+
+If the feature string "EL0 32" does not occur, your processor cannot
+run ARM32 binaries and thus will not be able to run this port either.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202104231636.13NGaNhK043200>