FreeBSD Bugzilla – Attachment 223984 Details for
Bug 254945
lang/mecrisp-stellaris: fix build problems
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
lang/mecrisp-stellaris: fix build problems
0001-lang-mecrisp-stellaris-fix-build-problems.patch (text/plain), 4.74 KB, created by
Robert Clausecker
on 2021-04-10 13:32:19 UTC
(
hide
)
Description:
lang/mecrisp-stellaris: fix build problems
Filename:
MIME Type:
Creator:
Robert Clausecker
Created:
2021-04-10 13:32:19 UTC
Size:
4.74 KB
patch
obsolete
>From e66dcfb595216de1671615e6cb6bd84aaa9217ab Mon Sep 17 00:00:00 2001 >From: Robert Clausecker <fuz@fuz.su> >Date: Sat, 10 Apr 2021 13:27:05 +0000 >Subject: [PATCH] lang/mecrisp-stellaris: fix build problems > >Fix the build issue by building with arm-none-eabi-binutils as meant >by the authors. Add support for building on Aarch64 for FreeBSD >= 13. >Patch incorrect icache synchronisation; a more comprehensive patch is >slated for inclusion into mecrisp-stellaris 2.5.9. >--- > lang/mecrisp-stellaris/Makefile | 29 ++++++++++--------- > ...isp-stellaris-source_freebsd-ra_terminal.s | 25 ++++++++++++++++ > lang/mecrisp-stellaris/pkg-message | 8 +++++ > 3 files changed, 48 insertions(+), 14 deletions(-) > create mode 100644 lang/mecrisp-stellaris/files/patch-mecrisp-stellaris-source_freebsd-ra_terminal.s > create mode 100644 lang/mecrisp-stellaris/pkg-message > >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. >-- >2.30.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
fuz
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 254945
: 223984