[PATCH] ISL, MPC, MPFR: fix configuration issues on ARM64/Darwin host

Joel Sherrill joel at rtems.org
Fri May 13 14:25:33 UTC 2022


On Fri, May 13, 2022, 9:08 AM Karel Gardas <karel at functional.vision> wrote:

>
> Joel,
>
> I agree that having support upstreamed would be the best option. Due to
> upstream lag behind apple hardware development I'm afraid we would miss
> RTEMS 6 release if we would wait on upstream here, hence apple M1 users
> would not be able to use RTEMS 6.
>

Submitting them and then referencing the upstream email, git commit, or
attachment to their ticket.  We don't wait for upstream releases.


> Hence offered short cut solution, just for RTEMS 6, is to add those 3
> patches and remove them once upstream apply fixes.
>
> I'm just following historic way of doing things in RSB. It still holds
> three patches at least here


>
> rtems at silence:~/git/rtems/rtems-source-builder-ref$ find . -name '*.diff'
> ./source-builder/patches/texane-stlink-3494c11-1.diff
> ./source-builder/patches/texane-stlink-3494c11-2.diff
> ./source-builder/patches/gcc-4.7.2-arm-eabi-multilib-20121014.diff
>

Notice 2012 in the name of the last one.

File a ticket on devel.rtems.org and attach the patches. Use the url to
there.


> The patches accompany patch submitted yesterday for elftoolchain fix
> (sync of libelf config header file with recent FreeBSD version) and make
> RSB working on M1. Tested here, although hardware is here last day then
> it'll be moved out of my reach. Also tested on x64 darwin and ubuntu 20.04.
>

I'm not questioning the quality of the work. Just the process. We lost
patches when we dumped them in our repos.


