Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions rtems/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
*~
sources
patches
!patches/
patches/*
!patches/gcc-7.5.0-arm-rtems-multilib-armv7a-neon-hard.patch
!patches/gcc-7.5.0-zlib-darwin-fdopen.patch
!patches/gcc-7.5.0-darwin-arm64-host-hooks.patch
!patches/gdb-9.1-zlib-darwin-fdopen.patch
!patches/binutils-2.34-zlib-darwin-fdopen.patch
tar
build
*.txt
Expand Down
2 changes: 2 additions & 0 deletions rtems/config/tools/rtems-binutils-2.34.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
%define binutils_version 2.34

%hash sha512 binutils-%{binutils_version}.tar.bz2 f47e7304e102c7bbc97958a08093e27796b9051d1567ce4fbb723d39ef3e29efa325ee14a1bdcc462a925a7f9bbbc9aee28294c6dc23850f371030f3835a8067
%patch add binutils --rsb-file=binutils-2.34-zlib-darwin-fdopen.patch -p1 file://%{_topdir}/patches/binutils-2.34-zlib-darwin-fdopen.patch
%hash sha512 binutils-2.34-zlib-darwin-fdopen.patch ecdc7ce221dd0459230dc8acb3edf08827bb61f9856360c0ab8ad85754e484d1c7aeabf34a7789b75a457bcf59ced8f8b418b0e5fb6721545c3fe3741a0addd8

#
# Enable deterministic archives by default. This will be the default
Expand Down
8 changes: 8 additions & 0 deletions rtems/config/tools/rtems-gcc-7.5.0-newlib-7947581.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,16 @@
%if %{_build_os} == darwin
%patch add gcc -p1 https://gitlab.rtems.org/rtems/rtos/rtems/-/blob/main/assets/tracmigration/ticket_attachments/darwin-libstdcpp-noparallel-fix.patch
%hash sha512 darwin-libstdcpp-noparallel-fix.patch 01fa1bd55f19b01f10c41fdfe31356a7a4ddf265ebac8f4b974ccd1718181fd56bcb18a96e0492aa37511f08b37f94052a5557e21075604fceee06d80ffbb7d8
%patch add gcc --rsb-file=gcc-7.5.0-zlib-darwin-fdopen.patch -p1 file://%{_topdir}/patches/gcc-7.5.0-zlib-darwin-fdopen.patch
%hash sha512 gcc-7.5.0-zlib-darwin-fdopen.patch ecdc7ce221dd0459230dc8acb3edf08827bb61f9856360c0ab8ad85754e484d1c7aeabf34a7789b75a457bcf59ced8f8b418b0e5fb6721545c3fe3741a0addd8
%patch add gcc --rsb-file=gcc-7.5.0-darwin-arm64-host-hooks.patch -p1 file://%{_topdir}/patches/gcc-7.5.0-darwin-arm64-host-hooks.patch
%hash sha512 gcc-7.5.0-darwin-arm64-host-hooks.patch 190f409a3434d43b5e55ad9573c58836ef38c40ac40dde631e2f6b65e3a25dce0f6d63875fec29f26578ea47c4932b0b592b422c5cc626fad3042459f68b19c8
%endif

# Add ARM-mode armv7-a/neon/hard multilib support for RTEMS ARM.
%patch add gcc --rsb-file=gcc-7.5.0-arm-rtems-multilib-armv7a-neon-hard.patch -p1 file://%{_topdir}/patches/gcc-7.5.0-arm-rtems-multilib-armv7a-neon-hard.patch
%hash sha512 gcc-7.5.0-arm-rtems-multilib-armv7a-neon-hard.patch 46389c03dd7c6e22d0e522c648336460768df259bfb6a093aaf5386227eb8af348877a3b3877bd81ce8ce565a0d6a08756ac980d4151d7edeb3b174c1517bd74

%define gcc_version 7.5.0
%hash sha512 gcc-%{gcc_version}.tar.xz fe716cc19f2e3255d3a8b1b8290777bf769c6d98e6e0b07b81a3d6ad43f8af74cb170dfa18b1555dbfcd3f55ae582b91a286ccef496b9b65c1579902f96a1f60

Expand Down
2 changes: 2 additions & 0 deletions rtems/config/tools/rtems-gdb-9.1-1.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

%patch add gdb https://gitlab.rtems.org/rtems/rtos/rtems/-/blob/main/assets/tracmigration/ticket_attachments/gdb-9-1-linker-error-fix.diff
%hash sha512 gdb-9-1-linker-error-fix.diff QAtNCgJsDdfKno+IqHwqRGz1SR3YdTm34ERox2fqpgaGHI6H4GqNfmkJcJaIvSgzNxif24vqWO+bF/Djqa6wNg==
%patch add gdb --rsb-file=gdb-9.1-zlib-darwin-fdopen.patch -p1 file://%{_topdir}/patches/gdb-9.1-zlib-darwin-fdopen.patch
%hash sha512 gdb-9.1-zlib-darwin-fdopen.patch ecdc7ce221dd0459230dc8acb3edf08827bb61f9856360c0ab8ad85754e484d1c7aeabf34a7789b75a457bcf59ced8f8b418b0e5fb6721545c3fe3741a0addd8

%if %{_build_os} == win32
%if %{_windows_os} == cygwin
Expand Down
11 changes: 11 additions & 0 deletions rtems/patches/binutils-2.34-zlib-darwin-fdopen.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/zlib/zutil.h
+++ b/zlib/zutil.h
@@ -129,7 +129,7 @@
# endif
#endif

-#if defined(MACOS) || defined(TARGET_OS_MAC)
+#if defined(MACOS) || (defined(TARGET_OS_MAC) && !defined(__APPLE__))
# define OS_CODE 7
# ifndef Z_SOLO
# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
35 changes: 35 additions & 0 deletions rtems/patches/gcc-7.5.0-arm-rtems-multilib-armv7a-neon-hard.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: GRiSP Toolchain <noreply@example.com>
Date: Fri, 3 Apr 2026 10:00:00 +0000
Subject: [PATCH] arm/rtems: add ARMv7-A NEON hard-float multilib in ARM mode

The current RTEMS ARM multilib requirements include Thumb variants for
ARMv7-A NEON hard-float, but not the corresponding ARM-mode variant.
As a result, builds using:

-march=armv7-a -marm -mfpu=neon -mfloat-abi=hard

fall back to the default multilib and can fail at link time with ABI
mismatches (for example, VFP register argument tagging conflicts).

Require the ARM-mode armv7-a/neon/hard multilib so BSPs and projects can
link correctly in ARM mode.
---
gcc/config/arm/t-rtems | 1 +
1 file changed, 1 insertion(+)

diff --git a/gcc/config/arm/t-rtems b/gcc/config/arm/t-rtems
index 2dbd8725c26..c6e2ea9cb96 100644
--- a/gcc/config/arm/t-rtems
+++ b/gcc/config/arm/t-rtems
@@ -11,6 +11,7 @@ MULTILIB_REQUIRED =
MULTILIB_REQUIRED += mbig-endian/mthumb/march=armv7-r/mfpu=vfpv3-d16/mfloat-abi=hard
MULTILIB_REQUIRED += mbig-endian/mthumb/march=armv7-r
MULTILIB_REQUIRED += mfpu=vfp/mfloat-abi=hard
+MULTILIB_REQUIRED += march=armv7-a/mfpu=neon/mfloat-abi=hard
MULTILIB_REQUIRED += mthumb/march=armv6-m
MULTILIB_REQUIRED += mthumb/march=armv7-a/mfpu=neon/mfloat-abi=hard
MULTILIB_REQUIRED += mthumb/march=armv7-a
--
2.39.5 (Apple Git-154)

13 changes: 13 additions & 0 deletions rtems/patches/gcc-7.5.0-darwin-arm64-host-hooks.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
--- a/gcc/config.host
+++ b/gcc/config.host
@@ -249,6 +249,10 @@ case ${host} in
out_host_hook_obj=host-mingw32.o
host_lto_plugin_soname=liblto_plugin-0.dll
;;
+ aarch64*-*-darwin* | arm64*-*-darwin*)
+ # Generic Darwin host hooks need host-default.o to define host_hooks.
+ out_host_hook_obj="${out_host_hook_obj} host-default.o"
+ ;;
i[34567]86-*-darwin* | x86_64-*-darwin*)
out_host_hook_obj="${out_host_hook_obj} host-i386-darwin.o"
host_xmake_file="${host_xmake_file} i386/x-darwin"
11 changes: 11 additions & 0 deletions rtems/patches/gcc-7.5.0-zlib-darwin-fdopen.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/zlib/zutil.h
+++ b/zlib/zutil.h
@@ -129,7 +129,7 @@
# endif
#endif

-#if defined(MACOS) || defined(TARGET_OS_MAC)
+#if defined(MACOS) || (defined(TARGET_OS_MAC) && !defined(__APPLE__))
# define OS_CODE 7
# ifndef Z_SOLO
# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
11 changes: 11 additions & 0 deletions rtems/patches/gdb-9.1-zlib-darwin-fdopen.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/zlib/zutil.h
+++ b/zlib/zutil.h
@@ -129,7 +129,7 @@
# endif
#endif

-#if defined(MACOS) || defined(TARGET_OS_MAC)
+#if defined(MACOS) || (defined(TARGET_OS_MAC) && !defined(__APPLE__))
# define OS_CODE 7
# ifndef Z_SOLO
# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
3 changes: 3 additions & 0 deletions source-builder/config/autoconf-2-1.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ URL: http://www.gnu.org/software/autoconf/
fi
export CFLAGS CFLAGS_FOR_BUILD CC

cp %{_sbdir}/config/config.sub build-aux/config.sub
cp %{_sbdir}/config/config.guess build-aux/config.guess

CFLAGS="$SB_CFLAGS" \
./configure \
--build=%{_build} --host=%{_host} \
Expand Down
3 changes: 3 additions & 0 deletions source-builder/config/automake-1-1.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ URL: http://www.gnu.org/software/automake/
fi
export CFLAGS CFLAGS_FOR_BUILD CC

cp %{_sbdir}/config/config.sub lib/config.sub
cp %{_sbdir}/config/config.guess lib/config.guess

CFLAGS="$SB_CFLAGS" \
./configure \
--build=%{_build} --host=%{_host} \
Expand Down
3 changes: 3 additions & 0 deletions source-builder/config/binutils-2-1.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ URL: http://sources.redhat.com/binutils

%{build_directory}

cp %{_sbdir}/config/config.sub binutils-%{binutils_version}/config.sub
cp %{_sbdir}/config/config.guess binutils-%{binutils_version}/config.guess

mkdir -p ${build_dir}
cd ${build_dir}

Expand Down
Loading