> Thanks,
> Karel
>
> On 5/13/22 15:57, Joel Sherrill wrote:
> > We do not put patches in RTEMS repos. File an rtems ticket, attach them,
> > and reference them from there.
> >
> > If they are needed upstream, please submit them to the appropriate
> projects.
> >
> > Otherwise, I can't test this so don't have much to say. Looks necessary
> > based on email discussions.
> >
> > --joel
> >
> > On Fri, May 13, 2022 at 8:48 AM Karel Gardas <karel at functional.vision>
> > wrote:
> >
> >     Sponsored-By:   Precidata
> >     ---
> >       rtems/config/tools/rtems-gcc-12-newlib-head.cfg |  7 +++++++
> >       rtems/patches/fix-mac-arm64-isl-config.patch    | 12 ++++++++++++
> >       rtems/patches/fix-mac-arm64-mpc-config.patch    | 13 +++++++++++++
> >       rtems/patches/fix-mac-arm64-mpfr-config.patch   | 12 ++++++++++++
> >       4 files changed, 44 insertions(+)
> >       create mode 100644 rtems/patches/fix-mac-arm64-isl-config.patch
> >       create mode 100644 rtems/patches/fix-mac-arm64-mpc-config.patch
> >       create mode 100644 rtems/patches/fix-mac-arm64-mpfr-config.patch
> >
> >     diff --git a/rtems/config/tools/rtems-gcc-12-newlib-head.cfg
> >     b/rtems/config/tools/rtems-gcc-12-newlib-head.cfg
> >     index 4ea99a0..95b38c6 100644
> >     --- a/rtems/config/tools/rtems-gcc-12-newlib-head.cfg
> >     +++ b/rtems/config/tools/rtems-gcc-12-newlib-head.cfg
> >     @@ -13,6 +13,13 @@
> >       %patch add newlib -p1
> >
> https://devel.rtems.org/raw-attachment/ticket/4510/0001-aarch64-Add-ILP32-ABI-support-in-assembly-v2.patch
> >     <
> https://devel.rtems.org/raw-attachment/ticket/4510/0001-aarch64-Add-ILP32-ABI-support-in-assembly-v2.patch
> >
> >       %hash sha512
> >     0001-aarch64-Add-ILP32-ABI-support-in-assembly-v2.patch
> >
>  7ca237eabfd5b382713186e1fc290dfc999a353315795ecb8dd0d22fcd1ab7f5bf31f4329954adab91ad04c100dcac0e86d406fdbce8f82cf9dc23842c88caf6
> >
> >     +%patch add isl -p1 file://fix-mac-arm64-isl-config.patch
> >     +%hash sha512 fix-mac-arm64-isl-config.patch
> >
>  c07fdb605a6520d194358504731e63b540211ef680383f1ca4ec65b4ac43ae27687534fd7d8196a4dbe83a0ecf2c42a4254c71e609ee484a7614573bc499a2e8
> >     +%patch add mpfr -p1 file://fix-mac-arm64-mpfr-config.patch
> >     +%hash sha512 fix-mac-arm64-mpfr-config.patch
> >
>  dc5069df870bd02b7e78ed22c6ad9e9a2bb9ca372ce1a6b7e8fa5b7635dcef35c29f251fe5195c9c2a43513116c12cab1b0e96171cf34bd7fb7d0334c2c740fb
> >     +%patch add mpc -p1 file://fix-mac-arm64-mpc-config.patch
> >     +%hash sha512 fix-mac-arm64-mpc-config.patch
> >
>  2849b11e360ea98e0b4d708c67723ad2d6c7bac6d1e469673f408b0111cf0278429e8bc38fd2b7538dc2d5bb0cc430c646a0fa7f0b6b105a0482a5455fadc8b9
> >     +
> >       %define newlib_version 64b2081
> >       %define newlib_external 1
> >       %define newlib_expand_name
> >     sourceware-mirror-newlib-cygwin-%{newlib_version}
> >     diff --git a/rtems/patches/fix-mac-arm64-isl-config.patch
> >     b/rtems/patches/fix-mac-arm64-isl-config.patch
> >     new file mode 100644
> >     index 0000000..6b8f07d
> >     --- /dev/null
> >     +++ b/rtems/patches/fix-mac-arm64-isl-config.patch
> >     @@ -0,0 +1,12 @@
> >     +--- isl/config.sub.orig        2022-05-11 07:19:04.000000000 +0200
> >     ++++ isl/config.sub     2022-05-11 07:19:26.000000000 +0200
> >     +@@ -516,6 +516,9 @@
> >     +               basic_machine=m68k-apollo
> >     +               os=-bsd
> >     +               ;;
> >     ++      arm64-*)
> >     ++              basic_machine=aarch64-`echo "$basic_machine" | sed
> >     's/^[^-]*-//'`
> >     ++              ;;
> >     +       aros)
> >     +               basic_machine=i386-pc
> >     +               os=-aros
> >     diff --git a/rtems/patches/fix-mac-arm64-mpc-config.patch
> >     b/rtems/patches/fix-mac-arm64-mpc-config.patch
> >     new file mode 100644
> >     index 0000000..89ea483
> >     --- /dev/null
> >     +++ b/rtems/patches/fix-mac-arm64-mpc-config.patch
> >     @@ -0,0 +1,13 @@
> >     +--- mpc/build-aux/config.sub.orig      2022-05-11
> >     09:20:51.000000000 +0200
> >     ++++ mpc/build-aux/config.sub   2022-05-11 09:23:47.000000000 +0200
> >     +@@ -916,6 +916,10 @@
> >     +               cpu=sparc
> >     +               vendor=`echo "$basic_machine" | sed 's/-.*//'`
> >     +               ;;
> >     ++      arm64-*)
> >     ++              cpu=aarch64
> >     ++              vendor=`echo "$basic_machine" | sed 's/-.*//'`
> >     ++              ;;
> >     +
> >     +       *-*)
> >     +               # shellcheck disable=SC2162
> >     diff --git a/rtems/patches/fix-mac-arm64-mpfr-config.patch
> >     b/rtems/patches/fix-mac-arm64-mpfr-config.patch
> >     new file mode 100644
> >     index 0000000..37cec7e
> >     --- /dev/null
> >     +++ b/rtems/patches/fix-mac-arm64-mpfr-config.patch
> >     @@ -0,0 +1,12 @@
> >     +--- mpfr/config.sub.orig       2022-05-11 07:13:02.000000000 +0200
> >     ++++ mpfr/config.sub    2022-05-11 07:14:42.000000000 +0200
> >     +@@ -516,6 +516,9 @@
> >     +               basic_machine=m68k-apollo
> >     +               os=-bsd
> >     +               ;;
> >     ++      arm64-*)
> >     ++              basic_machine=aarch64-`echo "$basic_machine" | sed
> >     's/^[^-]*-//'`
> >     ++              ;;
> >     +       aros)
> >     +               basic_machine=i386-pc
> >     +               os=-aros
> >     --
> >     2.25.1
> >
> >     _______________________________________________
> >     devel mailing list
> >     devel at rtems.org <mailto:devel at rtems.org>
> >     http://lists.rtems.org/mailman/listinfo/devel
> >     <http://lists.rtems.org/mailman/listinfo/devel>
> >
>
>


More information about the devel mailing list