summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bare/config/devel/autotools-base.bset2
-rw-r--r--bare/config/devel/binutils-2.22-1.cfg2
-rw-r--r--bare/config/devel/binutils-2.24-1.cfg3
-rw-r--r--bare/config/devel/binutils-2.38.cfg12
-rw-r--r--bare/config/devel/dtc-1.6.1-1.cfg21
-rw-r--r--bare/config/devel/dtc.bset2
-rw-r--r--bare/config/devel/expat-2.4.8-1.cfg19
-rw-r--r--bare/config/devel/expat-2.5.0-1.cfg20
-rw-r--r--bare/config/devel/gcc-12-newlib-head.cfg40
-rw-r--r--bare/config/devel/gcc-4.6-newlib-1.20-1.cfg17
-rw-r--r--bare/config/devel/gcc-4.9.1-newlib-2.1.0-1.cfg11
-rw-r--r--bare/config/devel/gdb-11.2.cfg12
-rw-r--r--bare/config/devel/gdb-7.7-1.cfg2
-rw-r--r--bare/config/devel/glib-2.48.2-1.cfg4
-rw-r--r--bare/config/devel/glib-2.56.4-1.cfg30
-rw-r--r--bare/config/devel/gmp-6.2.1.cfg26
-rw-r--r--bare/config/devel/gmp-6.3.0.cfg18
-rw-r--r--bare/config/devel/gnu-default-tools.bset24
-rw-r--r--bare/config/devel/libtool-2.4.7-1.cfg17
-rw-r--r--bare/config/devel/libtool.bset2
-rw-r--r--bare/config/devel/mpfr-4.2.0.cfg18
-rw-r--r--bare/config/devel/or1ksim-1.1.0.cfg5
-rw-r--r--bare/config/devel/pcre-8.40-1.cfg3
-rw-r--r--bare/config/devel/qemu-5.2.0-1.cfg14
-rw-r--r--bare/config/devel/qemu-couverture-git-1.cfg2
-rw-r--r--bare/config/devel/qemu-couverture.bset4
-rw-r--r--bare/config/devel/qemu-xilinx-v2020.2-1.cfg37
-rw-r--r--bare/config/devel/qemu-xilinx-v2023.2-1.cfg37
-rw-r--r--bare/config/devel/qemu-xilinx.bset24
-rw-r--r--bare/config/devel/qemu.bset2
-rw-r--r--bare/config/devel/sis-2-1.cfg5
-rw-r--r--bare/config/devel/spike-1.1.0.cfg4
-rw-r--r--bare/config/gnu-tools-4.6.bset6
-rw-r--r--bare/config/gnu-tools-4.8.2.bset25
-rw-r--r--bare/config/gnu-tools.bset17
-rw-r--r--bare/config/print/texinfo-7.0.3.cfg12
-rw-r--r--bare/config/print/texinfo-internal.bset (renamed from rtems/config/6/rtems-autotools-internal.bset)6
-rw-r--r--bare/config/print/texinfo.bset4
-rw-r--r--bare/config/print/texinfo.cfg16
-rw-r--r--bare/config/textproc/gsed-4.8.cfg12
-rw-r--r--bare/config/textproc/gsed-4.9.cfg12
-rw-r--r--bare/config/textproc/gsed-internal.bset11
-rw-r--r--bare/config/textproc/gsed.bset4
-rw-r--r--bare/config/textproc/gsed.cfg8
-rw-r--r--rtems/config/6/rtems-aarch64.bset1
-rw-r--r--rtems/config/6/rtems-arm.bset1
-rw-r--r--rtems/config/6/rtems-autotools-base.bset9
-rw-r--r--rtems/config/6/rtems-autotools.bset25
-rw-r--r--rtems/config/6/rtems-default.bset23
-rw-r--r--rtems/config/6/rtems-microblaze.bset19
-rw-r--r--rtems/config/6/rtems-mips.bset2
-rw-r--r--rtems/config/6/rtems-moxie.bset1
-rw-r--r--rtems/config/6/rtems-nios2.bset1
-rw-r--r--rtems/config/6/rtems-packages.bset1
-rw-r--r--rtems/config/6/rtems-powerpc.bset1
-rw-r--r--rtems/config/6/rtems-riscv.bset1
-rw-r--r--rtems/config/6/rtems-sparc.bset1
-rw-r--r--rtems/config/6/rtems-tools.bset2
-rw-r--r--rtems/config/6/rtems-x86_64.bset5
-rw-r--r--rtems/config/7/rtems-aarch64.bset1
-rw-r--r--rtems/config/7/rtems-arm.bset1
-rw-r--r--rtems/config/7/rtems-default.bset24
-rw-r--r--rtems/config/7/rtems-m68k.bset1
-rw-r--r--rtems/config/7/rtems-moxie.bset1
-rw-r--r--rtems/config/7/rtems-nios2.bset1
-rw-r--r--rtems/config/7/rtems-powerpc.bset1
-rw-r--r--rtems/config/7/rtems-riscv.bset1
-rw-r--r--rtems/config/7/rtems-sparc.bset1
-rw-r--r--rtems/config/bsps/atsamv.bset4
-rw-r--r--rtems/config/bsps/beagleboneblack.bset4
-rw-r--r--rtems/config/bsps/erc32.bset4
-rw-r--r--rtems/config/bsps/gr712rc.bset4
-rw-r--r--rtems/config/bsps/gr740.bset4
-rw-r--r--rtems/config/bsps/imx7.bset4
-rw-r--r--rtems/config/bsps/pc.bset4
-rw-r--r--rtems/config/bsps/qoriq_e500.bset4
-rw-r--r--rtems/config/bsps/qoriq_e6500_32.bset4
-rw-r--r--rtems/config/bsps/qoriq_e6500_64.bset4
-rw-r--r--rtems/config/bsps/raspberrypi2.bset4
-rw-r--r--rtems/config/bsps/xilinx_zynq_zc702.bset4
-rw-r--r--rtems/config/bsps/xilinx_zynq_zc706.bset4
-rw-r--r--rtems/config/bsps/xilinx_zynq_zedboard.bset4
-rw-r--r--rtems/config/graphics/libjpeg-9a-1.cfg5
-rw-r--r--rtems/config/graphics/nxlib-0.47-dev-1.cfg4
-rw-r--r--rtems/config/net-mgmt/net-snmp-5.7.2.1-1.cfg8
-rw-r--r--rtems/config/net/net-services-1.cfg23
-rw-r--r--rtems/config/net/net-services.bset15
-rw-r--r--rtems/config/rtems-bsp.cfg46
-rw-r--r--rtems/config/rtems-urls.bset2
-rw-r--r--rtems/config/tools/rtems-binutils-2.37.cfg12
-rw-r--r--rtems/config/tools/rtems-binutils-2.38.cfg12
-rw-r--r--rtems/config/tools/rtems-binutils-2.39.cfg13
-rw-r--r--rtems/config/tools/rtems-binutils-2.40.cfg13
-rw-r--r--rtems/config/tools/rtems-binutils-2.41.cfg13
-rw-r--r--rtems/config/tools/rtems-binutils-head.cfg5
-rw-r--r--rtems/config/tools/rtems-default-tools.bset29
-rw-r--r--rtems/config/tools/rtems-gcc-10-newlib-head.cfg16
-rw-r--r--rtems/config/tools/rtems-gcc-10.4-newlib-e7ffbdb.cfg27
-rw-r--r--rtems/config/tools/rtems-gcc-10.4-newlib-head.cfg31
-rw-r--r--rtems/config/tools/rtems-gcc-12-newlib-head.cfg49
-rw-r--r--rtems/config/tools/rtems-gcc-13-newlib-head.cfg22
-rw-r--r--rtems/config/tools/rtems-gcc-13.2-newlib-head.cfg20
-rw-r--r--rtems/config/tools/rtems-gcc-head-newlib-head.cfg12
-rw-r--r--rtems/config/tools/rtems-gdb-11.2.cfg15
-rw-r--r--rtems/config/tools/rtems-gdb-12.1.cfg15
-rw-r--r--rtems/config/tools/rtems-gdb-13.1.cfg21
-rw-r--r--rtems/config/tools/rtems-gdb-13.2.cfg17
-rw-r--r--rtems/config/tools/rtems-gdb-head.cfg5
-rw-r--r--rtems/config/tools/rtems-grub-2.06.cfg8
-rw-r--r--rtems/config/tools/rtems-kernel-6.cfg8
-rw-r--r--rtems/config/tools/rtems-kernel-common.cfg305
-rw-r--r--rtems/config/tools/rtems-libbsd-6.cfg6
-rw-r--r--rtems/config/tools/rtems-mipstx39-gdb-7.5.1-1.cfg11
-rw-r--r--rtems/config/tools/rtems-mipstx39-gdb-7.6-1.cfg11
-rw-r--r--rtems/config/tools/rtems-mipstx39-gdb-7.7-1.cfg11
-rw-r--r--rtems/config/tools/rtems-mipstx39-gdb-7.9-1.cfg11
-rw-r--r--rtems/config/tools/rtems-mipstx39-gdb-8.0.1-1.cfg3
-rw-r--r--rtems/config/tools/rtems-mipstx39-gdb-head.bset7
-rw-r--r--rtems/config/tools/rtems-mipstx39-gdb-head.cfg3
-rw-r--r--rtems/config/tools/rtems-mipstx39-gdb.bset7
-rw-r--r--rtems/config/tools/rtems-net-legacy-6.cfg10
-rw-r--r--rtems/config/tools/rtems-net-services.cfg91
-rw-r--r--rtems/config/tools/rtems-tools-6.cfg5
-rw-r--r--rtems/config/tools/rtems-xilinx-binutils-2.36.cfg55
-rw-r--r--rtems/config/tools/rtems-xilinx-gcc-10-newlib-head.cfg67
-rwxr-xr-xsource-builder/aarch64-linux-gnu-pkg-config3
-rw-r--r--source-builder/config/binutils-2-1.cfg19
-rw-r--r--source-builder/config/checks.cfg9
-rw-r--r--source-builder/config/dtc-1-1.cfg4
-rw-r--r--source-builder/config/freetype-1.cfg2
-rw-r--r--source-builder/config/gcc-10.cfg20
-rw-r--r--source-builder/config/gcc-12.cfg21
-rw-r--r--source-builder/config/gcc-13.cfg26
-rw-r--r--source-builder/config/gcc-4.3-1.cfg7
-rw-r--r--source-builder/config/gcc-4.4-1.cfg7
-rw-r--r--source-builder/config/gcc-4.5-1.cfg7
-rw-r--r--source-builder/config/gcc-4.6-1.cfg7
-rw-r--r--source-builder/config/gcc-4.7-1.cfg7
-rw-r--r--source-builder/config/gcc-4.8-1.cfg7
-rw-r--r--source-builder/config/gcc-4.9-1.cfg19
-rw-r--r--source-builder/config/gcc-6-1.cfg7
-rw-r--r--source-builder/config/gcc-7-1.cfg7
-rw-r--r--source-builder/config/gcc-7.2-1.cfg7
-rw-r--r--source-builder/config/gcc-9.cfg4
-rw-r--r--source-builder/config/gcc-common-1.cfg67
-rw-r--r--source-builder/config/gdb-7.5-1.cfg3
-rw-r--r--source-builder/config/gdb-common-1.cfg86
-rw-r--r--source-builder/config/glib-2-1.cfg1
-rw-r--r--source-builder/config/gmp.cfg19
-rw-r--r--source-builder/config/grub2.cfg76
-rw-r--r--source-builder/config/gsed-1.cfg107
-rw-r--r--source-builder/config/libtool-2-1.cfg8
-rw-r--r--source-builder/config/mpfr.cfg62
-rw-r--r--source-builder/config/nxlib-1.cfg4
-rw-r--r--source-builder/config/or1ksim-1-1.cfg4
-rw-r--r--source-builder/config/pcre-8-1.cfg2
-rw-r--r--source-builder/config/qemu-common-2.cfg4
-rw-r--r--source-builder/config/sis-2-1.cfg1
-rw-r--r--source-builder/config/swig-4-1.cfg6
-rw-r--r--source-builder/config/texinfo-1.cfg107
-rw-r--r--source-builder/defaults.mc12
-rwxr-xr-xsource-builder/pkg-config36
-rwxr-xr-xsource-builder/sb-rtems-pkg29
-rw-r--r--source-builder/sb/build.py22
-rw-r--r--source-builder/sb/config.py126
-rw-r--r--source-builder/sb/download.py11
-rwxr-xr-xsource-builder/sb/ereport.py4
-rwxr-xr-xsource-builder/sb/execute.py9
-rw-r--r--source-builder/sb/freebsd.py16
-rw-r--r--source-builder/sb/getsources.py30
-rw-r--r--source-builder/sb/git.py12
-rw-r--r--source-builder/sb/linux.py93
-rw-r--r--source-builder/sb/mailer.py194
-rw-r--r--source-builder/sb/options.py35
-rw-r--r--source-builder/sb/path.py28
-rwxr-xr-xsource-builder/sb/pkgconfig.py4
-rwxr-xr-xsource-builder/sb/rtems-build-dep17
-rwxr-xr-xsource-builder/sb/rtems-kernel-config-check127
-rw-r--r--source-builder/sb/rtemspkg.py287
-rw-r--r--source-builder/sb/setbuilder.py147
-rw-r--r--source-builder/sb/simhost.py128
-rw-r--r--source-builder/sb/version.py12
-rwxr-xr-xsource-builder/x86_64-linux-gnu-pkg-config3
183 files changed, 3129 insertions, 822 deletions
diff --git a/bare/config/devel/autotools-base.bset b/bare/config/devel/autotools-base.bset
index 22456ed..1403ed3 100644
--- a/bare/config/devel/autotools-base.bset
+++ b/bare/config/devel/autotools-base.bset
@@ -6,4 +6,4 @@
devel/autoconf-2.69-1
devel/automake-1.12.6-1
-devel/libtool-2.4.2-1
+devel/libtool-2.4.7-1
diff --git a/bare/config/devel/binutils-2.22-1.cfg b/bare/config/devel/binutils-2.22-1.cfg
index e585483..1afa6b1 100644
--- a/bare/config/devel/binutils-2.22-1.cfg
+++ b/bare/config/devel/binutils-2.22-1.cfg
@@ -10,6 +10,8 @@
%include %{_configdir}/base.cfg
%define binutils_version 2.22
+%hash sha512 binutils-%{binutils_version}.tar.bz2 \
+ /+jvJj75kYPozII/6Eh/99D3v5qO/ShTtfRjasoAI4UNE95OrH13pfaUE9ilDm+VuxRWm+U9+GwLzjgDRSWrdA==
#
# The binutils build instructions. We use 2.xx Release 1.
diff --git a/bare/config/devel/binutils-2.24-1.cfg b/bare/config/devel/binutils-2.24-1.cfg
index 652c274..a714ff1 100644
--- a/bare/config/devel/binutils-2.24-1.cfg
+++ b/bare/config/devel/binutils-2.24-1.cfg
@@ -9,6 +9,9 @@
%define binutils_version 2.24
+%hash sha512 binutils-%{binutils_version}.tar.bz2 \
+ Xsla1H1JsSxFWKjbDKIQnT7hlV43dgV/MzDEUG+PTRz15QX7+KFrmEA6D83qr5hv4KIr5kViR9vazmPOH3drEg==
+
#
# Enable deterministic archives by default. This will be the default
# there all tools using this binutils will create deterministic
diff --git a/bare/config/devel/binutils-2.38.cfg b/bare/config/devel/binutils-2.38.cfg
new file mode 100644
index 0000000..feac42f
--- /dev/null
+++ b/bare/config/devel/binutils-2.38.cfg
@@ -0,0 +1,12 @@
+%include %{_configdir}/checks.cfg
+%include %{_configdir}/base.cfg
+
+%define binutils_version 2.38
+#%define binutils_external 1
+
+%hash sha512 binutils-%{binutils_version}.tar.bz2 7690b4158bd6587a85c6b98903980b9ac6f16b47f7fd1e60986b0a70388bedcfdc05d75597aa49c81fec1609ce24bed6c26583f76fd2471a9d63394fd9798afc
+
+%define with_deterministic_archives 1
+%define with_64_bit_bfd 1
+
+%include %{_configdir}/binutils-2-1.cfg
diff --git a/bare/config/devel/dtc-1.6.1-1.cfg b/bare/config/devel/dtc-1.6.1-1.cfg
new file mode 100644
index 0000000..acf2cd8
--- /dev/null
+++ b/bare/config/devel/dtc-1.6.1-1.cfg
@@ -0,0 +1,21 @@
+#
+# DTC (Device Tree Compiler) 1.6.1
+#
+
+%if %{release} == %{nil}
+%define release 1
+%endif
+
+%include %{_configdir}/base.cfg
+
+%define dtc_version 1.6.1
+
+%hash sha256 dtc-%{dtc_version}.tar.gz 38a6257f2c23cb9dfa1781ac4ad122d8358e1a22d33b2da0eb492c190644a376
+
+%patch add dtc https://devel.rtems.org/raw-attachment/ticket/4783/0001-checks.c-Ensure-argument-is-an-integer-v2.patch
+%hash sha256 0001-checks.c-Ensure-argument-is-an-integer-v2.patch dd83c10326188732ac26c1fd8dce70b796a7dde204b31c67cf4d04f29ed4dfef
+
+#
+# The DTC build instructions. We use 1.x.x Release 1.
+#
+%include %{_configdir}/dtc-1-1.cfg
diff --git a/bare/config/devel/dtc.bset b/bare/config/devel/dtc.bset
index 54521f6..56fb61e 100644
--- a/bare/config/devel/dtc.bset
+++ b/bare/config/devel/dtc.bset
@@ -4,4 +4,4 @@
%define release 1
-devel/dtc-1.4.1-1
+devel/dtc-1.6.1-1
diff --git a/bare/config/devel/expat-2.4.8-1.cfg b/bare/config/devel/expat-2.4.8-1.cfg
new file mode 100644
index 0000000..d9cddd5
--- /dev/null
+++ b/bare/config/devel/expat-2.4.8-1.cfg
@@ -0,0 +1,19 @@
+#
+# Expat 2.4.8
+#
+
+%if %{release} == %{nil}
+%define release 1
+%endif
+
+%include %{_configdir}/base.cfg
+
+%define expat_version 2.4.8
+%define expat_version_dir R_2_4_8
+
+%hash sha256 expat-%{expat_version}.tar.gz 398f6d95bf808d3108e27547b372cb4ac8dc2298a3c4251eb7aa3d4c6d4bb3e2
+
+#
+# The Expat build instructions. We use 2.xx Release 1.
+#
+%include %{_configdir}/expat-2-1.cfg
diff --git a/bare/config/devel/expat-2.5.0-1.cfg b/bare/config/devel/expat-2.5.0-1.cfg
new file mode 100644
index 0000000..37188af
--- /dev/null
+++ b/bare/config/devel/expat-2.5.0-1.cfg
@@ -0,0 +1,20 @@
+#
+# Expat 2.5.0
+#
+
+%if %{release} == %{nil}
+%define release 1
+%endif
+
+%include %{_configdir}/base.cfg
+
+%define expat_version 2.5.0
+%define expat_version_dir R_2_5_0
+
+%hash sha512 expat-%{expat_version}.tar.gz \
+ 8f99pfr7R9zW4PDYkoJqum3nZQnISXvAA4LxEJq44qk9OWlD27UiFkVwRJk6Odc3KASK32UNjoPigYntx7eEAg==
+
+#
+# The Expat build instructions. We use 2.xx Release 1.
+#
+%include %{_configdir}/expat-2-1.cfg
diff --git a/bare/config/devel/gcc-12-newlib-head.cfg b/bare/config/devel/gcc-12-newlib-head.cfg
new file mode 100644
index 0000000..ce168ea
--- /dev/null
+++ b/bare/config/devel/gcc-12-newlib-head.cfg
@@ -0,0 +1,40 @@
+%include %{_configdir}/checks.cfg
+%include %{_configdir}/base.cfg
+
+%define gcc_version 197b7ac
+%define gcc_external 1
+%define gcc_expand_name gnu-mirror-gcc-%{gcc_version}
+%source set gcc --rsb-file=%{gcc_expand_name}.tar.gz https://codeload.github.com/RTEMS/gnu-mirror-gcc/tar.gz/%{gcc_version}
+%hash sha512 %{gcc_expand_name}.tar.gz f9eb91029c31ed2ca3c4ce2066d99352f63f55120aaad295b58621786fe76228d182a4421292fa95007ac6b6529a589795fe3e794ac77b0b86f9cf9286125e36
+
+%patch add gcc -p1 https://devel.rtems.org/raw-attachment/ticket/4196/0001-Back-port-v1-of-gcov-tool-merge-stream-to-GCC-12.patch
+%hash sha512 0001-Back-port-v1-of-gcov-tool-merge-stream-to-GCC-12.patch 413f14374856f8bfd2bb94a56f1860fff8fe9a936f33c96fdf6a5a0c5a30e2cf7d05026d0338e8b30015a93d80169a602397076b947c8292ac5b5cdc2237ec4e
+
+%patch add newlib -p1 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
+
+# Following patches are related to compilation on Apple M1/Darwin host platform.
+# They are here to workaround issues with ISL, MPFR and MPC libraries.
+# Upstream projects were already informed so hopefully when RSB moves
+# to more modern libraries versions they may be removed from here.
+# The patches are solely for libisl 0.24, libmpfr 4.1.0 and libmpc 1.2.1
+# See #4657 for more information.
+%patch add isl -p1 https://devel.rtems.org/raw-attachment/ticket/4657/fix-mac-arm64-isl-config.patch
+%hash sha512 fix-mac-arm64-isl-config.patch c07fdb605a6520d194358504731e63b540211ef680383f1ca4ec65b4ac43ae27687534fd7d8196a4dbe83a0ecf2c42a4254c71e609ee484a7614573bc499a2e8
+%patch add mpfr -p1 https://devel.rtems.org/raw-attachment/ticket/4657/fix-mac-arm64-mpfr-config.patch
+%hash sha512 fix-mac-arm64-mpfr-config.patch dc5069df870bd02b7e78ed22c6ad9e9a2bb9ca372ce1a6b7e8fa5b7635dcef35c29f251fe5195c9c2a43513116c12cab1b0e96171cf34bd7fb7d0334c2c740fb
+%patch add mpc -p1 https://devel.rtems.org/raw-attachment/ticket/4657/fix-mac-arm64-mpc-config.patch
+%hash sha512 fix-mac-arm64-mpc-config.patch 2849b11e360ea98e0b4d708c67723ad2d6c7bac6d1e469673f408b0111cf0278429e8bc38fd2b7538dc2d5bb0cc430c646a0fa7f0b6b105a0482a5455fadc8b9
+# Comment above related to #4657 and patches ends here
+
+%define newlib_version 64b2081
+%define newlib_external 1
+%define newlib_expand_name sourceware-mirror-newlib-cygwin-%{newlib_version}
+%source set newlib --rsb-file=newlib-%{newlib_version}.tar.gz https://codeload.github.com/RTEMS/sourceware-mirror-newlib-cygwin/tar.gz/%{newlib_version}
+%hash sha512 newlib-%{newlib_version}.tar.gz 0e142b06b855b78729c3319e31cf5c15b48cea1f90e001ae1e2d61793c496374065c5658e835e6277ae0739af22ea397feb2c1bc2509a6a80ee6c03818efbf55
+
+%define with_threads 1
+%define with_plugin 0
+%define with_iconv 1
+
+%include %{_configdir}/gcc-12.cfg
diff --git a/bare/config/devel/gcc-4.6-newlib-1.20-1.cfg b/bare/config/devel/gcc-4.6-newlib-1.20-1.cfg
index 0a7cc63..bb3f2e3 100644
--- a/bare/config/devel/gcc-4.6-newlib-1.20-1.cfg
+++ b/bare/config/devel/gcc-4.6-newlib-1.20-1.cfg
@@ -15,6 +15,23 @@
%define mpc_version 0.8.2
%define gmp_version 5.0.5
+%define mpc_url https://www.multiprecision.org/downloads
+%define gmp_url https://ftp.gnu.org/gnu/gmp
+%define mpfr_url https://ftp.gnu.org/gnu/mpfr
+
+%hash sha512 gcc-core-%{gcc_version}.tar.bz2 \
+ ucVpu3E/OrCp1PbomMfQGRRUb7vmH021FRU2/+N0SQrm8VTfojgatgcrKJC3YVT769+S8GDoVAT1SZfwFpcvTA==
+%hash sha512 gcc-g--%{gcc_version}.tar.gz \
+ qVHKvglD9l+ziCNrHuemi3ebq0T4aTQIkzRseYbiVEkA0LZeTyUHxpdlXzaxajB3szQG1Zh8VtMGhYZda9tOGA==
+%hash sha512 newlib-%{newlib_version}.tar.gz \
+ Kr8dMJgORgxNb/5NFoLjhAPQVgSOAGdTYiVnMeV/5nWdAehby6hCWNIRlBkm4TvzxjL/OCSTGoRMiyWW55VFHw==
+%hash sha512 mpfr-%{mpfr_version}.tar.bz2 \
+ u6x9DWP9O0zYleJHxEitzn9MK2tm7P4mrxOAGOD5aZH6jL2MvpT5JHYaoaxnbiWa8SKGAN/AhUMU6HXnc5/SeQ==
+%hash sha512 mpc-%{mpc_version}.tar.gz \
+ 3KrDiXrfFBHhGZ4pXojXQ4r8YA9BJWXDtFCwECuDdR6xYPhbdSKJEZX/Cgop/M7dB9wBGpUJaaCXnE49TvweEA==
+%hash sha512 gmp-%{gmp_version}.tar.bz2 \
+ ZLqIpKZP77FurpxkTqgRlAEeoLQmZKWvawFOfaPQ8JYF3uUYuaNhsGUQMRzf1JaraNCdo9hdZoC9rD92XrZ/YQ==
+
#
# Project custom message
#
diff --git a/bare/config/devel/gcc-4.9.1-newlib-2.1.0-1.cfg b/bare/config/devel/gcc-4.9.1-newlib-2.1.0-1.cfg
index 495641e..d739807 100644
--- a/bare/config/devel/gcc-4.9.1-newlib-2.1.0-1.cfg
+++ b/bare/config/devel/gcc-4.9.1-newlib-2.1.0-1.cfg
@@ -19,6 +19,17 @@
%define with_iconv 1
%endif
+%hash sha512 gcc-%{gcc_version}.tar.bz2 \
+ hZgQakt8A7tNbin6G/qe5rY5DR8byobBzNJ67YMK4dEm2qUMQEEBbL+nYJDdZsUfHOBpWLjM1sO+UerodRJVkw==
+%hash sha512 newlib-%{newlib_version}.tar.gz \
+ Z3CGT5MHq7JAGk5I8oaEXTpK/DCyrJh9pLlkpUhcw4I7MtBqCr9hUo6TxK2KOgqjzB7NOwM4UOayvebZu8mlRw==
+%hash sha512 mpfr-%{mpfr_version}.tar.bz2 \
+ u6x9DWP9O0zYleJHxEitzn9MK2tm7P4mrxOAGOD5aZH6jL2MvpT5JHYaoaxnbiWa8SKGAN/AhUMU6HXnc5/SeQ==
+%hash sha512 mpc-%{mpc_version}.tar.gz \
+ 3KrDiXrfFBHhGZ4pXojXQ4r8YA9BJWXDtFCwECuDdR6xYPhbdSKJEZX/Cgop/M7dB9wBGpUJaaCXnE49TvweEA==
+%hash sha512 gmp-%{gmp_version}.tar.bz2 \
+ ZLqIpKZP77FurpxkTqgRlAEeoLQmZKWvawFOfaPQ8JYF3uUYuaNhsGUQMRzf1JaraNCdo9hdZoC9rD92XrZ/YQ==
+
#
# The gcc/newlib build instructions. We use 4.9 Release 1.
#
diff --git a/bare/config/devel/gdb-11.2.cfg b/bare/config/devel/gdb-11.2.cfg
new file mode 100644
index 0000000..31385e7
--- /dev/null
+++ b/bare/config/devel/gdb-11.2.cfg
@@ -0,0 +1,12 @@
+#
+# GDB 11.2
+#
+
+%include %{_configdir}/checks.cfg
+%include %{_configdir}/base.cfg
+
+%define gdb_version 11.2
+%define gdb_src_ext xz
+%hash sha512 gdb-%{gdb_version}.tar.xz 07e9026423438049b11f4f784d57401ece4e940570f613bd6958b3714fe7fbc2c048470bcce3e7d7d9f93331cdf3881d30dcc964cb113a071143a02b28e5b127
+
+%include %{_configdir}/gdb-common-1.cfg
diff --git a/bare/config/devel/gdb-7.7-1.cfg b/bare/config/devel/gdb-7.7-1.cfg
index 1afce5a..e61fff2 100644
--- a/bare/config/devel/gdb-7.7-1.cfg
+++ b/bare/config/devel/gdb-7.7-1.cfg
@@ -6,6 +6,8 @@
%include %{_configdir}/base.cfg
%define gdb_version 7.7
+%hash sha512 gdb-%{gdb_version}.tar.gz \
+ eNYj6X8jJUakcohURCIReUO4YtGZwR4E2E/GF210w27hqGLVJ07qKZbm6d6gnWtp5/DGxkrMS3oHuXSt0eiBPw==
#
# The gdb build instructions. We use 7.xx Release 1.
diff --git a/bare/config/devel/glib-2.48.2-1.cfg b/bare/config/devel/glib-2.48.2-1.cfg
index 76927e9..13c0d74 100644
--- a/bare/config/devel/glib-2.48.2-1.cfg
+++ b/bare/config/devel/glib-2.48.2-1.cfg
@@ -18,9 +18,9 @@
#Add patches to suppress null argument warning
#
-%patch add glib https://gitlab.gnome.org/GNOME/glib/commit/566e1d61a500267c7849ad0b2552feec9c9a29a6.patch
+%patch add glib https://devel.rtems.org/raw-attachment/ticket/4634/566e1d61a500267c7849ad0b2552feec9c9a29a6.patch
%hash sha512 566e1d61a500267c7849ad0b2552feec9c9a29a6.patch \
- Mz3YZfEOLgNA6eSUzg8y1yiGk0S5YFbYmWRcGyrcRHhmu8mUzuneWmsj6OYXG09zAvBLApxrEGqvaI0iJNhAMg==
+ ULwUKgmgGLAOlgsr09K2GdYVGm8yzffwWRGRZTi5B8KdMuyAE+Y0eFOAg2L77aVG3o14l6x9qNA1DH8uMYKOcw==
#
# The GLib build instructions. We use 2.x.x Release 1.
diff --git a/bare/config/devel/glib-2.56.4-1.cfg b/bare/config/devel/glib-2.56.4-1.cfg
new file mode 100644
index 0000000..175b060
--- /dev/null
+++ b/bare/config/devel/glib-2.56.4-1.cfg
@@ -0,0 +1,30 @@
+#
+# GLib
+#
+
+%if %{release} == %{nil}
+%define release 1
+%endif
+
+%include %{_configdir}/base.cfg
+
+%define glib_version_major 2.56
+%define glib_version_minor 4
+%define glib_version %{glib_version_major}.%{glib_version_minor}
+
+%hash sha256 glib-%{glib_version}.tar.xz J/cD0SXvsH+KdDZmtYDfC0CVxZ/IdQ6IkBMskdQ3UEw=
+
+#
+#Add patches to suppress null argument warning
+#
+
+%patch add glib https://devel.rtems.org/raw-attachment/ticket/4634/566e1d61a500267c7849ad0b2552feec9c9a29a6.patch
+%hash sha512 566e1d61a500267c7849ad0b2552feec9c9a29a6.patch \
+ ULwUKgmgGLAOlgsr09K2GdYVGm8yzffwWRGRZTi5B8KdMuyAE+Y0eFOAg2L77aVG3o14l6x9qNA1DH8uMYKOcw==
+
+#
+# The GLib build instructions. We use 2.x.x Release 1.
+#
+%if !%{pkgconfig check glib-2.0} || %{defined _rsb_getting_source}
+ %include %{_configdir}/glib-2-1.cfg
+%endif
diff --git a/bare/config/devel/gmp-6.2.1.cfg b/bare/config/devel/gmp-6.2.1.cfg
new file mode 100644
index 0000000..19c5930
--- /dev/null
+++ b/bare/config/devel/gmp-6.2.1.cfg
@@ -0,0 +1,26 @@
+#
+# GMP 6.2.1
+#
+
+%if %{release} == %{nil}
+%define release 1
+%endif
+
+%include %{_configdir}/base.cfg
+
+%define gmp_url https://gcc.gnu.org/pub/gcc/infrastructure
+%define gmp_version 6.2.1
+%hash sha512 gmp-%{gmp_version}.tar.bz2 \
+ iQQzSjvMXIluzsq8dc2p3sZC5AH7U5fEmSxPq+peliyc6L1E6OQjPDTlXIAQzCjbBUX191DL27XwCvU43HY76Q==
+
+#
+# Do not use assembler if MacOS AARCH64
+#
+%if %{_host_os} == darwin && %{_host_arch} == arm64
+ %define gmp_extra_options --disable-assembly
+%endif
+
+#
+# The GMP build instructions.
+#
+%include %{_configdir}/gmp.cfg
diff --git a/bare/config/devel/gmp-6.3.0.cfg b/bare/config/devel/gmp-6.3.0.cfg
new file mode 100644
index 0000000..09e85b6
--- /dev/null
+++ b/bare/config/devel/gmp-6.3.0.cfg
@@ -0,0 +1,18 @@
+#
+# GMP 6.3.0
+#
+
+%if %{release} == %{nil}
+%define release 1
+%endif
+
+%include %{_configdir}/base.cfg
+
+%define gmp_version 6.3.0
+%hash sha512 gmp-%{gmp_version}.tar.bz2 \
+ O2hMm8ue3it+VNC6TJdkv6F8INTzAAAXxVO28eE1tTaUlYD/NzQWgMJdwjbP4LoduM/f5hnOATZWGJ7whxuJ+A==
+
+#
+# The GMP build instructions.
+#
+%include %{_configdir}/gmp.cfg
diff --git a/bare/config/devel/gnu-default-tools.bset b/bare/config/devel/gnu-default-tools.bset
new file mode 100644
index 0000000..2290788
--- /dev/null
+++ b/bare/config/devel/gnu-default-tools.bset
@@ -0,0 +1,24 @@
+#
+# Default tools build
+#
+
+%define release 1
+
+%define gcc_version_message RTEMS bare %{rtems_version}, RSB %{_sbgit_id}, Newlib %{newlib_version}
+
+#
+# GCC requires a GNU sed so build an internal version if one is not
+# available
+#
+%define _internal_gsed_path %{_tmppath}/sb-%{_uid}/${SB_PREFIX_CLEAN}
+%include textproc/gsed-internal.bset
+
+#
+# Build gdb first to raise the Python install error as early as
+# possible. GDB needs expat so it needs to be built before gdb.
+#
+%{with_bare_expat}
+%{with_bare_gmp}
+%{with_bare_gdb}
+%{with_bare_binutils}
+%{with_bare_gcc}
diff --git a/bare/config/devel/libtool-2.4.7-1.cfg b/bare/config/devel/libtool-2.4.7-1.cfg
new file mode 100644
index 0000000..71f6c0c
--- /dev/null
+++ b/bare/config/devel/libtool-2.4.7-1.cfg
@@ -0,0 +1,17 @@
+#
+# Libtool 2.4.7
+#
+
+%if %{release} == %{nil}
+%define release 1
+%endif
+
+%include %{_configdir}/base.cfg
+
+%define libtool_version 2.4.7
+%hash sha256 libtool-%{libtool_version}.tar.gz BOlsJATqcMWQxUbrpCAqThJyLGQAFsErmy8c49SB6ag=
+
+#
+# The libtool build instructions. We use 2.xx Release 1.
+#
+%include %{_configdir}/libtool-2-1.cfg
diff --git a/bare/config/devel/libtool.bset b/bare/config/devel/libtool.bset
index 6d51592..be2894b 100644
--- a/bare/config/devel/libtool.bset
+++ b/bare/config/devel/libtool.bset
@@ -4,4 +4,4 @@
%define release 1
-devel/libtool-2.4.2-1
+devel/libtool-2.4.7-1
diff --git a/bare/config/devel/mpfr-4.2.0.cfg b/bare/config/devel/mpfr-4.2.0.cfg
new file mode 100644
index 0000000..77e9ffd
--- /dev/null
+++ b/bare/config/devel/mpfr-4.2.0.cfg
@@ -0,0 +1,18 @@
+#
+# MPFR 4.2.0
+#
+
+%if %{release} == %{nil}
+%define release 1
+%endif
+
+%include %{_configdir}/base.cfg
+
+%define mpfr_version 4.2.0
+%hash sha512 mpfr-%{mpfr_version}.tar.bz2 \
+ yyqTFLlONKTqSc4mGYAulCDJguVSWKS8Qj+AJ0BjJkaj1CDn/PNzsZYYOFuLK0Eqv6En6PRzBThjQkysIziTwA==
+
+#
+# The MPFR build instructions.
+#
+%include %{_configdir}/mpfr.cfg
diff --git a/bare/config/devel/or1ksim-1.1.0.cfg b/bare/config/devel/or1ksim-1.1.0.cfg
index 5e6b592..c0cbde7 100644
--- a/bare/config/devel/or1ksim-1.1.0.cfg
+++ b/bare/config/devel/or1ksim-1.1.0.cfg
@@ -8,8 +8,9 @@
%include %{_configdir}/base.cfg
-%define or1ksim_version 1.1.0
-%hash md5 or1k-master.zip 7c9aec3fef6648a380ca5e91b2e3e87f
+%define or1ksim_version be3612f0
+%hash sha512 or1ksim-%{or1ksim_version}.tar.gz \
+ Mwd/0EisPq98b7TA9O84As21R/CvgSkZVQktcfRnsUnnMDfxICButX5EzflhzLd1NDzfqoNjXxDi65HBC10LnA==
#
# The or1ksim build instructions. We use 1.x.x Release 1.
diff --git a/bare/config/devel/pcre-8.40-1.cfg b/bare/config/devel/pcre-8.40-1.cfg
index f6031fd..85ec7a1 100644
--- a/bare/config/devel/pcre-8.40-1.cfg
+++ b/bare/config/devel/pcre-8.40-1.cfg
@@ -9,7 +9,8 @@
%include %{_configdir}/base.cfg
%define pcre_version 8.40
-%hash sha512 pcre-%{pcre_version}.tar.bz2 tMJ+r73zO9ehOEZVsZNvS+O8Z0XAcjR+sm6YiJbFJmS9haxCRE2hvni24g9Ftsflkh9fIPWwdBtb09mETlvU4g==
+%hash sha512 pcre-%{pcre_version}.tar.bz2 \
+ tMJ+r73zO9ehOEZVsZNvS+O8Z0XAcjR+sm6YiJbFJmS9haxCRE2hvni24g9Ftsflkh9fIPWwdBtb09mETlvU4g==
#
# The PCRE build instructions. We use 8.x Release 1.
diff --git a/bare/config/devel/qemu-5.2.0-1.cfg b/bare/config/devel/qemu-5.2.0-1.cfg
index 1c1cfeb..ac476ad 100644
--- a/bare/config/devel/qemu-5.2.0-1.cfg
+++ b/bare/config/devel/qemu-5.2.0-1.cfg
@@ -37,6 +37,20 @@
cQju/ja5SAM+gsXEkzSteeR+7PjG9g2w+yUb4kg1eZoOSm2MmZDjA/auINVdRax8wgtIEWnzq5/hdY7/THnowg==
#
+# Patch to fix cgem priority queue interrupt functionality issue
+#
+%patch add qemu --rsb-file=cgem_zynqmp_versal.patch -p1 https://devel.rtems.org/raw-attachment/ticket/4919/0001-hw-arm-xlnx-Connect-secondary-CGEM-IRQs.patch
+%hash sha512 cgem_zynqmp_versal.patch \
+ XIAGD29Qa4uaEKij3TYh1HJUJb7r9ZjZXl19t3Vk+8uleG2O7M1xgqmeA6zoQq+GCrcMRoJxqV4kniRapLgZRQ==
+
+#
+# Patch to fix detection of gdbus-codegen from gio-2.0 packageconfig in QEMU configure used by QEMU meson
+#
+%patch add qemu --rsb-file=gdbus_codegen.patch -p1 https://devel.rtems.org/raw-attachment/ticket/4987/0001-configure-Correctly-handle-gdbus_codegen.patch
+%hash sha512 gdbus_codegen.patch \
+ 1zQ7kAtB11NwNuFK4pXOpYjk09lrgN8CPpc2qNzm2BzDVfhiTh0JWCKtuMbdgKijKdXDKEe/D42ig/XWlINXLg==
+
+#
# The Qemu build instructions. We use 5.x.x Release 1.
#
%include %{_configdir}/qemu-5-1.cfg
diff --git a/bare/config/devel/qemu-couverture-git-1.cfg b/bare/config/devel/qemu-couverture-git-1.cfg
index 0f5629e..bb9b7a6 100644
--- a/bare/config/devel/qemu-couverture-git-1.cfg
+++ b/bare/config/devel/qemu-couverture-git-1.cfg
@@ -23,7 +23,7 @@
#
# Couverture QEMU architectures for this version.
#
-%define qemu_archs arm-softmmu,i386-softmmu,ppc-softmmu,sparc-softmmu
+%define qemu_archs arm-softmmu,aarch64-softmmu,i386-softmmu,ppc-softmmu,sparc-softmmu
#
# Set Couverture-Qemu source from github.
diff --git a/bare/config/devel/qemu-couverture.bset b/bare/config/devel/qemu-couverture.bset
index fd5547c..69f6dfb 100644
--- a/bare/config/devel/qemu-couverture.bset
+++ b/bare/config/devel/qemu-couverture.bset
@@ -21,6 +21,6 @@ devel/libiconv-1.14-1
devel/gettext-0.18.3.1-1
devel/libffi-3.0.13-1
devel/pixman-0.32.4-1
-devel/glib-2.48.2-1
-devel/dtc-1.6.0-1
+devel/glib-2.56.4-1
+devel/dtc-1.6.1-1
devel/qemu-couverture-git-1
diff --git a/bare/config/devel/qemu-xilinx-v2020.2-1.cfg b/bare/config/devel/qemu-xilinx-v2020.2-1.cfg
new file mode 100644
index 0000000..6352268
--- /dev/null
+++ b/bare/config/devel/qemu-xilinx-v2020.2-1.cfg
@@ -0,0 +1,37 @@
+#
+# Xilinx Qemu from git
+#
+
+%if %{release} == %{nil}
+ %define release 1
+%endif
+
+%include %{_configdir}/base.cfg
+
+%include %{_configdir}/bare-config.cfg
+
+%define qemu_version xilinx-v2020.2
+
+#
+# Checkout the version tag and initialize all submodules.
+#
+%source set qemu git://github.com/Xilinx/qemu.git?protocol=https?checkout=%{qemu_version}?submodule=dtc?submodule=slirp?submodule=ui/keycodemapdb?submodule=tests/fp/berkeley-softfloat-3?submodule=tests/fp/berkeley-testfloat-3
+
+#
+# Patch to fix cgem priority queue interrupt functionality issue
+#
+%patch add qemu --rsb-file=xlnx_cgem_zynqmp_versal.patch -p1 https://devel.rtems.org/raw-attachment/ticket/4919/0001-hw-arm-xlnx-Connect-secondary-CGEM-IRQs-xlnx.patch
+%hash sha512 xlnx_cgem_zynqmp_versal.patch \
+ tGjJn7o8/fQwdC0sgsYmPW6bqDzMkwhKRqBwuuy8sdEKivDj7uGISMj7p8Iwy9fkHiO3Dd3feno+iz5fHYGBkA==
+
+#
+# Patch to fix PPC64 build under GCC 13.2.0
+#
+%patch add qemu --rsb-file=xlnx_ppc64_enum.patch -p1 https://devel.rtems.org/raw-attachment/ticket/4988/0001-target-ppc-Resolve-int-enum-mismatch-on-ppc64.patch
+%hash sha512 xlnx_ppc64_enum.patch \
+ afYfClJ5IO9eV23dOAqxurzAnwS1YmiOEPCts/ftXS/ddXp9Rx2oQYuKeZriawKw7MVlqWNv9eTc5ERoFhRKOg==
+
+#
+# The Qemu build instructions. We use 5.x.x Release 1.
+#
+%include %{_configdir}/qemu-5-1.cfg
diff --git a/bare/config/devel/qemu-xilinx-v2023.2-1.cfg b/bare/config/devel/qemu-xilinx-v2023.2-1.cfg
new file mode 100644
index 0000000..ab808bf
--- /dev/null
+++ b/bare/config/devel/qemu-xilinx-v2023.2-1.cfg
@@ -0,0 +1,37 @@
+#
+# Xilinx Qemu from git
+#
+
+%if %{release} == %{nil}
+ %define release 1
+%endif
+
+%include %{_configdir}/base.cfg
+
+%include %{_configdir}/bare-config.cfg
+
+%define qemu_version xilinx_v2023.2
+
+#
+# Checkout the version tag and initialize all submodules.
+#
+%source set qemu git://github.com/Xilinx/qemu.git?protocol=https?checkout=%{qemu_version}?submodule=dtc?submodule=slirp?submodule=ui/keycodemapdb?submodule=tests/fp/berkeley-softfloat-3?submodule=tests/fp/berkeley-testfloat-3
+
+#
+# Patch to fix cgem priority queue interrupt functionality issue
+#
+#%patch add qemu --rsb-file=xlnx_cgem_zynqmp_versal.patch -p1 https://devel.rtems.org/raw-attachment/ticket/4919/0001-hw-arm-xlnx-Connect-secondary-CGEM-IRQs-xlnx.patch
+#%hash sha512 xlnx_cgem_zynqmp_versal.patch \
+# tGjJn7o8/fQwdC0sgsYmPW6bqDzMkwhKRqBwuuy8sdEKivDj7uGISMj7p8Iwy9fkHiO3Dd3feno+iz5fHYGBkA==
+
+#
+# Patch to fix PPC64 build under GCC 13.2.0
+#
+#%patch add qemu --rsb-file=xlnx_ppc64_enum.patch -p1 https://devel.rtems.org/raw-attachment/ticket/4988/0001-target-ppc-Resolve-int-enum-mismatch-on-ppc64.patch
+#%hash sha512 xlnx_ppc64_enum.patch \
+# afYfClJ5IO9eV23dOAqxurzAnwS1YmiOEPCts/ftXS/ddXp9Rx2oQYuKeZriawKw7MVlqWNv9eTc5ERoFhRKOg==
+
+#
+# The Qemu build instructions. We use 5.x.x Release 1.
+#
+%include %{_configdir}/qemu-5-1.cfg
diff --git a/bare/config/devel/qemu-xilinx.bset b/bare/config/devel/qemu-xilinx.bset
new file mode 100644
index 0000000..5a204ca
--- /dev/null
+++ b/bare/config/devel/qemu-xilinx.bset
@@ -0,0 +1,24 @@
+#
+# Build set for Xilinx QEMU
+#
+
+%define release 1
+
+#
+# Name of the package.
+#
+package: qemu-%{qemu_version}-%{_host}-%{release}
+
+#
+# A magic internal path that would break if changes in the defaults.mc
+# macro file are made.
+#
+%define _internal_autotools_path %{_tmppath}/sb-%{_uid}/${SB_PREFIX_CLEAN}
+
+devel/autotools-internal
+devel/libiconv-1.14-1
+devel/gettext-0.18.3.1-1
+devel/libffi-3.0.13-1
+devel/pixman-0.40.0-1
+devel/glib-2.56.4-1
+devel/qemu-xilinx-v2023.2-1
diff --git a/bare/config/devel/qemu.bset b/bare/config/devel/qemu.bset
index 3a9b0d5..7de2ca4 100644
--- a/bare/config/devel/qemu.bset
+++ b/bare/config/devel/qemu.bset
@@ -20,5 +20,5 @@ devel/libiconv-1.14-1
devel/gettext-0.18.3.1-1
devel/libffi-3.0.13-1
devel/pixman-0.40.0-1
-devel/glib-2.48.2-1
+devel/glib-2.56.4-1
devel/qemu-5.2.0-1
diff --git a/bare/config/devel/sis-2-1.cfg b/bare/config/devel/sis-2-1.cfg
index c4b5f9e..6b89800 100644
--- a/bare/config/devel/sis-2-1.cfg
+++ b/bare/config/devel/sis-2-1.cfg
@@ -8,8 +8,9 @@
%include %{_configdir}/base.cfg
-%define sis_version 2.26
-%hash sha512 sis-%{sis_version}.tar.bz2 91c5699ae71113ea405300f4b19e072a9cdf334fe3b1d399ec497fe45ea9522076a310c05560676a960018497a062d7c573e27cc68716f07d2a12ba80881eb2a
+%define sis_version 2.30
+%hash sha512 sis-%{sis_version}.tar.bz2 \
+ vbY9jObdd5tgsG6lCaKRJx9NUtJai2C1uMYZWTeQrWSyW22boAH263nEYUB3B0l1CzdJ2yDK6wOQytB1i8KGTA==
#
# The SIS build instructions.
diff --git a/bare/config/devel/spike-1.1.0.cfg b/bare/config/devel/spike-1.1.0.cfg
index 644b754..73cf3c2 100644
--- a/bare/config/devel/spike-1.1.0.cfg
+++ b/bare/config/devel/spike-1.1.0.cfg
@@ -8,9 +8,9 @@
%include %{_configdir}/base.cfg
-%define spike_version 66b44bfbedda562a32e4a2cd0716afbf731b69cd
+%define spike_version 530af85d83781a3dae31a4ace84a573ec255fefa
-%hash sha512 spike-%{spike_version}.tar.gz a98fc9e564edb3bb471f04063484a5d056befb8b2258b96de2d238cf27d1d5544c2782c91c7731b8f0aa03012eb3d39de33e4f30927349e38c7e131e8241b92f
+%hash sha512 spike-%{spike_version}.tar.gz D+9XugRwrZJ8undjx3x3CILr4VSdeaNsTTUZYeENFPZy6MG7TiQAY5umaUr/oOr6vWCq7YjFhqwjPI+fcieqYw==
#
# The spike build instructions. We use 1.x.x Release 1.
diff --git a/bare/config/gnu-tools-4.6.bset b/bare/config/gnu-tools-4.6.bset
index fa3ced8..baccd84 100644
--- a/bare/config/gnu-tools-4.6.bset
+++ b/bare/config/gnu-tools-4.6.bset
@@ -19,7 +19,7 @@ package: gnu-tool-%{_target}-%{_host}-%{release}
#
# Tool configuration.
#
-binutils-2.22-1
-gcc-4.6-newlib-1.20-1
-expat-2.1.0-1
+devel/binutils-2.22-1
+devel/gcc-4.6-newlib-1.20-1
+devel/expat-2.1.0-1
gdb-7.5-1
diff --git a/bare/config/gnu-tools-4.8.2.bset b/bare/config/gnu-tools-4.8.2.bset
deleted file mode 100644
index 9dd4b8a..0000000
--- a/bare/config/gnu-tools-4.8.2.bset
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# GNU Tools Set
-#
-
-%define release 1
-
-package: gnu-tools-%{_target}-%{_host}-%{release}
-
-#
-# Project custom message
-#
-%define gcc_version_message SB-%{release},gcc-%{gcc_version}/newlib-%{newlib_version}
-
-#
-# Enable G++
-#
-%define enable_cxx 1
-
-#
-# Tool configuration.
-#
-devel/expat-2.1.0-1
-devel/binutils-2.23.2-1
-devel/gcc-4.8.2-newlib-cvs-1
-devel/gdb-7.6.1-1
diff --git a/bare/config/gnu-tools.bset b/bare/config/gnu-tools.bset
new file mode 100644
index 0000000..261f125
--- /dev/null
+++ b/bare/config/gnu-tools.bset
@@ -0,0 +1,17 @@
+#
+# Default tools configuration.
+#
+
+#
+# Default bare build. Override on the command line to the
+# the RSB. For example to test the latest version of gcc use:
+#
+# --with-bare-gcc=tools/gnu-gcc-head-newlib-head
+#
+%defineifnot with_bare_expat devel/expat-2.4.8-1
+%defineifnot with_bare_gmp devel/gmp-6.2.1
+%defineifnot with_bare_gdb devel/gdb-11.2
+%defineifnot with_bare_binutils devel/binutils-2.38
+%defineifnot with_bare_gcc devel/gcc-12-newlib-head
+
+devel/gnu-default-tools.bset
diff --git a/bare/config/print/texinfo-7.0.3.cfg b/bare/config/print/texinfo-7.0.3.cfg
new file mode 100644
index 0000000..f8e67be
--- /dev/null
+++ b/bare/config/print/texinfo-7.0.3.cfg
@@ -0,0 +1,12 @@
+#
+# GNU texinfo 7.0.3
+#
+
+%include %{_configdir}/base.cfg
+
+%define texinfo_version 7.0.3
+
+%hash sha512 texinfo-%{texinfo_version}.tar.gz \
+ uJXP+WVCInQgPxcWNogeOx5VfrmruXIwd6OnnpTgrcXW12Icuqe+R9PF1l/8k/uybwfb+0MMdFoYbq7iiIQGSA==
+
+%include %{_configdir}/texinfo-1.cfg
diff --git a/rtems/config/6/rtems-autotools-internal.bset b/bare/config/print/texinfo-internal.bset
index 19d2f19..8fa5544 100644
--- a/rtems/config/6/rtems-autotools-internal.bset
+++ b/bare/config/print/texinfo-internal.bset
@@ -1,11 +1,11 @@
#
-# Do not use via the command line.
+# Internal GNU texinfo
#
-%define _internal_autotools yes
+%define _internal_texinfo yes
%define _disable_collecting yes
%define _disable_packaging yes
%define _disable_reporting yes
%define _disable_installing yes
-%include 6/rtems-autotools-base.bset
+%include print/texinfo.bset
diff --git a/bare/config/print/texinfo.bset b/bare/config/print/texinfo.bset
new file mode 100644
index 0000000..347c48d
--- /dev/null
+++ b/bare/config/print/texinfo.bset
@@ -0,0 +1,4 @@
+#
+# GNU texinfo
+#
+print/texinfo.cfg
diff --git a/bare/config/print/texinfo.cfg b/bare/config/print/texinfo.cfg
new file mode 100644
index 0000000..63df197
--- /dev/null
+++ b/bare/config/print/texinfo.cfg
@@ -0,0 +1,16 @@
+#
+# GNU makeinfo has a version option, check for it.
+# If not found or not recent build it.
+#
+%define makeinfo_version 7.0.3
+%define has_makeinfo %(makeinfo --version > /dev/null 2>&1; echo $?)
+%if %{has_makeinfo} == 0
+ %define makeinfo_version_resident \
+ %(makeinfo --version | grep -e "^makeinfo (GNU texinfo)" -e "^texi2any (GNU texinfo)" | rev | sed -r 's/ .*//' | rev)
+ %if %{makeinfo_version_resident} < %{makeinfo_version}
+ %define has_makeinfo 1
+ %endif
+%endif
+%if %{has_makeinfo} != 0
+ %include %{_configdir}/print/texinfo-7.0.3.cfg
+%endif
diff --git a/bare/config/textproc/gsed-4.8.cfg b/bare/config/textproc/gsed-4.8.cfg
new file mode 100644
index 0000000..8806bef
--- /dev/null
+++ b/bare/config/textproc/gsed-4.8.cfg
@@ -0,0 +1,12 @@
+#
+# GNU sed 4.8
+#
+
+%include %{_configdir}/base.cfg
+
+%define gsed_version 4.8
+
+%hash sha512 sed-%{gsed_version}.tar.gz \
+ C94KIhaOMQCwIUKTsTu6CEzM5F/7WGtsV1OPUY52akRDn/vyR4mPK7j1BtBTHTbynAp7cIhJVbqTz8/YhjG/eQ==
+
+%include %{_configdir}/gsed-1.cfg
diff --git a/bare/config/textproc/gsed-4.9.cfg b/bare/config/textproc/gsed-4.9.cfg
new file mode 100644
index 0000000..b9cd278
--- /dev/null
+++ b/bare/config/textproc/gsed-4.9.cfg
@@ -0,0 +1,12 @@
+#
+# GNU sed 4.8
+#
+
+%include %{_configdir}/base.cfg
+
+%define gsed_version 4.9
+
+%hash sha512 sed-%{gsed_version}.tar.gz \
+ a474390ff34fe41dea6c97855493d3674bf754387024630ac3b704264810e7d33ecbf957f9e903f0c4474522d7c27276cc861b9c8d8b6eedcfa253a6d7f3af9c
+
+%include %{_configdir}/gsed-1.cfg
diff --git a/bare/config/textproc/gsed-internal.bset b/bare/config/textproc/gsed-internal.bset
new file mode 100644
index 0000000..7b2c3b8
--- /dev/null
+++ b/bare/config/textproc/gsed-internal.bset
@@ -0,0 +1,11 @@
+#
+# Internal GNU sed
+#
+
+%define _internal_gsed yes
+%define _disable_collecting yes
+%define _disable_packaging yes
+%define _disable_reporting yes
+%define _disable_installing yes
+
+%include textproc/gsed.bset
diff --git a/bare/config/textproc/gsed.bset b/bare/config/textproc/gsed.bset
new file mode 100644
index 0000000..68f2e13
--- /dev/null
+++ b/bare/config/textproc/gsed.bset
@@ -0,0 +1,4 @@
+#
+# GNU sed
+#
+textproc/gsed.cfg
diff --git a/bare/config/textproc/gsed.cfg b/bare/config/textproc/gsed.cfg
new file mode 100644
index 0000000..68d8b40
--- /dev/null
+++ b/bare/config/textproc/gsed.cfg
@@ -0,0 +1,8 @@
+#
+# GNU sed has a version option, check for it.
+# If not found build it.
+#
+%define has_gnu_sed %(sed --version > /dev/null 2>&1; echo $?)
+%if %{has_gnu_sed} != 0
+ %include %{_configdir}/textproc/gsed-4.9.cfg
+%endif
diff --git a/rtems/config/6/rtems-aarch64.bset b/rtems/config/6/rtems-aarch64.bset
index e3c91af..99051eb 100644
--- a/rtems/config/6/rtems-aarch64.bset
+++ b/rtems/config/6/rtems-aarch64.bset
@@ -1,4 +1,5 @@
%define release 1
%define rtems_arch aarch64
%define with_libgomp
+%define with_newlib_tls
%include 6/rtems-default.bset
diff --git a/rtems/config/6/rtems-arm.bset b/rtems/config/6/rtems-arm.bset
index 425d66b..c4e6613 100644
--- a/rtems/config/6/rtems-arm.bset
+++ b/rtems/config/6/rtems-arm.bset
@@ -1,4 +1,5 @@
%define release 1
%define rtems_arch arm
%define with_libgomp
+%define with_newlib_tls
%include 6/rtems-default.bset
diff --git a/rtems/config/6/rtems-autotools-base.bset b/rtems/config/6/rtems-autotools-base.bset
deleted file mode 100644
index c6819c1..0000000
--- a/rtems/config/6/rtems-autotools-base.bset
+++ /dev/null
@@ -1,9 +0,0 @@
-%define release 1
-%define rtems_arch none
-
-%include 6/rtems-base.bset
-
-package: rtems-%{rtems_version}-autotools-%{_host}-%{release}
-
-tools/rtems-autoconf-2.69-1
-tools/rtems-automake-1.12.6-1
diff --git a/rtems/config/6/rtems-autotools.bset b/rtems/config/6/rtems-autotools.bset
deleted file mode 100644
index e57d25d..0000000
--- a/rtems/config/6/rtems-autotools.bset
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# Autoconf and automake are not relocatable and cannot be cross-compiled.
-# RTEMS uses autoconf and automake and building RTEMS in the RSB requires
-# bootstrapping and this requires a current autoconf and automake. The RSB
-# provides to support by:
-#
-# 1. Building and installing autoconf and automake with a prefix to a
-# temporary internal path.
-# 2. Using the temporary internal build, build and install another copy
-# using the final prefix location.
-#
-
-#
-# A magic internal path that would break if changes in the defaults.mc
-# macro file are made.
-#
-%define _internal_autotools_path %{_tmppath}/sb-%{_uid}/${SB_PREFIX_CLEAN}
-
-#
-# Disable emailing reports of this building for RTEMS.
-#
-%define mail_disable
-
-6/rtems-autotools-internal
-6/rtems-autotools-base
diff --git a/rtems/config/6/rtems-default.bset b/rtems/config/6/rtems-default.bset
index 1b60066..2d51c50 100644
--- a/rtems/config/6/rtems-default.bset
+++ b/rtems/config/6/rtems-default.bset
@@ -3,17 +3,18 @@
#
%include 6/rtems-base.bset
-6/rtems-autotools
-
#
-# Build gdb first to raise the Python install error as early as possible.
-# GDB needs expat so it needs to be built before.
+# Default RTEMS build. Override on the command line to the
+# the RSB. For example to test the latest version of gcc use:
#
+# --with-rtems-gcc=tools/rtems-gcc-head-newlib-head
+#
+%defineifnot with_rtems_dtc devel/dtc-1.6.1-1
+%defineifnot with_rtems_expat devel/expat-2.5.0-1
+%defineifnot with_rtems_gmp devel/gmp-6.3.0
+%defineifnot with_rtems_gdb tools/rtems-gdb-13.2
+%defineifnot with_rtems_binutils tools/rtems-binutils-2.41
+%defineifnot with_rtems_gcc tools/rtems-gcc-13-newlib-head
+%defineifnot with_rtems_tools tools/rtems-tools-6
-devel/expat-2.1.0-1
-devel/gmp-6.1.0
-tools/rtems-gdb-10
-
-tools/rtems-binutils-2.36
-tools/rtems-gcc-10-newlib-head
-tools/rtems-tools-6
+tools/rtems-default-tools.bset
diff --git a/rtems/config/6/rtems-microblaze.bset b/rtems/config/6/rtems-microblaze.bset
index 0e35a65..f17c59d 100644
--- a/rtems/config/6/rtems-microblaze.bset
+++ b/rtems/config/6/rtems-microblaze.bset
@@ -1,3 +1,20 @@
%define release 1
%define rtems_arch microblaze
-%include 6/rtems-default.bset
+
+#
+# Default tools configuration.
+#
+%include 6/rtems-base.bset
+
+#
+# Build gdb first to raise the Python install error as early as possible.
+# GDB needs expat so it needs to be built before.
+#
+
+devel/expat-2.5.0-1
+devel/gmp-6.2.1
+tools/rtems-gdb-13.2
+
+tools/rtems-xilinx-binutils-2.36
+tools/rtems-xilinx-gcc-10-newlib-head
+tools/rtems-tools-6
diff --git a/rtems/config/6/rtems-mips.bset b/rtems/config/6/rtems-mips.bset
index 370e5ea..6289172 100644
--- a/rtems/config/6/rtems-mips.bset
+++ b/rtems/config/6/rtems-mips.bset
@@ -3,4 +3,4 @@
%define gdb-sim-options --enable-sim-hardware
%define win32-gdb-disable-sim
%include 6/rtems-default.bset
-tools/rtems-mipstx39-gdb-head
+tools/rtems-mipstx39-gdb
diff --git a/rtems/config/6/rtems-moxie.bset b/rtems/config/6/rtems-moxie.bset
index a191c5d..c86777e 100644
--- a/rtems/config/6/rtems-moxie.bset
+++ b/rtems/config/6/rtems-moxie.bset
@@ -2,5 +2,4 @@
%define rtems_arch moxie
%define win32-gdb-disable-sim
%define with_libgomp
-devel/dtc-1.6.0-1
%include 6/rtems-default.bset
diff --git a/rtems/config/6/rtems-nios2.bset b/rtems/config/6/rtems-nios2.bset
index 522eff5..d45024d 100644
--- a/rtems/config/6/rtems-nios2.bset
+++ b/rtems/config/6/rtems-nios2.bset
@@ -1,3 +1,4 @@
%define release 1
%define rtems_arch nios2
+%define with_newlib_tls
%include 6/rtems-default.bset
diff --git a/rtems/config/6/rtems-packages.bset b/rtems/config/6/rtems-packages.bset
index edc7e6b..1f9d71d 100644
--- a/rtems/config/6/rtems-packages.bset
+++ b/rtems/config/6/rtems-packages.bset
@@ -20,5 +20,4 @@ graphics/t1lib
# Networking
#
ftp/curl
-net/lwip
net/protobuf
diff --git a/rtems/config/6/rtems-powerpc.bset b/rtems/config/6/rtems-powerpc.bset
index c19327a..3309057 100644
--- a/rtems/config/6/rtems-powerpc.bset
+++ b/rtems/config/6/rtems-powerpc.bset
@@ -1,4 +1,5 @@
%define release 1
%define rtems_arch powerpc
%define with_libgomp
+%define with_newlib_tls
%include 6/rtems-default.bset
diff --git a/rtems/config/6/rtems-riscv.bset b/rtems/config/6/rtems-riscv.bset
index ad7cb5b..ec1ab3a 100644
--- a/rtems/config/6/rtems-riscv.bset
+++ b/rtems/config/6/rtems-riscv.bset
@@ -1,5 +1,6 @@
%define release 1
%define rtems_arch riscv
%define with_libgomp
+%define with_newlib_tls
%include 6/rtems-default.bset
devel/sis-2-1
diff --git a/rtems/config/6/rtems-sparc.bset b/rtems/config/6/rtems-sparc.bset
index 48d152d..809d47e 100644
--- a/rtems/config/6/rtems-sparc.bset
+++ b/rtems/config/6/rtems-sparc.bset
@@ -1,6 +1,7 @@
%define release 1
%define rtems_arch sparc
%define with_libgomp
+%define with_newlib_tls
%define gdb-disable-sim 1
%include 6/rtems-default.bset
devel/sis-2-1
diff --git a/rtems/config/6/rtems-tools.bset b/rtems/config/6/rtems-tools.bset
index d0be01a..20e2199 100644
--- a/rtems/config/6/rtems-tools.bset
+++ b/rtems/config/6/rtems-tools.bset
@@ -14,4 +14,4 @@
#
%include rtems-base.bset
-tools/rtems-tools-6-1
+tools/rtems-tools-6
diff --git a/rtems/config/6/rtems-x86_64.bset b/rtems/config/6/rtems-x86_64.bset
index dbfc9e6..088c9f5 100644
--- a/rtems/config/6/rtems-x86_64.bset
+++ b/rtems/config/6/rtems-x86_64.bset
@@ -1,4 +1,9 @@
%define release 1
%define rtems_arch x86_64
%define with_libgomp
+%define grub2_platform efi
+%define grub2_target x86_64
+
%include 6/rtems-default.bset
+
+tools/rtems-grub-2.06
diff --git a/rtems/config/7/rtems-aarch64.bset b/rtems/config/7/rtems-aarch64.bset
index fc794aa..d899dc7 100644
--- a/rtems/config/7/rtems-aarch64.bset
+++ b/rtems/config/7/rtems-aarch64.bset
@@ -1,4 +1,5 @@
%define release 1
%define rtems_arch aarch64
%define with_libgomp
+%define with_newlib_tls
%include 7/rtems-default.bset
diff --git a/rtems/config/7/rtems-arm.bset b/rtems/config/7/rtems-arm.bset
index 7518812..a9bd612 100644
--- a/rtems/config/7/rtems-arm.bset
+++ b/rtems/config/7/rtems-arm.bset
@@ -1,4 +1,5 @@
%define release 1
%define rtems_arch arm
%define with_libgomp
+%define with_newlib_tls
%include 7/rtems-default.bset
diff --git a/rtems/config/7/rtems-default.bset b/rtems/config/7/rtems-default.bset
index acb7059..3abfd78 100644
--- a/rtems/config/7/rtems-default.bset
+++ b/rtems/config/7/rtems-default.bset
@@ -1,14 +1,20 @@
+#
+# Default tools configuration.
+#
%include 7/rtems-base.bset
#
-# Build gdb first to raise the Python install error as early as possible.
-# GDB needs expat so it needs to be built before.
+# Default RTEMS build. Override on the command line to the
+# the RSB. For example to test the latest version of gcc use:
#
+# --with-rtems-gcc=tools/rtems-gcc-head-newlib-head
+#
+%defineifnot with_rtems_dtc devel/dtc-1.6.1-1
+%defineifnot with_rtems_expat devel/expat-2.5.0-1
+%defineifnot with_rtems_gmp devel/gmp-6.2.1
+%defineifnot with_rtems_gdb tools/rtems-gdb-head
+%defineifnot with_rtems_binutils tools/rtems-binutils-head
+%defineifnot with_rtems_gcc tools/rtems-gcc-head-newlib-head
+%defineifnot with_rtems_tools tools/rtems-tools-6
-devel/expat-2.1.0-1
-devel/gmp-6.1.0
-tools/rtems-gdb-head
-
-tools/rtems-binutils-head
-tools/rtems-gcc-head-newlib-head
-tools/rtems-tools-6
+tools/rtems-default-tools.bset
diff --git a/rtems/config/7/rtems-m68k.bset b/rtems/config/7/rtems-m68k.bset
index c628971..497f42a 100644
--- a/rtems/config/7/rtems-m68k.bset
+++ b/rtems/config/7/rtems-m68k.bset
@@ -1,3 +1,4 @@
%define release 1
%define rtems_arch m68k
+%define with_newlib_tls
%include 7/rtems-default.bset
diff --git a/rtems/config/7/rtems-moxie.bset b/rtems/config/7/rtems-moxie.bset
index 60fe7f4..8cd3642 100644
--- a/rtems/config/7/rtems-moxie.bset
+++ b/rtems/config/7/rtems-moxie.bset
@@ -2,5 +2,4 @@
%define rtems_arch moxie
%define win32-gdb-disable-sim
%define with_libgomp
-devel/dtc-1.6.0-1
%include 7/rtems-default.bset
diff --git a/rtems/config/7/rtems-nios2.bset b/rtems/config/7/rtems-nios2.bset
index 735497f..a56aaeb 100644
--- a/rtems/config/7/rtems-nios2.bset
+++ b/rtems/config/7/rtems-nios2.bset
@@ -1,3 +1,4 @@
%define release 1
%define rtems_arch nios2
+%define with_newlib_tls
%include 7/rtems-default.bset
diff --git a/rtems/config/7/rtems-powerpc.bset b/rtems/config/7/rtems-powerpc.bset
index 3da8841..4438550 100644
--- a/rtems/config/7/rtems-powerpc.bset
+++ b/rtems/config/7/rtems-powerpc.bset
@@ -1,4 +1,5 @@
%define release 1
%define rtems_arch powerpc
%define with_libgomp
+%define with_newlib_tls
%include 7/rtems-default.bset
diff --git a/rtems/config/7/rtems-riscv.bset b/rtems/config/7/rtems-riscv.bset
index 441203e..3f81152 100644
--- a/rtems/config/7/rtems-riscv.bset
+++ b/rtems/config/7/rtems-riscv.bset
@@ -1,4 +1,5 @@
%define release 1
%define rtems_arch riscv
%define with_libgomp
+%define with_newlib_tls
%include 7/rtems-default.bset
diff --git a/rtems/config/7/rtems-sparc.bset b/rtems/config/7/rtems-sparc.bset
index a147b8f..3c0d8f0 100644
--- a/rtems/config/7/rtems-sparc.bset
+++ b/rtems/config/7/rtems-sparc.bset
@@ -1,6 +1,7 @@
%define release 1
%define rtems_arch sparc
%define with_libgomp
+%define with_newlib_tls
%define gdb-disable-sim 1
%include 7/rtems-default.bset
devel/sis-2-1
diff --git a/rtems/config/bsps/atsamv.bset b/rtems/config/bsps/atsamv.bset
index 6b2dcf5..c26886b 100644
--- a/rtems/config/bsps/atsamv.bset
+++ b/rtems/config/bsps/atsamv.bset
@@ -1,8 +1,6 @@
%define mail_single_report 1
-%define with_rtems_bsp atsamv
-%define rtems_target arm-rtems%{rtems_version}
-%define rtems_host %{rtems_target}
+%define with_rtems_bsp arm/atsamv
6/rtems-arm
6/rtems-kernel
diff --git a/rtems/config/bsps/beagleboneblack.bset b/rtems/config/bsps/beagleboneblack.bset
index 33954d8..2518c96 100644
--- a/rtems/config/bsps/beagleboneblack.bset
+++ b/rtems/config/bsps/beagleboneblack.bset
@@ -11,9 +11,7 @@
%define mail_single_report 1
-%define with_rtems_bsp beagleboneblack
-%define rtems_target arm-rtems%{rtems_version}
-%define rtems_host %{rtems_target}
+%define with_rtems_bsp arm/beagleboneblack
6/rtems-arm
6/rtems-kernel
diff --git a/rtems/config/bsps/erc32.bset b/rtems/config/bsps/erc32.bset
index bd27833..fd937cd 100644
--- a/rtems/config/bsps/erc32.bset
+++ b/rtems/config/bsps/erc32.bset
@@ -11,9 +11,7 @@
%define mail_single_report 1
-%define with_rtems_bsp erc32
-%define rtems_target sparc-rtems%{rtems_version}
-%define rtems_host %{rtems_target}
+%define with_rtems_bsp sparc/erc32
6/rtems-sparc
6/rtems-kernel
diff --git a/rtems/config/bsps/gr712rc.bset b/rtems/config/bsps/gr712rc.bset
index e74a984..c6ae58a 100644
--- a/rtems/config/bsps/gr712rc.bset
+++ b/rtems/config/bsps/gr712rc.bset
@@ -1,8 +1,6 @@
%define mail_single_report 1
-%define with_rtems_bsp gr712rc
-%define rtems_target sparc-rtems%{rtems_version}
-%define rtems_host %{rtems_target}
+%define with_rtems_bsp sparc/gr712rc
6/rtems-sparc
6/rtems-kernel
diff --git a/rtems/config/bsps/gr740.bset b/rtems/config/bsps/gr740.bset
index 79b8ef1..7ead2bd 100644
--- a/rtems/config/bsps/gr740.bset
+++ b/rtems/config/bsps/gr740.bset
@@ -1,8 +1,6 @@
%define mail_single_report 1
-%define with_rtems_bsp gr740
-%define rtems_target sparc-rtems%{rtems_version}
-%define rtems_host %{rtems_target}
+%define with_rtems_bsp sparc/gr740
6/rtems-sparc
6/rtems-kernel
diff --git a/rtems/config/bsps/imx7.bset b/rtems/config/bsps/imx7.bset
index e49e979..8cf89cd 100644
--- a/rtems/config/bsps/imx7.bset
+++ b/rtems/config/bsps/imx7.bset
@@ -1,8 +1,6 @@
%define mail_single_report 1
-%define with_rtems_bsp imx7
-%define rtems_target arm-rtems%{rtems_version}
-%define rtems_host %{rtems_target}
+%define with_rtems_bsp arm/imx7
6/rtems-arm
6/rtems-kernel
diff --git a/rtems/config/bsps/pc.bset b/rtems/config/bsps/pc.bset
index 57212f6..e47e702 100644
--- a/rtems/config/bsps/pc.bset
+++ b/rtems/config/bsps/pc.bset
@@ -11,9 +11,7 @@
%define mail_single_report 1
-%define with_rtems_bsp pc686
-%define rtems_target i386-rtems%{rtems_version}
-%define rtems_host %{rtems_target}
+%define with_rtems_bsp i386/pc686
6/rtems-i386
6/rtems-kernel
diff --git a/rtems/config/bsps/qoriq_e500.bset b/rtems/config/bsps/qoriq_e500.bset
index 2011d75..be3a332 100644
--- a/rtems/config/bsps/qoriq_e500.bset
+++ b/rtems/config/bsps/qoriq_e500.bset
@@ -1,8 +1,6 @@
%define mail_single_report 1
-%define with_rtems_bsp qoriq_e500
-%define rtems_target powerpc-rtems%{rtems_version}
-%define rtems_host %{rtems_target}
+%define with_rtems_bsp powerpc/qoriq_e500
6/rtems-powerpc
6/rtems-kernel
diff --git a/rtems/config/bsps/qoriq_e6500_32.bset b/rtems/config/bsps/qoriq_e6500_32.bset
index 419f334..d072293 100644
--- a/rtems/config/bsps/qoriq_e6500_32.bset
+++ b/rtems/config/bsps/qoriq_e6500_32.bset
@@ -1,8 +1,6 @@
%define mail_single_report 1
-%define with_rtems_bsp qoriq_e6500_32
-%define rtems_target powerpc-rtems%{rtems_version}
-%define rtems_host %{rtems_target}
+%define with_rtems_bsp powerpc/qoriq_e6500_32
6/rtems-powerpc
6/rtems-kernel
diff --git a/rtems/config/bsps/qoriq_e6500_64.bset b/rtems/config/bsps/qoriq_e6500_64.bset
index 2d02b26..7bcd3b8 100644
--- a/rtems/config/bsps/qoriq_e6500_64.bset
+++ b/rtems/config/bsps/qoriq_e6500_64.bset
@@ -1,8 +1,6 @@
%define mail_single_report 1
-%define with_rtems_bsp qoriq_e6500_64
-%define rtems_target powerpc-rtems%{rtems_version}
-%define rtems_host %{rtems_target}
+%define with_rtems_bsp powerpc/qoriq_e6500_64
6/rtems-powerpc
6/rtems-kernel
diff --git a/rtems/config/bsps/raspberrypi2.bset b/rtems/config/bsps/raspberrypi2.bset
index 83b12ea..c1d0f35 100644
--- a/rtems/config/bsps/raspberrypi2.bset
+++ b/rtems/config/bsps/raspberrypi2.bset
@@ -11,9 +11,7 @@
%define mail_single_report 1
-%define with_rtems_bsp raspberrypi2
-%define rtems_target arm-rtems%{rtems_version}
-%define rtems_host %{rtems_target}
+%define with_rtems_bsp arm/raspberrypi2
6/rtems-arm
6/rtems-kernel
diff --git a/rtems/config/bsps/xilinx_zynq_zc702.bset b/rtems/config/bsps/xilinx_zynq_zc702.bset
index 295c841..147bb7a 100644
--- a/rtems/config/bsps/xilinx_zynq_zc702.bset
+++ b/rtems/config/bsps/xilinx_zynq_zc702.bset
@@ -11,9 +11,7 @@
%define mail_single_report 1
-%define with_rtems_bsp xilinx_zynq_zc702
-%define rtems_target arm-rtems%{rtems_version}
-%define rtems_host %{rtems_target}
+%define with_rtems_bsp arm/xilinx_zynq_zc702
6/rtems-arm
6/rtems-kernel
diff --git a/rtems/config/bsps/xilinx_zynq_zc706.bset b/rtems/config/bsps/xilinx_zynq_zc706.bset
index 8b493cf..24d2e20 100644
--- a/rtems/config/bsps/xilinx_zynq_zc706.bset
+++ b/rtems/config/bsps/xilinx_zynq_zc706.bset
@@ -11,9 +11,7 @@
%define mail_single_report 1
-%define with_rtems_bsp xilinx_zynq_zc706
-%define rtems_target arm-rtems%{rtems_version}
-%define rtems_host %{rtems_target}
+%define with_rtems_bsp arm/xilinx_zynq_zc706
6/rtems-arm
6/rtems-kernel
diff --git a/rtems/config/bsps/xilinx_zynq_zedboard.bset b/rtems/config/bsps/xilinx_zynq_zedboard.bset
index 801c6c9..60d4e75 100644
--- a/rtems/config/bsps/xilinx_zynq_zedboard.bset
+++ b/rtems/config/bsps/xilinx_zynq_zedboard.bset
@@ -11,9 +11,7 @@
%define mail_single_report 1
-%define with_rtems_bsp xilinx_zynq_zedboard
-%define rtems_target arm-rtems%{rtems_version}
-%define rtems_host %{rtems_target}
+%define with_rtems_bsp arm/xilinx_zynq_zedboard
6/rtems-arm
6/rtems-kernel
diff --git a/rtems/config/graphics/libjpeg-9a-1.cfg b/rtems/config/graphics/libjpeg-9a-1.cfg
index fef32d6..593bd31 100644
--- a/rtems/config/graphics/libjpeg-9a-1.cfg
+++ b/rtems/config/graphics/libjpeg-9a-1.cfg
@@ -1,5 +1,5 @@
#
-# NTP 4.2.6p5
+# JPEG
#
%if %{release} == %{nil}
@@ -13,7 +13,8 @@
#
%define libjpeg_version 9a
-%hash sha512 jpegsrc.v%{libjpeg_version}.tar.gz 9b21cc115e22c68bea46db462263c5c7a0d10beb192a919ecccbd801a25982b518ce44d8c301dd582ecaba1850e0e0f20e322be82b0e24ae917b9949b4f10d3b
+%hash sha512 jpegsrc.v%{libjpeg_version}.tar.gz \
+ iu2Aee2pRisVF0faGrRM5QfqfBZAxATPfrWrVWxYpHdCyj+sZwgM/6dOWUC8dc87Qej8X+j6UXYh15NiGktHrg==
#
# libjpeg Build configuration
diff --git a/rtems/config/graphics/nxlib-0.47-dev-1.cfg b/rtems/config/graphics/nxlib-0.47-dev-1.cfg
index deed54e..aec6806 100644
--- a/rtems/config/graphics/nxlib-0.47-dev-1.cfg
+++ b/rtems/config/graphics/nxlib-0.47-dev-1.cfg
@@ -11,7 +11,9 @@
#
# nxlib Version
#
-%define nxlib_version 0.47-dev
+%define nxlib_version 71d911dc3e
+%hash sha512 nxlib-%{nxlib_version}.tar.gz \
+ 6D1p1ryhBGVAqIaqz4Z71vFWZGusG1bB2F1WCy+aS9DTMCG76shIr4LajCMuM+qYrDui+ZCIYbH5ydLPQHHtig==
#
# nxlib Build configuration
diff --git a/rtems/config/net-mgmt/net-snmp-5.7.2.1-1.cfg b/rtems/config/net-mgmt/net-snmp-5.7.2.1-1.cfg
index e4fe63e..9403605 100644
--- a/rtems/config/net-mgmt/net-snmp-5.7.2.1-1.cfg
+++ b/rtems/config/net-mgmt/net-snmp-5.7.2.1-1.cfg
@@ -13,7 +13,8 @@
#
%define net_snmp_version 5.7.2.1
-%hash sha512 net-snmp-%{net_snmp_version}.tar.gz 6c4dadd145cab9572e2559ad99d6794469685086771c6d757d3667da1a061ab86746d53c28d48381c59a90d92b1812b813f3176cff156c41929177fb585299d0
+%hash sha512 net-snmp-%{net_snmp_version}.tar.gz \
+ bE2t0UXKuVcuJVmtmdZ5RGloUIZ3HG11fTZn2hoGGrhnRtU8KNSDgcWakNkrGBK4E/MXbP8VbEGSkXf7WFKZ0A==
#
# We need some special flags to build this version.
@@ -23,8 +24,9 @@
#
# Patch for RTEMS support.
#
-%patch add net-snmp %{rtems_git_tools}/net-snmp/rtems-net-snmp-5.7.2.1-20190704.patch
-#%hash sha512 rtems-net-snmp-5.7.2.1-20140623.patch 4eb987d88c6414f2e07d725c2ebb3e88a40191c7befce879cae9ef67143dc25aa88942cfc525d36cd3683476d1cc0f5882d4a730d3bb9c53be2c7a079874d7dd
+%patch add net-snmp %{rtems_devel_ticket}/4703/rtems-net-snmp-5.7.2.1-20140623.patch
+%hash sha512 rtems-net-snmp-5.7.2.1-20140623.patch \
+ TrmH2IxkFPLgfXJcLrs+iKQBkce+/Oh5yunvZxQ9wlqoiULPxSXTbNNoNHbRzA9YgtSnMNO7nFO+LHoHmHTX3Q==
#
# NetSNMP Build configuration
diff --git a/rtems/config/net/net-services-1.cfg b/rtems/config/net/net-services-1.cfg
new file mode 100644
index 0000000..393b24f
--- /dev/null
+++ b/rtems/config/net/net-services-1.cfg
@@ -0,0 +1,23 @@
+#
+# RTEMS Net Services
+#
+
+%if %{release} == %{nil}
+ %define release 1
+%endif
+
+#
+# Net Services Version
+#
+%define rtems_net_services_version 1651ac768f744725708c4328745665e1e7fa3c26
+%hash sha512 rtems-net-services-%{rtems_net_services_version}.tar.bz2 \
+ +czrODTpJF+nvMF4TFQFi3qn3k+X/N4JnxHFChrWGXAnaBQayjEkSNObhmETG3qe/ET8dhXHwJs/1A3A7e3uLA==
+
+%define rtems_waf_version 68654b4f995382765605dc16917baad4bdbf7f7c
+%hash sha512 rtems_waf-%{rtems_waf_version}.tar.bz2 \
+ NAuyFxjfSiQd6VfYZl4fJClywPrLF2fN+GjXHjq3ddceqaBrSeHZ+XpYpU3XTnk2qKICsUSTLV+CskDuWdwqvQ==
+
+#
+# Net Services Build configuration
+#
+%include %{_configdir}/tools/rtems-net-services.cfg
diff --git a/rtems/config/net/net-services.bset b/rtems/config/net/net-services.bset
new file mode 100644
index 0000000..7d90399
--- /dev/null
+++ b/rtems/config/net/net-services.bset
@@ -0,0 +1,15 @@
+#
+# Build set for RTEMS Net Services
+#
+
+%define release 1
+
+#
+# The RTEMS Package defines
+#
+%include rtems-package.bset
+
+#
+# Build Net Services
+#
+net/net-services-1
diff --git a/rtems/config/rtems-bsp.cfg b/rtems/config/rtems-bsp.cfg
index 801cd5c..4f9343a 100644
--- a/rtems/config/rtems-bsp.cfg
+++ b/rtems/config/rtems-bsp.cfg
@@ -40,28 +40,44 @@
%{pkgconfig filter-flags yes}
#
-# We need a host from the user to specifiy the RTEMS architecture and major
-# version. It can be defined in rtems_host.
+# We need a BSP from the user.
#
-%if %{defined rtems_host}
- %{triplet _host %{rtems_host}}
-%endif
-%if %{rtems_bsp_error}
- %if %{_host} == %{nil} || %{_host} == %{_build}
- %error No RTEMS host or BSP specified: --host=<arch>-rtems<ver>
+%if %{defined with_rtems_bsp_config}
+ %define rtems_bsp %(%{_sbdir}/sb/rtems-kernel-config-check \
+ -c %{with_rtems_bsp_config})
+%else
+ %ifn %{defined with_rtems_bsp}
+ %if %{rtems_bsp_error}
+ %error No RTEMS BSP specified: --with-rtems-bsp=bsp
+ %endif
+ %define with_rtems_bsp sparc/erc32
%endif
+ %define rtems_bsp %{with_rtems_bsp}
%endif
#
-# We need a BSP from the user.
+# Count the BSPs. Currently only one is supported
#
-%ifn %{defined with_rtems_bsp}
- %if %{rtems_bsp_error}
- %error No RTEMS BSP specified: --with-rtems-bsp=bsp
- %endif
- %define with_rtems_bsp sparc/erc32
+%define rtems_bsp_count %(echo %{rtems_bsp} | tr ' ' '\n' | wc -l)
+
+%if %{rtems_bsp_count} > 1
+ %error RTEMS packages do not support multiple BSP builds
+%endif
+
+#
+# Separate out the arch and bsp
+#
+%define rtems_arch %(echo %{rtems_bsp} | sed -e 's^\/.*^^g')
+%define rtems_bsp %(echo %{rtems_bsp} | sed -e 's^.*\/^^g')
+
+#
+# We need a host from the user to specifiy the RTEMS architecture and major
+# version. It can be defined in rtems_host.
+#
+%if !%{defined rtems_host}
+ %define rtems_host %{rtems_arch}-rtems%{rtems_version}
%endif
-%define rtems_bsp %{with_rtems_bsp}
+%{triplet _host %{rtems_host}}
#
# If no tools or RTEMS provided use the prefix. If staging use the staging
diff --git a/rtems/config/rtems-urls.bset b/rtems/config/rtems-urls.bset
index 91e4bad..7dfab90 100644
--- a/rtems/config/rtems-urls.bset
+++ b/rtems/config/rtems-urls.bset
@@ -6,6 +6,8 @@
# The RTEMS http git URL.
#
%define rtems_http_git https://git.rtems.org
+%define rtems_http_devel https://devel.rtems.org
+%define rtems_devel_ticket https://devel.rtems.org/raw-attachment/ticket
%define rtems_git_tools %{rtems_http_git}/rtems-tools/plain/tools/%{rtems_version}
%define rtems_autoconf_patches %{rtems_git_tools}/autoconf
%define rtems_automake_patches %{rtems_git_tools}/automake
diff --git a/rtems/config/tools/rtems-binutils-2.37.cfg b/rtems/config/tools/rtems-binutils-2.37.cfg
new file mode 100644
index 0000000..8cbe738
--- /dev/null
+++ b/rtems/config/tools/rtems-binutils-2.37.cfg
@@ -0,0 +1,12 @@
+%include %{_configdir}/checks.cfg
+%include %{_configdir}/base.cfg
+
+%define binutils_version 2.37
+#%define binutils_external 1
+
+%hash sha512 binutils-%{binutils_version}.tar.bz2 s/UYRpf3fpTJXUj2h53iFOteF6pu+OlvZVMNFX5RWxri8pDphFPk/xJkYlIPoPY4UrbhyPuzl+0uQZhDNrx4xg==
+
+%define with_deterministic_archives 1
+%define with_64_bit_bfd 1
+
+%include %{_configdir}/binutils-2-1.cfg
diff --git a/rtems/config/tools/rtems-binutils-2.38.cfg b/rtems/config/tools/rtems-binutils-2.38.cfg
new file mode 100644
index 0000000..feac42f
--- /dev/null
+++ b/rtems/config/tools/rtems-binutils-2.38.cfg
@@ -0,0 +1,12 @@
+%include %{_configdir}/checks.cfg
+%include %{_configdir}/base.cfg
+
+%define binutils_version 2.38
+#%define binutils_external 1
+
+%hash sha512 binutils-%{binutils_version}.tar.bz2 7690b4158bd6587a85c6b98903980b9ac6f16b47f7fd1e60986b0a70388bedcfdc05d75597aa49c81fec1609ce24bed6c26583f76fd2471a9d63394fd9798afc
+
+%define with_deterministic_archives 1
+%define with_64_bit_bfd 1
+
+%include %{_configdir}/binutils-2-1.cfg
diff --git a/rtems/config/tools/rtems-binutils-2.39.cfg b/rtems/config/tools/rtems-binutils-2.39.cfg
new file mode 100644
index 0000000..fd3d8d6
--- /dev/null
+++ b/rtems/config/tools/rtems-binutils-2.39.cfg
@@ -0,0 +1,13 @@
+%include %{_configdir}/checks.cfg
+%include %{_configdir}/base.cfg
+
+%define binutils_version 2.39
+#%define binutils_external 1
+
+%hash sha512 binutils-%{binutils_version}.tar.bz2 \
+ +qWS3Uj8cVkBrXBKyW29NLF5LFHnfHqSo4eWSwcAcDx0vgfeRcxHUZRcjAZ0Noxz3Be7xWPR0s0jW169jG5++w==
+
+%define with_deterministic_archives 1
+%define with_64_bit_bfd 1
+
+%include %{_configdir}/binutils-2-1.cfg
diff --git a/rtems/config/tools/rtems-binutils-2.40.cfg b/rtems/config/tools/rtems-binutils-2.40.cfg
new file mode 100644
index 0000000..87f634b
--- /dev/null
+++ b/rtems/config/tools/rtems-binutils-2.40.cfg
@@ -0,0 +1,13 @@
+%include %{_configdir}/checks.cfg
+%include %{_configdir}/base.cfg
+
+%define binutils_version 2.40
+#%define binutils_external 1
+
+%hash sha512 binutils-%{binutils_version}.tar.bz2 \
+ MCVjYpRRhDKcmUcw9g2EkyklR+Dl3l9J1XSQ2NmxoKGDk79/cJNLpQYe4gAexMv18gbTEN+VEqf7NiWjYuNY+Q==
+
+%define with_deterministic_archives 1
+%define with_64_bit_bfd 1
+
+%include %{_configdir}/binutils-2-1.cfg
diff --git a/rtems/config/tools/rtems-binutils-2.41.cfg b/rtems/config/tools/rtems-binutils-2.41.cfg
new file mode 100644
index 0000000..6995946
--- /dev/null
+++ b/rtems/config/tools/rtems-binutils-2.41.cfg
@@ -0,0 +1,13 @@
+%include %{_configdir}/checks.cfg
+%include %{_configdir}/base.cfg
+
+%define binutils_version 2.41
+#%define binutils_external 1
+
+%hash sha512 binutils-%{binutils_version}.tar.bz2 \
+ jEMDFFJi6EWY2CjhpkZd2/Wo/3V+/j/ZgZSIVPMrMRr+WxVL45ZuUNhc9dJSF1ZMH1GdGXFlqsjoLvytyeHkfA==
+
+%define with_deterministic_archives 1
+%define with_64_bit_bfd 1
+
+%include %{_configdir}/binutils-2-1.cfg
diff --git a/rtems/config/tools/rtems-binutils-head.cfg b/rtems/config/tools/rtems-binutils-head.cfg
index b4ebe20..3516d2c 100644
--- a/rtems/config/tools/rtems-binutils-head.cfg
+++ b/rtems/config/tools/rtems-binutils-head.cfg
@@ -1,11 +1,12 @@
%include %{_configdir}/checks.cfg
%include %{_configdir}/base.cfg
-%define binutils_version 4ef6d2f
+%define binutils_version eb42bb1
%define binutils_external 1
%define binutils_expand_name sourceware-mirror-binutils-gdb-%{binutils_version}
%source set binutils --rsb-file=%{binutils_expand_name}.tar.gz https://codeload.github.com/RTEMS/sourceware-mirror-binutils-gdb/tar.gz/%{binutils_version}
-%hash sha512 %{binutils_expand_name}.tar.gz 5e3c8d7d6d6a0907a45cabec65b48953906ea2fc6b8c7a909cc56c7383c95f083ac56db600d27442301b255b58a6febbe4bf51b0a82991d6685eab7b4391d272
+%hash sha512 %{binutils_expand_name}.tar.gz \
+ qDuLOqwQ/kQX30hIu5UVDqMuKjnpoKTEZ4xo85lrzq6VtnCd6nwdO5t9szbhJc4P1UWww9rRNMcqj7d2BKeNqg==
%define with_deterministic_archives 1
%define with_64_bit_bfd 1
diff --git a/rtems/config/tools/rtems-default-tools.bset b/rtems/config/tools/rtems-default-tools.bset
new file mode 100644
index 0000000..35c9235
--- /dev/null
+++ b/rtems/config/tools/rtems-default-tools.bset
@@ -0,0 +1,29 @@
+#
+# Default tools build
+#
+
+# GCC requires a GNU sed so build an internal version if one is not
+# available
+#
+%define _internal_gsed_path %{_tmpinternal}
+%defineifnot with_rtems_gsed textproc/gsed-internal
+
+# GNU tools need texinfo for makeinfo to build documentation
+%define _internal_texinfo_path %{_tmpinternal}
+%defineifnot with_rtems_texinfo print/texinfo-internal
+
+#
+# Build gdb first to raise the Python install error as early as
+# possible.
+#
+# GCC and GDB need GMP.
+#
+%{with_rtems_dtc}
+%{with_rtems_expat}
+%{with_rtems_gmp}
+%{with_rtems_gsed}
+%{with_rtems_texinfo}
+%{with_rtems_gdb}
+%{with_rtems_binutils}
+%{with_rtems_gcc}
+%{with_rtems_tools}
diff --git a/rtems/config/tools/rtems-gcc-10-newlib-head.cfg b/rtems/config/tools/rtems-gcc-10-newlib-head.cfg
index 9ed2ba8..1627dac 100644
--- a/rtems/config/tools/rtems-gcc-10-newlib-head.cfg
+++ b/rtems/config/tools/rtems-gcc-10-newlib-head.cfg
@@ -1,26 +1,28 @@
%include %{_configdir}/checks.cfg
%include %{_configdir}/base.cfg
-%define gcc_version 348fb9d
+%define gcc_version d04fe55
%define gcc_external 1
%define gcc_expand_name gnu-mirror-gcc-%{gcc_version}
%source set gcc --rsb-file=%{gcc_expand_name}.tar.gz https://codeload.github.com/RTEMS/gnu-mirror-gcc/tar.gz/%{gcc_version}
-%hash sha512 %{gcc_expand_name}.tar.gz 207eedc02ce5426e9b553d72117653a58ceb3f59b3c9413569ee31a4956ee2597e9562cff862c2be88ec0466739c6599f372760d2ad8c1340bb1d2e0ef714a89
+%hash sha512 %{gcc_expand_name}.tar.gz \
+ Q6zRH0E9Z2g7vWiUbmySp1zk4BnRAZQH6hPys1gQLh0dDF4V5T/usDuvL8vVFhphzEB1QXGf0Okr8Uy1FL/ioA==
-%patch add gcc -p1 https://devel.rtems.org/raw-attachment/ticket/4196/0001-gcov-Add-fprofile-info-section-support.patch
-%hash sha512 0001-gcov-Add-fprofile-info-section-support.patch 284c4eb2180e8a7dac600b5833da5d2f99568b7fc2f873c145665ef56ab72ca3e9ac3da1e8bc88e72dd229f02a28402770d82ddd7a1b836836ae00cdfd1d400f
+%patch add gcc -p1 https://devel.rtems.org/raw-attachment/ticket/4196/0001-Back-port-v8-of-gcov-improvements-to-GCC-10.patch
+%hash sha512 0001-Back-port-v8-of-gcov-improvements-to-GCC-10.patch c2d1faed68aa0f60bef917365545cc4cc899df428a5d08f178417c06def4fd3cd3a749c1871c8a22552022c29dfae4a3d21161e2b01291e458ea8d670f01887e
%patch add gcc -p1 https://devel.rtems.org/raw-attachment/ticket/4215/0001-nios2-Remove-custom-instruction-warnings.patch
%hash sha512 0001-nios2-Remove-custom-instruction-warnings.patch afd8a5e6bdcc5b75d5fbbf558bdf56ccac400521a6eec9d88cc95f6be67c481f2dbf8faa0f6ddc1e4ac7c56a84938714d80e46e9cf80ec4b8fcd739986449881
-%define newlib_version 436e475
+%define newlib_version 176b19f
%define newlib_external 1
%define newlib_expand_name sourceware-mirror-newlib-cygwin-%{newlib_version}
%source set newlib --rsb-file=newlib-%{newlib_version}.tar.gz https://codeload.github.com/RTEMS/sourceware-mirror-newlib-cygwin/tar.gz/%{newlib_version}
-%hash sha512 newlib-%{newlib_version}.tar.gz a376e4459b05bdacbfc02b4d928336c4527d68788daf5914454d7cbc3ef01de404844df74ab87479f1753058fd55cc7306e44f7477c10bd3e99abdd0f05dc6b6
+%hash sha512 newlib-%{newlib_version}.tar.gz \
+ ZUzGjXI3ZJ6GrxMXggg+jIO0nyi+edKoilckRxtujsOiwhOyITahIqcOHhZiX5nd4E4UX9p3BSDima/Fd0Gr0w==
%define with_threads 1
%define with_plugin 0
%define with_iconv 1
-%include %{_configdir}/gcc-9.cfg
+%include %{_configdir}/gcc-10.cfg
diff --git a/rtems/config/tools/rtems-gcc-10.4-newlib-e7ffbdb.cfg b/rtems/config/tools/rtems-gcc-10.4-newlib-e7ffbdb.cfg
new file mode 100644
index 0000000..4d6c592
--- /dev/null
+++ b/rtems/config/tools/rtems-gcc-10.4-newlib-e7ffbdb.cfg
@@ -0,0 +1,27 @@
+%include %{_configdir}/checks.cfg
+%include %{_configdir}/base.cfg
+
+%define gcc_version 10.4.0
+%source set gcc https://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.xz
+%hash sha512 gcc-%{gcc_version}.tar.xz 440c08ca746da450d9a1b35e8fd2305cb27e7e6987cd9d0f7d375f3b1fc9e4b0bd7acb3cd7bf795e72fcbead59cdef5b6c152862f5d35cd9fbfe6902101ce648
+
+%patch add gcc -p1 https://devel.rtems.org/raw-attachment/ticket/4196/0001-Back-port-v8-of-gcov-improvements-to-GCC-10.patch
+%hash sha512 0001-Back-port-v8-of-gcov-improvements-to-GCC-10.patch c2d1faed68aa0f60bef917365545cc4cc899df428a5d08f178417c06def4fd3cd3a749c1871c8a22552022c29dfae4a3d21161e2b01291e458ea8d670f01887e
+
+%patch add gcc -p1 https://devel.rtems.org/raw-attachment/ticket/4215/0001-nios2-Remove-custom-instruction-warnings.patch
+%hash sha512 0001-nios2-Remove-custom-instruction-warnings.patch afd8a5e6bdcc5b75d5fbbf558bdf56ccac400521a6eec9d88cc95f6be67c481f2dbf8faa0f6ddc1e4ac7c56a84938714d80e46e9cf80ec4b8fcd739986449881
+
+%patch add newlib -p1 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
+
+%define newlib_version e7ffbdb
+%define newlib_external 1
+%define newlib_expand_name sourceware-mirror-newlib-cygwin-%{newlib_version}
+%source set newlib --rsb-file=newlib-%{newlib_version}.tar.gz https://codeload.github.com/RTEMS/sourceware-mirror-newlib-cygwin/tar.gz/%{newlib_version}
+%hash sha512 newlib-%{newlib_version}.tar.gz 11ad5b95aa3d9eb8475104de944e47810b5447d52d3a531187b62d12aa8b28c96cc6f1c5c4f9ddc85231a602de533cc531b430aecb3059098a06db81332a0b53
+
+%define with_threads 1
+%define with_plugin 0
+%define with_iconv 1
+
+%include %{_configdir}/gcc-10.cfg
diff --git a/rtems/config/tools/rtems-gcc-10.4-newlib-head.cfg b/rtems/config/tools/rtems-gcc-10.4-newlib-head.cfg
new file mode 100644
index 0000000..315f70b
--- /dev/null
+++ b/rtems/config/tools/rtems-gcc-10.4-newlib-head.cfg
@@ -0,0 +1,31 @@
+%include %{_configdir}/checks.cfg
+%include %{_configdir}/base.cfg
+
+%define gcc_version 10.4.0
+%source set gcc https://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.xz
+%hash sha512 gcc-%{gcc_version}.tar.xz 440c08ca746da450d9a1b35e8fd2305cb27e7e6987cd9d0f7d375f3b1fc9e4b0bd7acb3cd7bf795e72fcbead59cdef5b6c152862f5d35cd9fbfe6902101ce648
+
+%patch add gcc -p1 https://devel.rtems.org/raw-attachment/ticket/4196/0001-Back-port-v8-of-gcov-improvements-to-GCC-10.patch
+%hash sha512 0001-Back-port-v8-of-gcov-improvements-to-GCC-10.patch c2d1faed68aa0f60bef917365545cc4cc899df428a5d08f178417c06def4fd3cd3a749c1871c8a22552022c29dfae4a3d21161e2b01291e458ea8d670f01887e
+
+%patch add gcc -p1 https://devel.rtems.org/raw-attachment/ticket/4560/gcc-10-RTEMS-Use-local-exec-TLS-model-by-default.patch
+%hash sha512 gcc-10-RTEMS-Use-local-exec-TLS-model-by-default.patch 6f74431d0862de65d93c01a09db05593b9f45607ffaa5bca2477a4d538cdde25de72875821db89001612e8b68c65af32ea6c6f6feb77658b98d311f3383c39a1
+
+%patch add gcc -p1 https://devel.rtems.org/raw-attachment/ticket/4668/gcc-10-RTEMS-Enable-some-features-in-libstdc.patch
+%hash sha512 gcc-10-RTEMS-Enable-some-features-in-libstdc.patch a8186e3a0eb2b850b048242a6990db35feb4549dac089ebf90b06aef9f72839da74b97b41f4aefb2a76e9ca0c3c2baeb22b89ada0b6600f00162b31e50ccad57
+
+%patch add gcc -p1 https://devel.rtems.org/raw-attachment/ticket/4215/0001-nios2-Remove-custom-instruction-warnings.patch
+%hash sha512 0001-nios2-Remove-custom-instruction-warnings.patch afd8a5e6bdcc5b75d5fbbf558bdf56ccac400521a6eec9d88cc95f6be67c481f2dbf8faa0f6ddc1e4ac7c56a84938714d80e46e9cf80ec4b8fcd739986449881
+
+%define newlib_version 176b19f
+%define newlib_external 1
+%define newlib_expand_name sourceware-mirror-newlib-cygwin-%{newlib_version}
+%source set newlib --rsb-file=newlib-%{newlib_version}.tar.gz https://codeload.github.com/RTEMS/sourceware-mirror-newlib-cygwin/tar.gz/%{newlib_version}
+%hash sha512 newlib-%{newlib_version}.tar.gz \
+ ZUzGjXI3ZJ6GrxMXggg+jIO0nyi+edKoilckRxtujsOiwhOyITahIqcOHhZiX5nd4E4UX9p3BSDima/Fd0Gr0w==
+
+%define with_threads 1
+%define with_plugin 0
+%define with_iconv 1
+
+%include %{_configdir}/gcc-10.cfg
diff --git a/rtems/config/tools/rtems-gcc-12-newlib-head.cfg b/rtems/config/tools/rtems-gcc-12-newlib-head.cfg
new file mode 100644
index 0000000..4387486
--- /dev/null
+++ b/rtems/config/tools/rtems-gcc-12-newlib-head.cfg
@@ -0,0 +1,49 @@
+%include %{_configdir}/checks.cfg
+%include %{_configdir}/base.cfg
+
+%define gcc_version a285310
+%define gcc_external 1
+%define gcc_expand_name gnu-mirror-gcc-%{gcc_version}
+%source set gcc --rsb-file=%{gcc_expand_name}.tar.gz https://codeload.github.com/RTEMS/gnu-mirror-gcc/tar.gz/%{gcc_version}
+%hash sha512 %{gcc_expand_name}.tar.gz \
+ sYxUkDJD7qaCzXndAljnAQMbmssg7AY97cBAMjwqDSC6vxseGSzvO8LGMW46ASM6Zq2frKj8XVj27GnPmwSIXQ==
+
+%patch add gcc -p1 https://devel.rtems.org/raw-attachment/ticket/4196/0001-Back-port-v1-of-gcov-tool-merge-stream-to-GCC-12.patch
+%hash sha512 0001-Back-port-v1-of-gcov-tool-merge-stream-to-GCC-12.patch \
+ QT8UN0hW+L/Su5Slbxhg//j+mpNvM8lv32paDFow4s99BQJtAzjoswAVqT2AFppgI5cHa5R8gpKsW1zcIjfsTg==
+
+%patch add gcc -p1 https://devel.rtems.org/raw-attachment/ticket/4560/gcc-12-RTEMS-Use-local-exec-TLS-model-by-default.patch
+%hash sha512 gcc-12-RTEMS-Use-local-exec-TLS-model-by-default.patch \
+ u6rhKhbCXwpX2Dib/YYMRRwYqRc+9Mf3MFUBAgwYQ6AFy/4VbVFpTLyzReMIkEC1Dumq66qABQPalh9YHTDwxA==
+
+%patch add gcc -p1 https://devel.rtems.org/raw-attachment/ticket/4668/gcc-12-RTEMS-Enable-some-features-in-libstdc.patch
+%hash sha512 gcc-12-RTEMS-Enable-some-features-in-libstdc.patch \
+ dZehMV4QtmSlXope4a4w6wivL39Y2NYFZz8qdJwHHZFkp5c7yUcxzQ+BLIKRmae0fRjMQB/bj7oVPVvZU2qYgA==
+
+# Following patches are related to compilation on Apple M1/Darwin host platform.
+# They are here to workaround issues with ISL and MPC libraries.
+# Upstream projects were already informed so hopefully when RSB moves
+# to more modern libraries versions they may be removed from here.
+# The patches are solely for libisl 0.24 and libmpc 1.2.1
+# See #4657 for more information.
+%patch add isl -p1 https://devel.rtems.org/raw-attachment/ticket/4657/fix-mac-arm64-isl-config.patch
+%hash sha512 fix-mac-arm64-isl-config.patch \
+ wH/bYFplINGUNYUEcx5jtUAhHvaAOD8cpOxltKxDridodTT9fYGWpNvoOg7PLEKkJUxx5gnuSEp2FFc7xJmi6A==
+%patch add mpc -p1 https://devel.rtems.org/raw-attachment/ticket/4657/fix-mac-arm64-mpc-config.patch
+%hash sha512 fix-mac-arm64-mpc-config.patch \
+ KEmxHjYOqY4LTXCMZ3I60tbHusbR5GlnP0CLARHPAnhCnovDj9K3U43C1bsMxDDGRqD6fwtrEFoEgqVFX63IuQ==
+# Comment above related to #4657 and patches ends here
+
+%define newlib_version 176b19f
+%define newlib_external 1
+%define newlib_expand_name sourceware-mirror-newlib-cygwin-%{newlib_version}
+%source set newlib --rsb-file=newlib-%{newlib_version}.tar.gz \
+ https://codeload.github.com/RTEMS/sourceware-mirror-newlib-cygwin/tar.gz/%{newlib_version}
+%hash sha512 newlib-%{newlib_version}.tar.gz \
+ ZUzGjXI3ZJ6GrxMXggg+jIO0nyi+edKoilckRxtujsOiwhOyITahIqcOHhZiX5nd4E4UX9p3BSDima/Fd0Gr0w==
+
+%define with_threads 1
+%define with_plugin 0
+%define with_iconv 1
+
+%include %{_configdir}/gcc-12.cfg
diff --git a/rtems/config/tools/rtems-gcc-13-newlib-head.cfg b/rtems/config/tools/rtems-gcc-13-newlib-head.cfg
new file mode 100644
index 0000000..4dbbd9b
--- /dev/null
+++ b/rtems/config/tools/rtems-gcc-13-newlib-head.cfg
@@ -0,0 +1,22 @@
+%include %{_configdir}/checks.cfg
+%include %{_configdir}/base.cfg
+
+%define gcc_version 54a235e
+%define gcc_external 1
+%define gcc_expand_name gnu-mirror-gcc-%{gcc_version}
+%source set gcc --rsb-file=%{gcc_expand_name}.tar.gz https://codeload.github.com/RTEMS/gnu-mirror-gcc/tar.gz/%{gcc_version}
+%hash sha512 %{gcc_expand_name}.tar.gz \
+ UAXjyfPP883wjLDnobDk4wmg/vAO0I4LjzzurLCKejj0FUSk0KvlkVj1CF+3XwFcdlCWRhN7z/Ls4fOunafe9w==
+
+%define newlib_version 176b19f
+%define newlib_external 1
+%define newlib_expand_name sourceware-mirror-newlib-cygwin-%{newlib_version}
+%source set newlib --rsb-file=newlib-%{newlib_version}.tar.gz https://codeload.github.com/RTEMS/sourceware-mirror-newlib-cygwin/tar.gz/%{newlib_version}
+%hash sha512 newlib-%{newlib_version}.tar.gz \
+ ZUzGjXI3ZJ6GrxMXggg+jIO0nyi+edKoilckRxtujsOiwhOyITahIqcOHhZiX5nd4E4UX9p3BSDima/Fd0Gr0w==
+
+%define with_threads 1
+%define with_plugin 0
+%define with_iconv 1
+
+%include %{_configdir}/gcc-13.cfg
diff --git a/rtems/config/tools/rtems-gcc-13.2-newlib-head.cfg b/rtems/config/tools/rtems-gcc-13.2-newlib-head.cfg
new file mode 100644
index 0000000..2fc00c3
--- /dev/null
+++ b/rtems/config/tools/rtems-gcc-13.2-newlib-head.cfg
@@ -0,0 +1,20 @@
+%include %{_configdir}/checks.cfg
+%include %{_configdir}/base.cfg
+
+%define gcc_version 13.2.0
+%source set gcc https://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.xz
+%hash sha512 gcc-%{gcc_version}.tar.xz \
+ 2Z5IJqcNsEUERn40np+67apYcHZs2nxcq1DN6+3EvnVevKW3ieEjKjSiC+GgtgCX3pKA7+R723HHMlHjCwhiog==
+
+%define newlib_version 176b19f
+%define newlib_external 1
+%define newlib_expand_name sourceware-mirror-newlib-cygwin-%{newlib_version}
+%source set newlib --rsb-file=newlib-%{newlib_version}.tar.gz https://codeload.github.com/RTEMS/sourceware-mirror-newlib-cygwin/tar.gz/%{newlib_version}
+%hash sha512 newlib-%{newlib_version}.tar.gz \
+ ZUzGjXI3ZJ6GrxMXggg+jIO0nyi+edKoilckRxtujsOiwhOyITahIqcOHhZiX5nd4E4UX9p3BSDima/Fd0Gr0w==
+
+%define with_threads 1
+%define with_plugin 0
+%define with_iconv 1
+
+%include %{_configdir}/gcc-13.cfg
diff --git a/rtems/config/tools/rtems-gcc-head-newlib-head.cfg b/rtems/config/tools/rtems-gcc-head-newlib-head.cfg
index 0655434..1b9c2f4 100644
--- a/rtems/config/tools/rtems-gcc-head-newlib-head.cfg
+++ b/rtems/config/tools/rtems-gcc-head-newlib-head.cfg
@@ -1,20 +1,22 @@
%include %{_configdir}/checks.cfg
%include %{_configdir}/base.cfg
-%define gcc_version 1973bea
+%define gcc_version 41aacde
%define gcc_external 1
%define gcc_expand_name gnu-mirror-gcc-%{gcc_version}
%source set gcc --rsb-file=%{gcc_expand_name}.tar.gz https://codeload.github.com/RTEMS/gnu-mirror-gcc/tar.gz/%{gcc_version}
-%hash sha512 %{gcc_expand_name}.tar.gz b45b120f00327aee3b7daf798caaba07413f310ff4e2de01d2da8080a50f40e4e9b826d8c67a76ae2f2b175479911b1a421eb9d3d4361198b4246803ce817279
+%hash sha512 %{gcc_expand_name}.tar.gz \
+ xPwSCLLXsJfFKontgrGlU9ep/PVlP3bQOGbgRCG0mj8sD5dq2ifo5VOwGwVMRQD0VFVVOWqeykq3OVkZYlu1GA==
-%define newlib_version d10d0d9
+%define newlib_version 176b19f
%define newlib_external 1
%define newlib_expand_name sourceware-mirror-newlib-cygwin-%{newlib_version}
%source set newlib --rsb-file=newlib-%{newlib_version}.tar.gz https://codeload.github.com/RTEMS/sourceware-mirror-newlib-cygwin/tar.gz/%{newlib_version}
-%hash sha512 newlib-%{newlib_version}.tar.gz 995938274ad01dcb8f351fd718b3e95fa0b474b397a3f9d40dfb5a7463176a2add88af444ebb3b64c5c327f532e727e32efc40727c97d56ddfedac24e5008f20
+%hash sha512 newlib-%{newlib_version}.tar.gz \
+ ZUzGjXI3ZJ6GrxMXggg+jIO0nyi+edKoilckRxtujsOiwhOyITahIqcOHhZiX5nd4E4UX9p3BSDima/Fd0Gr0w==
%define with_threads 1
%define with_plugin 0
%define with_iconv 1
-%include %{_configdir}/gcc-9.cfg
+%include %{_configdir}/gcc-12.cfg
diff --git a/rtems/config/tools/rtems-gdb-11.2.cfg b/rtems/config/tools/rtems-gdb-11.2.cfg
new file mode 100644
index 0000000..59dd402
--- /dev/null
+++ b/rtems/config/tools/rtems-gdb-11.2.cfg
@@ -0,0 +1,15 @@
+#
+# GDB 11.2
+#
+
+%include %{_configdir}/checks.cfg
+%include %{_configdir}/base.cfg
+
+%define gdb_version 11.2
+%define gdb_src_ext xz
+%hash sha512 gdb-%{gdb_version}.tar.xz 07e9026423438049b11f4f784d57401ece4e940570f613bd6958b3714fe7fbc2c048470bcce3e7d7d9f93331cdf3881d30dcc964cb113a071143a02b28e5b127
+
+%patch add gdb --rsb-file=gdb-readline8.2.patch https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=1add37b567a7dee39d99f37b37802034c3fce9c4
+%hash sha512 gdb-readline8.2.patch E/nGalfBBfn0rl/pi1SGIuKD11x0qREZBp3ajaFbl/nGMZUIm31M/1z0FsG76K7IjvE5pPsl2JqESt+LBN9lZA==
+
+%include %{_configdir}/gdb-common-1.cfg
diff --git a/rtems/config/tools/rtems-gdb-12.1.cfg b/rtems/config/tools/rtems-gdb-12.1.cfg
new file mode 100644
index 0000000..fd5f91d
--- /dev/null
+++ b/rtems/config/tools/rtems-gdb-12.1.cfg
@@ -0,0 +1,15 @@
+#
+# GDB 12.1
+#
+
+%include %{_configdir}/checks.cfg
+%include %{_configdir}/base.cfg
+
+%define gdb_version 12.1
+%define gdb_src_ext xz
+%hash sha512 gdb-%{gdb_version}.tar.xz QlVo0uhGchd9D7h7Gtfar93gl2SNYF4wzwZWlw9mrcaoLKLYM3XqS+WD6Wg6NA5b/fWBlmjd9mcoIAFBrlD/LQ==
+
+%patch add gdb --rsb-file=gdb-readline8.2.patch https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=1add37b567a7dee39d99f37b37802034c3fce9c4
+%hash sha512 gdb-readline8.2.patch E/nGalfBBfn0rl/pi1SGIuKD11x0qREZBp3ajaFbl/nGMZUIm31M/1z0FsG76K7IjvE5pPsl2JqESt+LBN9lZA==
+
+%include %{_configdir}/gdb-common-1.cfg
diff --git a/rtems/config/tools/rtems-gdb-13.1.cfg b/rtems/config/tools/rtems-gdb-13.1.cfg
new file mode 100644
index 0000000..1fd0f1c
--- /dev/null
+++ b/rtems/config/tools/rtems-gdb-13.1.cfg
@@ -0,0 +1,21 @@
+#
+# GDB 13.1
+#
+
+%include %{_configdir}/checks.cfg
+%include %{_configdir}/base.cfg
+
+%define gdb_version 13.1
+%define gdb_src_ext xz
+%hash sha512 gdb-%{gdb_version}.tar.xz \
+ 5lBU/7wDV+7tSxfh7cXvRapzyd3zsSEGUePYWVduJ8HSeyZoAP4mMo7aWIV0VczYYy9AAM/F9j+QhUCWKQGHyg==
+
+%patch add gdb -p0 --rsb-file=gdb-13-freebsd-include.diff https://sourceware.org/bugzilla/attachment.cgi?id=14742
+%hash sha512 gdb-13-freebsd-include.diff \
+ 2oKUpRyZIwXwyKHXn5lxXte+jV853Zvg5UHLKLfmVCW4QLrLMFsnO5LvPamIqjXnqPztB8IPEY18pdw8vOYaOw==
+
+%patch add gdb -p1 --rsb-file=gdb-14067-python-config.diff https://sourceware.org/bugzilla/attachment.cgi?id=14783&format=raw
+%hash sha512 gdb-14067-python-config.diff \
+ HiCV0eQulk0W+G5uu1gCvUn5Ns6bF6RxqOO9kcSi8zpfEHOMzphlOv5cz0IDN5Q8m94na1kRVy++4z6qc43t3w==
+
+%include %{_configdir}/gdb-common-1.cfg
diff --git a/rtems/config/tools/rtems-gdb-13.2.cfg b/rtems/config/tools/rtems-gdb-13.2.cfg
new file mode 100644
index 0000000..655ffe2
--- /dev/null
+++ b/rtems/config/tools/rtems-gdb-13.2.cfg
@@ -0,0 +1,17 @@
+#
+# GDB 13.2
+#
+
+%include %{_configdir}/checks.cfg
+%include %{_configdir}/base.cfg
+
+%define gdb_version 13.2
+%define gdb_src_ext xz
+%hash sha512 gdb-%{gdb_version}.tar.xz \
+ gYXT4Rq2Da//WGClAWV3v+fddUfvAevIZ7wkdgPYK3T/dMTylJLH0q7lcHb1K+M+KJ9Ma0FKS4cNSzAEkJ9MNA==
+
+%patch add gdb -p1 --rsb-file=gdb-14067-python-config.diff https://sourceware.org/bugzilla/attachment.cgi?id=14783&format=raw
+%hash sha512 gdb-14067-python-config.diff \
+ HiCV0eQulk0W+G5uu1gCvUn5Ns6bF6RxqOO9kcSi8zpfEHOMzphlOv5cz0IDN5Q8m94na1kRVy++4z6qc43t3w==
+
+%include %{_configdir}/gdb-common-1.cfg
diff --git a/rtems/config/tools/rtems-gdb-head.cfg b/rtems/config/tools/rtems-gdb-head.cfg
index 7c94c90..17ecee8 100644
--- a/rtems/config/tools/rtems-gdb-head.cfg
+++ b/rtems/config/tools/rtems-gdb-head.cfg
@@ -1,10 +1,11 @@
%include %{_configdir}/checks.cfg
%include %{_configdir}/base.cfg
-%define gdb_version 4ef6d2f
+%define gdb_version eb42bb1
%define gdb_external 1
%define gdb_expand_name sourceware-mirror-binutils-gdb-%{gdb_version}
%source set gdb --rsb-file=%{gdb_expand_name}.tar.gz https://codeload.github.com/RTEMS/sourceware-mirror-binutils-gdb/tar.gz/%{gdb_version}
-%hash sha512 %{gdb_expand_name}.tar.gz 5e3c8d7d6d6a0907a45cabec65b48953906ea2fc6b8c7a909cc56c7383c95f083ac56db600d27442301b255b58a6febbe4bf51b0a82991d6685eab7b4391d272
+%hash sha512 %{gdb_expand_name}.tar.gz \
+ qDuLOqwQ/kQX30hIu5UVDqMuKjnpoKTEZ4xo85lrzq6VtnCd6nwdO5t9szbhJc4P1UWww9rRNMcqj7d2BKeNqg==
%include %{_configdir}/gdb-8-1.cfg
diff --git a/rtems/config/tools/rtems-grub-2.06.cfg b/rtems/config/tools/rtems-grub-2.06.cfg
new file mode 100644
index 0000000..977e230
--- /dev/null
+++ b/rtems/config/tools/rtems-grub-2.06.cfg
@@ -0,0 +1,8 @@
+%include %{_configdir}/checks.cfg
+%include %{_configdir}/base.cfg
+
+%define grub2_version 2.06
+
+%hash sha512 grub-%{grub2_version}.tar.xz 4f11c648f3078567e53fc0c74d5026fdc6da4be27d188975e79d9a4df817ade0fe5ad2ddd694238a07edc45adfa02943d83c57767dd51548102b375e529e8efe
+
+%include %{_configdir}/grub2.cfg
diff --git a/rtems/config/tools/rtems-kernel-6.cfg b/rtems/config/tools/rtems-kernel-6.cfg
index f1d0990..9219263 100644
--- a/rtems/config/tools/rtems-kernel-6.cfg
+++ b/rtems/config/tools/rtems-kernel-6.cfg
@@ -1,11 +1,11 @@
#
-# RTEMS 5
+# RTEMS 6
#
-%define rtems_kernel_version 3ec5f20484cc4201e1d7b87844505644533b6148
-%hash sha512 rtems-kernel-%{rtems_kernel_version}.tar.bz2 \
- BjMKrf5n1YR6IpiZrY5TUEzKATPRJxA2/6m6f833DdRu+RyLxccXqA4gHRdVUqFelFNQ3o0XdG4o1naBKYfhkQ==
+%define rtems_kernel_version 1ef5fa07aa87adc9925c75060a7888f110104fa7
+%hash sha512 rtems-kernel-%{rtems_kernel_version}.tar.bz2 \
+ 5WE5sLbkU9p3atZ9PV6Dcy1TGKXZKErJ+kEfe9j6IyXohS3vc76hFIrVt8I8beDDKEogNB8HAuVsZklPv3YViA==
#
# The RTEMS build instructions.
#
diff --git a/rtems/config/tools/rtems-kernel-common.cfg b/rtems/config/tools/rtems-kernel-common.cfg
index 157c7a4..aa424d2 100644
--- a/rtems/config/tools/rtems-kernel-common.cfg
+++ b/rtems/config/tools/rtems-kernel-common.cfg
@@ -9,7 +9,7 @@
# and BSPs. Only after the source to download.
#
%if %{_dry_run} && %{defined with_download}
- %log Kenrel configuration errors ignored
+ %log Kernel configuration errors ignored
%define rtems_kernel_error 0
%else
%define rtems_kernel_error 1
@@ -19,23 +19,111 @@
%define rtems_kernel_version %{rsb_version}
%endif
-#
-# The target. It could be set in rtems_target.
-#
-%if %{defined rtems_target}
- %define _target %{rtems_target}
-%endif
-%if %{_target} == %{nil} && %{rtems_kernel_error}
- %error No RTEMS target specified: --target=<arch>-rtems<ver>.
+%if %{defined with_rtems_bsp_config}
+ #
+ # A config file can build any BSP from any architecture. No options are
+ # accepted.
+ #
+ %if %{defined with_rtems_target} || %{defined with_rtems_bsp} || \
+ %{defined with_rtems_bspopts} || %{defined enable_cxx} || \
+ %{defined with_rtems_tests} || %{defined with_rtems_smp}
+ %error Options --with-rtems-* are not valid with --with-rtems-bsp-config
+ %endif
+ %if %{defined rtems_posix} || %{defined rtems_tests} || %{defined rtems_bspopts}
+ %error Options rtems_* macros are not valid with --with-rtems-bsp-config
+ %endif
+ %define config_file %(realpath %{with_rtems_bsp_config})
+ %if %(test -f %{config_file}; echo $?) == 1
+ %error Configuration INI file not found: %{config_file}
+ %endif
+ %define rtems_bsp %(%{_sbdir}/sb/rtems-kernel-config-check -c %{with_rtems_bsp_config})
+ %define rtems_bsp_count %(echo %{rtems_bsp} | tr ' ' '\n' | wc -l)
+ %define rtems_tests %(%{_sbdir}/sb/rtems-kernel-config-check -t %{with_rtems_bsp_config})
+ # If a list the path gets too long
+ %define rtems_bsp_pkgname %(basename %{with_rtems_bsp_config} | sed -e 's/\..*//g')
+%else
+ #
+ # Backwards compatible command line or deployed build set
+ # options.
+ #
+ %define config_file config.ini
+ %if !%{defined with_rtems_bsp} && %{rtems_kernel_error}
+ %error No RTEMS BSP specified: --with-rtems-bsp=bsp
+ %endif
+ %if %{defined with_rtems_bspopts}
+ %define bspopts %{with_rtems_bspopts}
+ %endif
+ %define rtems_bsp_pkgname bsps
+ #
+ # Check the various --with/--without options we support. These are
+ # turned into the internal settings.
+ #
+ # --with-rtems-bsp : The BSP or list of BSPs
+ # --without-rtems-bsp : Not supported
+ # --with-rtems-tests : Supported, samples/yes/no
+ # --without-rtems-tests : Supported, forced to no
+ # --with-rtems-smp : Supported
+ # --without-rtems-smp : Don't care
+ # --with-rtems-legacy-network : Unsupported
+ # --without-rtems-legacy-network : Don't care
+ %if !%{defined with_rtems_bsp}
+ %error Option --without-rtems-bsp is not found.
+ %endif
+ %if %{defined without_rtems_bsp}
+ %error Option --without-rtems-bsp is not supported.
+ %endif
+ %define rtems_bsp %{with_rtems_bsp}
+ %define rtems_bsp_count %(echo %{rtems_bsp} | tr ' ' '\n' | wc -l)
+ %if %{defined with_rtems_legacy_network}
+ echo "RTEMS legacy network has been removed."
+ echo "Please review and update your configuration."
+ exit 1
+ %endif
+ %if %{defined enable_cxx}
+ echo "CXX has been removed."
+ echo "Please review and update your configuration."
+ exit 1
+ %endif
+ %if %{defined without_rtems_tests}
+ %define rtems_tests False
+ %define rtems_sample_tests False
+ %endif
+ %if %{defined with_rtems_tests}
+ %if %{with_rtems_tests} == 1
+ %define rtems_tests True
+ %define rtems_sample_tests True
+ %endif
+ %if %{with_rtems_tests} == samples
+ %define rtems_tests False
+ %define rtems_sample_tests True
+ %endif
+ %endif
+ %if %{defined with_rtems_smp}
+ %define rtems_smp 1
+ %endif
+ %if %{defined with_rtems_bspopts}
+ %if %{rtems_bsp_count} > 1
+ %error BSP options not supported with more than one BSP builds
+ %endif
+ %define rtems_bspopts %{with_rtems_bspopts}
+ %endif
+ #
+ # Default set up. Override these in a BSP if you want a
+ # specific setup.
+ #
+ %ifn %{defined rtems_posix}
+ %define rtems_posix 1
+ %endif
+ %ifn %{defined rtems_tests}
+ %define rtems_tests False
+ %define rtems_sample_tests True
+ %endif
+ %ifn %{defined rtems_bspopts}
+ %define rtems_bspopts %{nil}
+ %endif
%endif
-#
-# The BSP.
-#
-%if !%{defined with_rtems_bsp} && %{rtems_kernel_error}
- %error No RTEMS BSP specified: --with-rtems-bsp=bsp
-%endif
-%define rtems_bsp %{with_rtems_bsp}
+%define _target not-used
#
# If no tools are provided use the prefix.
@@ -52,13 +140,13 @@
#
# Define the package.
#
-package: rtems-%{rtems_version}-%{_target}-%{rtems_bsp}-%{_host}-%{release}
+package: rtems-%{rtems_version}-%{rtems_bsp_pkgname}-%{_host}-%{release}
#
# Package details.
#
-Name: %{_target}-kernel-%{rtems_bsp}-%{release}
-Summary: RTEMS v%{rtems_kernel_version} for target %{_target} BSP %{rtems_bsp}
+Name: rtems-kernel-%{rtems_bsp_pkgname}-%{release}
+Summary: RTEMS v%{rtems_kernel_version} for BSP(s) %{rtems_bsp}
Version: %{rtems_kernel_version}
Release: %{release}
URL: https://www.rtems.org/
@@ -68,23 +156,6 @@ URL: https://www.rtems.org/
%include %{_configdir}/versions.cfg
#
-# A magic internal path that would break if changes in the defaults.mc
-# macro file are made.
-#
-%define _internal_autotools_path %{_tmppath}/sb-%{_uid}/${SB_PREFIX_CLEAN}
-
-#
-# Check the version of autoconf. Check autoreconf as it is used.
-#
-%if %{__autoreconf_ver} <= 2.68
- %if %{__autoreconf_bindir_ver} <= 2.68
- %if %{__autoreconf_path_ver} <= 2.68
- %error Autoconf (autoreconf) version 2.69 or higher is needed.
- %endif
- %endif
-%endif
-
-#
# If no tools provided use the prefix.
#
%ifn %{defined with_tools}
@@ -98,31 +169,13 @@ URL: https://www.rtems.org/
%define rtems_posix 0
%endif
-%if %{defined with_rtems_legacy_network}
- %define rtems_networking 1
-%endif
-
-%if %{defined with_rtems_cxx}
- %define rtems_cxx 1
-%endif
-
-%if %{defined with_rtems_bspopts}
- %define bspopts %{with_rtems_bspopts}
-%endif
-
#
# Source
#
%if %{rsb_released}
%define rtems_kernel_file rtems-%{rtems_kernel_version}.tar.xz
- %define rtems_bootstrap 0
%else
%define rtems_kernel_file rtems-kernel-%{rtems_kernel_version}.tar.bz2
- #
- # The code in git needs to be bootstrapped. Do each build because we have
- # no way to change what changes may have happened in the code.
- #
- %define rtems_bootstrap 1
%endif
%if ! %{defined rtems_kernel_version}
@@ -133,75 +186,6 @@ URL: https://www.rtems.org/
https://git.rtems.org/rtems/snapshot/rtems-%{rtems_kernel_version}.tar.bz2
#
-# Check the various --with/--without options we support. These are
-# turned into the internal settings.
-#
-# --target : The architecture
-# --with-rtems-bsp : The BSP
-# --without-rtems-bsp : Not supported
-# --with-rtems-tests : Supported, samples/yes/no
-# --without-rtems-tests : Supported, forced to no
-# --with-rtems-smp : Supported
-# --without-rtems-smp : Don't care
-# --with-rtems-legacy-network : Supported
-# --without-rtems-legacy-network : Don't care
-# --with-rtems-bspopts : Supported, quote for a list
-# --without-rtems-bspopts : Don't care
-#
-%if %{defined without_rtemsbsp}
- %error Option --without-rtemsbsp is not supported.
-%endif
-%if %{defined without_rtems_tests}
- %define with_rtems_tests no
-%endif
-%if %{defined with_rtems_tests}
- %if %{with_rtems_tests} == 1
- %define with_rtems_tests yes
- %endif
- %if %{with_rtems_tests} == yes || \
- %{with_rtems_tests} == no || \
- %{with_rtems_tests} == samples
- %define rtems_tests %{with_rtems_tests}
- %endif
-%endif
-%if %{defined with_rtems_smp}
- %define rtems_smp 1
-%endif
-%if %{defined with_rtems_legacy_network}
- %define rtems_networking 1
-%endif
-%if %{defined with_rtems_bspopts}
- %define rtems_bspopts %{with_rtems_bspopts}
-%endif
-
-#
-# If C++ defined for the tool set use it to control RTEMS's setting..
-#
-%if %{defined enable_cxx}
- %define rtems_cxx %{enable_cxx}
-%endif
-
-#
-# Default set up. Override these in a BSP if you want a
-# specific setup.
-#
-%ifn %{defined rtems_posix}
- %define rtems_posix 1
-%endif
-%ifn %{defined rtems_networking}
- %define rtems_networking 0
-%endif
-%ifn %{defined rtems_cxx}
- %define rtems_cxx 1
-%endif
-%ifn %{defined rtems_tests}
- %define rtems_tests samples
-%endif
-%ifn %{defined rtems_bspopts}
- %define rtems_bspopts %{nil}
-%endif
-
-#
# Prepare the source code.
#
%prep
@@ -209,13 +193,6 @@ URL: https://www.rtems.org/
%source setup rtems_kernel -q -c -n %{name}-%{version}
cd ${source_dir_rtems}
%patch setup rtems_kernel -p1
- %if %{rtems_bootstrap}
- %if %{defined _internal_autotools_path}
- export PATH="%{_internal_autotools_path}/bin:${PATH}"
- %endif
- ./bootstrap -c
- ./rtems-bootstrap
- %endif
cd ..
%build
@@ -225,38 +202,58 @@ URL: https://www.rtems.org/
else
build_dir="build"
fi
+
+ cd ${source_dir_rtems}
+
+ #
+ # If no user supplied configuration file create one
+ #
+ %if !%{defined with_rtems_bsp_config}
+ echo "[DEFAULT]" > %{config_file}
+ echo "RTEMS_POSIX_API = %{?rtems_posix:True}%{!?rtems_posix:False}" >> %{config_file}
+ echo "RTEMS_SMP = %{?rtems_smp:True}%{!?rtems_smp:False}" >> %{config_file}
+ echo "BUILD_TESTS = %{rtems_tests}" >> %{config_file}
+ echo "BUILD_SAMPLES = %{rtems_sample_tests}" >> %{config_file}
+ echo "" >> %{config_file}
+ for bsp in %{rtems_bsp}
+ do
+ echo "[$bsp]" >> %{config_file}
+ %if %{rtems_bsp_count} == 1 && %{defined rtems_bspopts}
+ for opt in $(echo %{rtems_bspopts} | tr ' ' '\n')
+ do
+ echo "$opt" >> %{config_file}
+ done
+ %endif
+ echo "" >> %{config_file}
+ done
+ %endif
+
mkdir -p ${build_dir}
- cd ${build_dir}
- ../${source_dir_rtems}/configure \
- --build=%{_build} --host=%{_host} \
- --target=%{_target} \
- --enable-rtemsbsp="%{rtems_bsp}" \
- %{?rtems_cxx:--enable-cxx}%{!?rtems_cxx:--disable-cxx} \
- %{?rtems_posix:--enable-posix}%{!?rtems_posix:--disable-posix} \
- %{?rtems_networking:--enable-networking}%{!?rtems_networking:--disable-networking} \
- %{?rtems_tests:--enable-tests=%{rtems_tests}} \
- %{?rtems_smp:--enable-smp} \
- --prefix=%{_prefix} --bindir=%{_bindir} \
- --exec-prefix=%{_exec_prefix} \
- --includedir=%{_includedir} --libdir=%{_libdir} \
- --mandir=%{_mandir} --infodir=%{_infodir} \
- %{rtems_bspopts}
+ ./waf configure \
+ --prefix=%{_prefix} \
+ --rtems-config=%{config_file}
+
+ ./waf %{?_smp_mflags}
- %{__make} %{?_smp_mflags} all
cd ..
%install
%{__rmdir} $SB_BUILD_ROOT
- cd ${build_dir}
- %{__make} DESTDIR=$SB_BUILD_ROOT install
+ cd ${source_dir_rtems}
+ ./waf --destdir=$SB_BUILD_ROOT install
- %if %{rtems_tests} != no
- %define rtems_test_install %{_target}/%{rtems_bsp}/tests
- mkdir -p $SB_BUILD_ROOT/%{_prefix}/%{rtems_test_install}
- find . -name \*.exe -and -not -name \*.norun.exe \
- -exec cp -v \{\} $SB_BUILD_ROOT/%{_prefix}/%{rtems_test_install}/ \;
+ echo "rtems_tests: %{rtems_tests}"
+
+ %if %{rtems_tests} != False
+ for bsp in %{rtems_bsp}
+ do
+ export bsp
+ mkdir -p $SB_BUILD_ROOT/%{_prefix}/${bsp}-rtems%{rtems_kernel_version}/tests
+ find build/$bsp -name \*.exe -and -not -name \*.norun.exe \
+ -exec sh -c 'cp -v {} $SB_BUILD_ROOT/%{_prefix}/${bsp}-rtems%{rtems_kernel_version}/tests/$(basename {})' \;
+ done
%endif
- cd ..
+ cd -
diff --git a/rtems/config/tools/rtems-libbsd-6.cfg b/rtems/config/tools/rtems-libbsd-6.cfg
index 1657096..c71ba07 100644
--- a/rtems/config/tools/rtems-libbsd-6.cfg
+++ b/rtems/config/tools/rtems-libbsd-6.cfg
@@ -3,11 +3,11 @@
#
# branch: 6-freebsd-12
-%define rtems_libbsd_version d964a6703c705cc92fd053bcefc08bb3b6baa0e2
+%define rtems_libbsd_version 388d46bb1b3080402c68ae11d14b2b36c3138952
%hash sha512 rtems-libbsd-%{rtems_libbsd_version}.tar.bz2 \
- wEy8HtzSezKJtA3Vob7wM/D5qaG3ZVTDoNkK1yeTju04ov4IfL6IXWEtrNkOFsu9LdV1OPAOKSSYyAQ13sQqvg==
+ zMyTB+Z7vJXpywhCbRCK/vz2KUbwdg1JwoQ/JPqFbicmo/W42D/fGjKFxhPrzg0mL4silqSJ4xPdfOhET5vrtw==
%define rtems_waf_version ad08908c452c6a9bbb3bf7bbbcc9fc03fe46cc7f
-%hash sha512 rtems-waf-%{rtems_waf_version}.tar.bz2 \
+%hash sha512 rtems_waf-%{rtems_waf_version}.tar.bz2 \
EyuEit0DsAR1gK9Ki1sjl416PFgFe7dcggH3H/hmdAPmMjEIIdX7TVOTDgOIK1Pt0DW6lZ9NcW7O87GZFyy8hg==
#
diff --git a/rtems/config/tools/rtems-mipstx39-gdb-7.5.1-1.cfg b/rtems/config/tools/rtems-mipstx39-gdb-7.5.1-1.cfg
deleted file mode 100644
index 3c0bed5..0000000
--- a/rtems/config/tools/rtems-mipstx39-gdb-7.5.1-1.cfg
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# MIPS STX39 GDB 7.5.1.
-#
-
-%undefine _target
-%define _target mipstx39-rtems%{rtems_version}
-
-#
-# The gdb build instructions for RTEMS 7.5.1.
-#
-%include tools/rtems-gdb-7.5.1-1.cfg
diff --git a/rtems/config/tools/rtems-mipstx39-gdb-7.6-1.cfg b/rtems/config/tools/rtems-mipstx39-gdb-7.6-1.cfg
deleted file mode 100644
index 836c0bb..0000000
--- a/rtems/config/tools/rtems-mipstx39-gdb-7.6-1.cfg
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# MIPS STX39 GDB 7.6.
-#
-
-%undefine _target
-%define _target mipstx39-rtems%{rtems_version}
-
-#
-# The gdb build instructions for RTEMS 7.6.
-#
-%include tools/rtems-gdb-7.6-1.cfg
diff --git a/rtems/config/tools/rtems-mipstx39-gdb-7.7-1.cfg b/rtems/config/tools/rtems-mipstx39-gdb-7.7-1.cfg
deleted file mode 100644
index 0e65b5e..0000000
--- a/rtems/config/tools/rtems-mipstx39-gdb-7.7-1.cfg
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# MIPS STX39 GDB 7.7.
-#
-
-%undefine _target
-%define _target mipstx39-rtems%{rtems_version}
-
-#
-# The gdb build instructions for RTEMS 7.7.
-#
-%include tools/rtems-gdb-7.7-1.cfg
diff --git a/rtems/config/tools/rtems-mipstx39-gdb-7.9-1.cfg b/rtems/config/tools/rtems-mipstx39-gdb-7.9-1.cfg
deleted file mode 100644
index 5777b5f..0000000
--- a/rtems/config/tools/rtems-mipstx39-gdb-7.9-1.cfg
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# MIPS TX39 GDB 7.9.
-#
-
-%undefine _target
-%define _target mipstx39-rtems%{rtems_version}
-
-#
-# The gdb 7.9 build instructions for RTEMS.
-#
-%include tools/rtems-gdb-7.9-1.cfg
diff --git a/rtems/config/tools/rtems-mipstx39-gdb-8.0.1-1.cfg b/rtems/config/tools/rtems-mipstx39-gdb-8.0.1-1.cfg
deleted file mode 100644
index 05b270b..0000000
--- a/rtems/config/tools/rtems-mipstx39-gdb-8.0.1-1.cfg
+++ /dev/null
@@ -1,3 +0,0 @@
-%undefine _target
-%define _target mipstx39-rtems%{rtems_version}
-%include tools/rtems-gdb-8.0.1-1.cfg
diff --git a/rtems/config/tools/rtems-mipstx39-gdb-head.bset b/rtems/config/tools/rtems-mipstx39-gdb-head.bset
new file mode 100644
index 0000000..252967c
--- /dev/null
+++ b/rtems/config/tools/rtems-mipstx39-gdb-head.bset
@@ -0,0 +1,7 @@
+%define release 1
+%define rtems_arch mips
+%define gdb-sim-options --enable-sim-hardware
+%define win32-gdb-disable-sim
+%define _target mipstx39-rtems%{rtems_version}
+devel/gmp-6.2.1
+tools//rtems-gdb-head
diff --git a/rtems/config/tools/rtems-mipstx39-gdb-head.cfg b/rtems/config/tools/rtems-mipstx39-gdb-head.cfg
deleted file mode 100644
index d90ea33..0000000
--- a/rtems/config/tools/rtems-mipstx39-gdb-head.cfg
+++ /dev/null
@@ -1,3 +0,0 @@
-%undefine _target
-%define _target mipstx39-rtems%{rtems_version}
-%include tools/rtems-gdb-head.cfg
diff --git a/rtems/config/tools/rtems-mipstx39-gdb.bset b/rtems/config/tools/rtems-mipstx39-gdb.bset
new file mode 100644
index 0000000..392e24d
--- /dev/null
+++ b/rtems/config/tools/rtems-mipstx39-gdb.bset
@@ -0,0 +1,7 @@
+%define release 1
+%define rtems_arch mips
+%define gdb-sim-options --enable-sim-hardware
+%define win32-gdb-disable-sim
+%define _target mipstx39-rtems%{rtems_version}
+devel/gmp-6.2.1
+tools/rtems-gdb-13.1
diff --git a/rtems/config/tools/rtems-net-legacy-6.cfg b/rtems/config/tools/rtems-net-legacy-6.cfg
index fbc7ab8..ffc1184 100644
--- a/rtems/config/tools/rtems-net-legacy-6.cfg
+++ b/rtems/config/tools/rtems-net-legacy-6.cfg
@@ -3,10 +3,10 @@
#
# branch: main
-%define rtems_net_version 5713f7027984012ea17cdd582e6d0258ee7aa58a
+%define rtems_net_version a1e5d91c818d0881293c3c9e7d549816d34f6c77
%hash sha512 rtems-net-legacy-%{rtems_net_version}.tar.bz2 \
- 0dwnqZP+j9b2IZ7rqiEBndVkqIsURal4L/47pSI4pe0rz48hmWa78DE0915Gf+/+nvsCMB2I/sFAMj+P6AjeeA==
-%define rtems_waf_version 1a118bbcd52138dbdc3236e64bc23fd430a064b1
-%hash sha512 rtems-waf-%{rtems_waf_version}.tar.bz2 \
- wHiMBCaJjnNd8EEnbl5A9qyGwcQ5E+BcG9Q5SwJmlbarcrQ4U6//Q2ni2XNyXtWQzzy959o6YSg8PvVjgEi0vg==
+ wM9thMsQQdhtNVBV+FnnE/YS+2r+N7rYLsmCUMs4zQIgQ/bqhg4Sk2nkgse9NBs/gXTeCzzwG3/BTH6eQIYjBg==
+%define rtems_waf_version 68654b4f995382765605dc16917baad4bdbf7f7c
+%hash sha512 rtems_waf-%{rtems_waf_version}.tar.bz2 \
+ NAuyFxjfSiQd6VfYZl4fJClywPrLF2fN+GjXHjq3ddceqaBrSeHZ+XpYpU3XTnk2qKICsUSTLV+CskDuWdwqvQ==
%include tools/rtems-net-legacy-common.cfg
diff --git a/rtems/config/tools/rtems-net-services.cfg b/rtems/config/tools/rtems-net-services.cfg
new file mode 100644
index 0000000..2acfbd8
--- /dev/null
+++ b/rtems/config/tools/rtems-net-services.cfg
@@ -0,0 +1,91 @@
+#
+# RTEMS Net Services
+#
+# This configuration file configure's, build's and install's
+# networking services libraries
+#
+
+%if %{release} == %{nil}
+%define release 1
+%endif
+
+Name: rtems-net-services-%{rtems_net_services_version}-%{_host}-%{release}
+Summary: RTEMS Net Services provides networking services for RTEMS networking
+ stacks.
+Version: %{rtems_net_services_version}
+Release: %{release}
+URL: https://git.rtems.org/rtems-net-services.git/
+
+#
+# Net services is packaged as the release version when released.
+#
+%if %{rsb_released}
+ %define rtems_net_services_version %{rsb_version}
+ %define rtems_net_services_ext xz
+ %define rtems_waf_ext xz
+%else
+ %define rtems_net_services_ext bz2
+ %define rtems_waf_ext bz2
+%endif
+
+#
+# RTEMS BSP support.
+#
+%include rtems-bsp.cfg
+
+#
+# Net services Source.
+#
+# If not a release collect and install rtems_waf as cgit snapshots to not
+# capture submodules.
+#
+# Releases package submodules in the top level tarfile.
+#
+%source set rtems_net_services --rsb-file=rtems-net-services-%{rtems_net_services_version}.tar.%{rtems_net_services_ext} \
+ https://git.rtems.org/rtems-net-services/snapshot/rtems-net-services-%{rtems_net_services_version}.tar.%{rtems_net_services_ext}
+%if !%{rsb_released}
+ %source set rtems_waf \
+ https://git.rtems.org/rtems_waf/snapshot/rtems_waf-%{rtems_waf_version}.tar.%{rtems_waf_ext}
+%endif
+
+#
+# Prepare the source code.
+#
+%prep
+ build_top=$(pwd)
+
+ source_dir_net_services="rtems-net-services-%{rtems_net_services_version}"
+ %source setup rtems_net_services -q -n rtems-net-services-%{rtems_net_services_version}
+ %if !%{rsb_released}
+ %source setup rtems_waf -q -s 1 -c -a -n rtems-net-services-%{rtems_net_services_version}/rtems_waf
+ %endif
+ cd ${build_top}
+
+#
+# Build the source code.
+#
+%build
+ build_top=$(pwd)
+
+ %{host_build_flags}
+
+ cd ${source_dir_net_services}
+
+ ./waf distclean configure \
+ --prefix=%{_prefix} \
+ %{rtems_waf_tools} \
+ %{rtems_waf_rtems} \
+ --rtems-bsp=%{rtems_bsp_arch_bsp}
+
+ ./waf build
+
+ cd ${build_top}
+
+%install
+ build_top=$(pwd)
+
+ %{__rmdir} ${SB_BUILD_ROOT}
+
+ cd ${source_dir_net_services}
+ ./waf --destdir=$SB_BUILD_ROOT%{rtems_waf_build_root_suffix} install
+ cd ${build_top}
diff --git a/rtems/config/tools/rtems-tools-6.cfg b/rtems/config/tools/rtems-tools-6.cfg
index 8ec8917..9a1c625 100644
--- a/rtems/config/tools/rtems-tools-6.cfg
+++ b/rtems/config/tools/rtems-tools-6.cfg
@@ -10,13 +10,14 @@
%define rtems_tools_source rtems-tools-%{rtems_tools_version}
%define rtems_tools_ext xz
%else
- %define rtems_tools_version 0b94fb0e3934d039c928c82b7a85446da0c4076f
+%define rtems_tools_version 12971a8b858add612833a43360e7a7ba95902d3e
%define rtems_tools_ext bz2
%endif
%define rtems_tools_source rtems-tools-%{rtems_tools_version}
%source set rtems-tools https://git.rtems.org/rtems-tools/snapshot/%{rtems_tools_source}.tar.%{rtems_tools_ext}
-%hash sha512 rtems-tools-%{rtems_tools_version}.tar.bz2 957be966b0abada4261d21dc7a79e302718d28fc2f55a2c959fc17db044367750614d8a56890803150fcfcc3e9c84250b3e14fb8f02b1ae8de9a2f95721d4087
+%hash sha512 rtems-tools-%{rtems_tools_version}.tar.bz2 \
+ SpaYAsHhzHncHC0tlQOJwexUJ7i+l5yG1Vf8Twl61dAyOEYhkugjvRCtchN4GJQmzPrqjqFIdwciemveysouJA==
#
# Optionally enable/disable building the RTEMS Tools via the command line.
diff --git a/rtems/config/tools/rtems-xilinx-binutils-2.36.cfg b/rtems/config/tools/rtems-xilinx-binutils-2.36.cfg
new file mode 100644
index 0000000..73e8380
--- /dev/null
+++ b/rtems/config/tools/rtems-xilinx-binutils-2.36.cfg
@@ -0,0 +1,55 @@
+%include tools/rtems-binutils-2.36.cfg
+
+%define xilinx_github_url https://raw.githubusercontent.com/Xilinx/meta-xilinx
+
+%patch add binutils -p1 %{xilinx_github_url}/rel-v2021.1/meta-microblaze/recipes-devtools/binutils/binutils/0001-Add-wdc.ext.clear-and-wdc.ext.flush-insns.patch
+%hash sha512 0001-Add-wdc.ext.clear-and-wdc.ext.flush-insns.patch \
+ 56971b06821d7ab36b068016dde6086941121fca40d661056fe03f17507dafab075b306fe91d191c3fa0ec3617cd8649fe3023e0e5230e3fd5b4c2a648c23a94
+
+%patch add binutils -p1 %{xilinx_github_url}/rel-v2021.1/meta-microblaze/recipes-devtools/binutils/binutils/0002-Add-mlittle-endian-and-mbig-endian-flags.patch
+%hash sha512 0002-Add-mlittle-endian-and-mbig-endian-flags.patch \
+ e6240d8d5eebb36b161b77348522cd59dad008017ce7579b66310719faa8bdba9d0f0466f4d81bf8c1d79ed2a3a2d777924a404da1010fc4dd866fcae2bde322
+
+%patch add binutils -p1 %{xilinx_github_url}/rel-v2021.1/meta-microblaze/recipes-devtools/binutils/binutils/0003-Disable-the-warning-message-for-eh_frame_hdr.patch
+%hash sha512 0003-Disable-the-warning-message-for-eh_frame_hdr.patch \
+ 2d90ef568bb649bc79b09ec3e745a25b5f177dc49f6b6bf7e9143685e5206bb7aee7a3fd3d013d64d82e2865e90a9cfeb7103aeb29189b1330613c562597a2fc
+
+%patch add binutils -p1 %{xilinx_github_url}/rel-v2021.1/meta-microblaze/recipes-devtools/binutils/binutils/0004-LOCAL-Fix-relaxation-of-assembler-resolved-reference.patch
+%hash sha512 0004-LOCAL-Fix-relaxation-of-assembler-resolved-reference.patch \
+ 76780fc9e410739320f07dd2fc517631f0bb4a8484d56ed96f0f8089acf1f8958dbc4045bfe67289086a63b3374a63e8fb2e09f7e7d52579b04d1114022d7214
+
+%patch add binutils -p1 %{xilinx_github_url}/rel-v2021.1/meta-microblaze/recipes-devtools/binutils/binutils/0005-upstream-change-to-garbage-collection-sweep-causes-m.patch
+%hash sha512 0005-upstream-change-to-garbage-collection-sweep-causes-m.patch \
+ 76a76edd26dc9bd72b0330791d14362933f5bbbc5bef0f9a9e6ee307958a4f6791ceabdaadae3c969ac3f4c786b13784f473fde6fe8ddcbf3370ccfc8761d7ab
+
+%patch add binutils -p1 %{xilinx_github_url}/rel-v2021.1/meta-microblaze/recipes-devtools/binutils/binutils/0006-Fix-bug-in-TLSTPREL-Relocation.patch
+%hash sha512 0006-Fix-bug-in-TLSTPREL-Relocation.patch \
+ deed94f04fa91e993043f3e2f5e7c865555a7ffce83e959980daebc255247ba51d991d6289e682fa4dff1758f085e661f5c2888b078dcaf2e790873c96520928
+
+%patch add binutils -p1 %{xilinx_github_url}/rel-v2021.1/meta-microblaze/recipes-devtools/binutils/binutils/0007-Added-Address-extension-instructions.patch
+%hash sha512 0007-Added-Address-extension-instructions.patch \
+ 8fb1c588eeae2356001d2d79e06c0a6dcd37be6411c11856b064973860139d1b87d490133fd98b5d70bea24f275bdbd5114e11a41141c0be05f23317b187e705
+
+%patch add binutils -p1 %{xilinx_github_url}/rel-v2021.1/meta-microblaze/recipes-devtools/binutils/binutils/0008-fixing-the-MAX_OPCODES-to-correct-value.patch
+%hash sha512 0008-fixing-the-MAX_OPCODES-to-correct-value.patch \
+ e8227eb42b87de038430ddf79bf9f7e58deee0ed263ce521512b0568456f36aab16f9cdcdb2af2b7d0e5330aab0d73479a91480731e86370d63af708d641f903
+
+%patch add binutils -p1 %{xilinx_github_url}/rel-v2021.1/meta-microblaze/recipes-devtools/binutils/binutils/0009-Add-new-bit-field-instructions.patch
+%hash sha512 0009-Add-new-bit-field-instructions.patch \
+ c1bcc51762b66706b286ffd50f3d55dcb99cdc43d2312e0af16b1c1444fe57cf1351d55267438cdd8c755d197646d9726873338b9f892ceb27810f324533e01c
+
+%patch add binutils -p1 %{xilinx_github_url}/rel-v2021.1/meta-microblaze/recipes-devtools/binutils/binutils/0010-fixing-the-imm-bug.patch
+%hash sha512 0010-fixing-the-imm-bug.patch \
+ 15ae27cae58d375e74468bede264450b944c698e9e67fda41ba8044826695b7790f1b5b28d9484e016b49accaebfc9002e7a724854147ab2986deafb9557694c
+
+%patch add binutils -p1 %{xilinx_github_url}/rel-v2021.1/meta-microblaze/recipes-devtools/binutils/binutils/0011-Patch-Microblaze-fixed-bug-in-GCC-so-that-It-will-su.patch
+%hash sha512 0011-Patch-Microblaze-fixed-bug-in-GCC-so-that-It-will-su.patch \
+ 3d4c21f650c18771f202d9e9b858a4f93ee1848328eaa4b55c62f4cff86e45aa62d94b323c60ba759160d086800ae039f62236c041fede5347a91ef3467a03cc
+
+%patch add binutils -p1 %{xilinx_github_url}/rel-v2021.1/meta-microblaze/recipes-devtools/binutils/binutils/0012-fixing-the-constant-range-check-issue.patch
+%hash sha512 0012-fixing-the-constant-range-check-issue.patch \
+ e3100a06f4a5a816dbde2af496ed0a8fbb37e94a7188fef58c9fe78212de75ddf28d45b38bd605f58157925b1f56ef137ab5f89accb6bb478b4144647416c20a
+
+%patch add binutils -p1 %{xilinx_github_url}/rel-v2021.1/meta-microblaze/recipes-devtools/binutils/binutils/0013-Patch-Microblaze-Compiler-will-give-error-messages-i.patch
+%hash sha512 0013-Patch-Microblaze-Compiler-will-give-error-messages-i.patch \
+ 7d52717cdd4680434935018edbf5b20b0a545494d33b54735238aefeb340476b7b04d40372f4c664f7cfdf346217bcbf70d1484cdcc7ffaabe74961d4be784a6
diff --git a/rtems/config/tools/rtems-xilinx-gcc-10-newlib-head.cfg b/rtems/config/tools/rtems-xilinx-gcc-10-newlib-head.cfg
new file mode 100644
index 0000000..53d243b
--- /dev/null
+++ b/rtems/config/tools/rtems-xilinx-gcc-10-newlib-head.cfg
@@ -0,0 +1,67 @@
+%include tools/rtems-gcc-10-newlib-head.cfg
+
+%define xilinx_github_url https://raw.githubusercontent.com/Xilinx/meta-xilinx
+
+%patch add gcc -p1 %{xilinx_github_url}/rel-v2021.1/meta-microblaze/recipes-devtools/gcc/gcc-10/0001-LOCAL-Testsuite-builtins-tests-require-fpic.patch
+%hash sha512 0001-LOCAL-Testsuite-builtins-tests-require-fpic.patch \
+ 5373e2a7ea6561263224e8da55318425eee7c91d633c45680183141093c2ea31aa7e7ee11a7ba3bd580a7edb405a162bc8904f48a354b154383fc938036a09c2
+
+%patch add gcc -p1 %{xilinx_github_url}/rel-v2021.1/meta-microblaze/recipes-devtools/gcc/gcc-10/0002-LOCAL-Quick-fail-g-.dg-opt-memcpy1.C.patch
+%hash sha512 0002-LOCAL-Quick-fail-g-.dg-opt-memcpy1.C.patch \
+ 4bf9df22fe7be735deb2ee4353933eadf13fbee1f23254d4c870d8c99749e76eb8010cacb6143fad71c11b72063a774bd7ed050f61f7e75afe4cc3e945b83441
+
+%patch add gcc -p1 %{xilinx_github_url}/rel-v2021.1/meta-microblaze/recipes-devtools/gcc/gcc-10/0003-LOCAL-For-dejagnu-static-testing-on-qemu-suppress-wa.patch
+%hash sha512 0003-LOCAL-For-dejagnu-static-testing-on-qemu-suppress-wa.patch \
+ f8b8ae98a02d1aca64e3f91dad62977e006800b5b24112927fcd02a07fe40947f2209625b3b564cffb77dc6ab6e3db072cf93b26e925fed689b8d34b3cc612bf
+
+%patch add gcc -p1 %{xilinx_github_url}/rel-v2021.1/meta-microblaze/recipes-devtools/gcc/gcc-10/0004-Patch-testsuite-Add-MicroBlaze-to-target-supports-fo.patch
+%hash sha512 0004-Patch-testsuite-Add-MicroBlaze-to-target-supports-fo.patch \
+ f7823ba440cb3288fa372c690ffb878269915ee75be2693414338817e3bd8e9fd52545df4012b95c736d0a2fcca927bead86d5d9e70952af10b696299e3b2a4f
+
+%patch add gcc -p1 %{xilinx_github_url}/rel-v2021.1/meta-microblaze/recipes-devtools/gcc/gcc-10/0005-Patch-testsuite-Update-MicroBlaze-strings-test.patch
+%hash sha512 0005-Patch-testsuite-Update-MicroBlaze-strings-test.patch \
+ 1d63269e9bf6eb92e6a18a371d8c89c5a7d8735f1483d798a1e486e38d98e9b72fb95515374e8f241ddfa43e6eb90ffb876b1f066fcd3fc230d1370c34db778a
+
+%patch add gcc -p1 %{xilinx_github_url}/rel-v2021.1/meta-microblaze/recipes-devtools/gcc/gcc-10/0006-Patch-testsuite-Allow-MicroBlaze-.weakext-pattern-in.patch
+%hash sha512 0006-Patch-testsuite-Allow-MicroBlaze-.weakext-pattern-in.patch \
+ bf858501c97890035b05692c028c5f6fb66f1554cff59249e6af3e9882ab9a87d47e3696aa2e7a175bb1bf5dd38ba328e42474922706b5db93d2d5daaac7b620
+
+%patch add gcc -p1 %{xilinx_github_url}/rel-v2021.1/meta-microblaze/recipes-devtools/gcc/gcc-10/0007-Patch-testsuite-Add-MicroBlaze-to-check_profiling_av.patch
+%hash sha512 0007-Patch-testsuite-Add-MicroBlaze-to-check_profiling_av.patch \
+ 5d86cdf759dcf7261ec3d3665fe488a76d1dac47040fa55a9ddd5d7764d6de6ef4848467f3e41aab1ba774d7c59eb1649f7882bd9ef3bfcae84c71fcaba64d81
+
+%patch add gcc -p1 %{xilinx_github_url}/rel-v2021.1/meta-microblaze/recipes-devtools/gcc/gcc-10/0008-Patch-microblaze-Fix-atomic-side-effects.patch
+%hash sha512 0008-Patch-microblaze-Fix-atomic-side-effects.patch \
+ 422a48b95dbc4370ae2a07e90a42b7a5eca1757f5396d8c660f134629fed2cc694e2409e5d5cc835d69526a7c5316c94345acfc193faaa6b1caeab45f726bf7f
+
+%patch add gcc -p1 %{xilinx_github_url}/rel-v2021.1/meta-microblaze/recipes-devtools/gcc/gcc-10/0009-Patch-microblaze-Fix-atomic-boolean-return-value.patch
+%hash sha512 0009-Patch-microblaze-Fix-atomic-boolean-return-value.patch \
+ 4c0b452cead51332c2987150009e7c41e4609d0ecc9cb2cecc15cc84a5861787a44adc60ecf27d8314af7d164e87a49a370c398298801043a1499f12f720084d
+
+%patch add gcc -p1 %{xilinx_github_url}/rel-v2021.1/meta-microblaze/recipes-devtools/gcc/gcc-10/0010-Patch-microblaze-Fix-the-Microblaze-crash-with-msmal.patch
+%hash sha512 0010-Patch-microblaze-Fix-the-Microblaze-crash-with-msmal.patch \
+ 5a0a0bbc9bcb16b97893f681b18900d37c572deb97eebd9849a06e481db77c37df9d2f67f9614ba02163bf7fde2be10fb7f3b43070e1728da27d52f5a0967bc2
+
+%patch add gcc -p1 %{xilinx_github_url}/rel-v2021.1/meta-microblaze/recipes-devtools/gcc/gcc-10/0011-Patch-microblaze-Added-ashrsi3_with_size_opt.patch
+%hash sha512 0011-Patch-microblaze-Added-ashrsi3_with_size_opt.patch \
+ 104f0f80138f277ad8869a7a0261c647ee933bd053f4ce8f7f12675145ecabb1bf3015d16968534910e98cf518377beb9939721cd01de677d2c8f5bc3957373d
+
+%patch add gcc -p1 %{xilinx_github_url}/rel-v2021.1/meta-microblaze/recipes-devtools/gcc/gcc-10/0012-Patch-microblaze-Use-bralid-for-profiler-calls.patch
+%hash sha512 0012-Patch-microblaze-Use-bralid-for-profiler-calls.patch \
+ ad05cd7b91db89596394d538fd97833e374ae98b666e25ce5d379f16abe23acca106957404316d43e153375dde699fec8f385d1a6c54174f29649eb4d63604cd
+
+%patch add gcc -p1 %{xilinx_github_url}/rel-v2021.1/meta-microblaze/recipes-devtools/gcc/gcc-10/0013-Patch-microblaze-Removed-moddi3-routinue.patch
+%hash sha512 0013-Patch-microblaze-Removed-moddi3-routinue.patch \
+ 07cde4e4f5b7bfb8cd5c89c865cc4e4c36b943b5b24035df4b18c6e9b30b9513089344105d0c05a31f2c4606ab1034c5dcc3541d6792893027ad5e3dbfb04429
+
+%patch add gcc -p1 https://devel.rtems.org/raw-attachment/ticket/4481/0001-gcc-config-aarch64-rtems.h-Define-__USE_INIT_FINI__.patch
+%hash sha512 0001-gcc-config-aarch64-rtems.h-Define-__USE_INIT_FINI__.patch \
+ 84253c3c180fbfc6b640ffda72e8574f95661bdf3132503acc3f1b73a8f78aeb0508c06dbb32d1c8363ff083765194eeff14e46445946969c51a4498d2b3a0e7
+
+%patch add gcc -p1 https://devel.rtems.org/raw-attachment/ticket/4481/0002-config-microblaze-crti.S-Add-single-underscore-init-.patch
+%hash sha512 0002-config-microblaze-crti.S-Add-single-underscore-init-.patch \
+ bf1ec7eff0dd51d154dd0507edb085458c90a000f5a3ccefb1064147cf8fdafe0111d2094372e164976f2193c289bff9ea63dcad43555c90893272a494b7e779
+
+%patch add gcc -p1 https://devel.rtems.org/raw-attachment/ticket/4589/0001-microblaze-Define-__ELF__-for-RTEMS-target.patch
+%hash sha512 0001-microblaze-Define-__ELF__-for-RTEMS-target.patch \
+ 39c0666c2e5c560447f00ed913cd07261e9c0db05b0cc549400667013ccf1d4140c0bd7b012d60dd628235bf7ae27564460a45e969e9cff75d14ed94bfd82632
diff --git a/source-builder/aarch64-linux-gnu-pkg-config b/source-builder/aarch64-linux-gnu-pkg-config
new file mode 100755
index 0000000..09d7b16
--- /dev/null
+++ b/source-builder/aarch64-linux-gnu-pkg-config
@@ -0,0 +1,3 @@
+#! /bin/sh
+base=$(dirname $0)
+exec ${base}/pkg-config $*
diff --git a/source-builder/config/binutils-2-1.cfg b/source-builder/config/binutils-2-1.cfg
index a49fa2a..890bd74 100644
--- a/source-builder/config/binutils-2-1.cfg
+++ b/source-builder/config/binutils-2-1.cfg
@@ -26,13 +26,22 @@ URL: http://sources.redhat.com/binutils
%define allow_cxc
#
-# Default gold and LTO to disable.
+# Default gold to disable.
#
%ifn %{defined with_gold}
%define with_gold 0
%endif
-%ifn %{defined with_lto}
- %define with_lto 0
+
+#
+# Disable the new default options to check for stack exec and RWX sections
+# instroduced in 2.39.
+#
+%define binutils_extra_config %nil
+%ifn %{defined with_stackexec_warning}
+ %define binutils_extra_config %{binutils_extra_config} --disable-warn-execstack
+%endif
+%ifn %{defined with_rwx_sections_warning}
+ %define binutils_extra_config %{binutils_extra_config} --disable-warn-rwx-segments
%endif
#
@@ -72,14 +81,14 @@ URL: http://sources.redhat.com/binutils
%{?with_deterministic_archives:--enable-deterministic-archives} \
%{?with_64_bit_bfd:--enable-64-bit-bfd} \
%{?with_gold:--enable-gold=yes} \
- %{?with_lto:--enable-lto --enable-plugins}%{!?with_lto:--disable-lto} \
--without-included-gettext \
--disable-win32-registry \
--disable-werror \
--prefix=%{_prefix} --bindir=%{_bindir} \
--exec-prefix=%{_exec_prefix} \
--includedir=%{_includedir} --libdir=%{_libdir} \
- --mandir=%{_mandir} --infodir=%{_infodir}
+ --mandir=%{_mandir} --infodir=%{_infodir} \
+ %{binutils_extra_config}
%{__make} %{?_smp_mflags} all
diff --git a/source-builder/config/checks.cfg b/source-builder/config/checks.cfg
index 93d4c97..da1c1da 100644
--- a/source-builder/config/checks.cfg
+++ b/source-builder/config/checks.cfg
@@ -23,6 +23,8 @@
%{?without_java:%define enable_java 0}
%{?with_objc:%define enable_objc 1}
%{?without_objc:%define enable_objc 0}
+%{?with_newlib_tls:%define enable_newlib_tls 1}
+%{?without_newlib_tls:%define enable_newlib_tls 0}
#
# Default to C++ on.
@@ -72,3 +74,10 @@
%ifn %{defined enable_obsolete}
%define enable_obsolete 0
%endif
+
+#
+# Default to Newlib thread-local storage instead of struct _reent off.
+#
+%ifn %{defined enable_newlib_tls}
+ %define enable_newlib_tls 0
+%endif
diff --git a/source-builder/config/dtc-1-1.cfg b/source-builder/config/dtc-1-1.cfg
index 686a1e0..d42e91e 100644
--- a/source-builder/config/dtc-1-1.cfg
+++ b/source-builder/config/dtc-1-1.cfg
@@ -37,7 +37,7 @@ URL: https://www.devicetree.org/
%{build_build_flags}
- %{__make} PREFIX=%{_prefix}
+ %{__make} PREFIX=%{_prefix} WARNINGS=
cd ${build_top}
@@ -47,6 +47,6 @@ URL: https://www.devicetree.org/
rm -rf $SB_BUILD_ROOT
cd dtc-%{dtc_version}
- %{__make} DESTDIR=$SB_BUILD_ROOT PREFIX=%{_prefix} install
+ %{__make} DESTDIR=$SB_BUILD_ROOT PREFIX=%{_prefix} WARNINGS= install
cd ${build_top}
diff --git a/source-builder/config/freetype-1.cfg b/source-builder/config/freetype-1.cfg
index 95892dd..917f3d9 100644
--- a/source-builder/config/freetype-1.cfg
+++ b/source-builder/config/freetype-1.cfg
@@ -17,7 +17,7 @@ URL: http://www.freetype.org/
#
# freetype Source
#
-%source set freetype http://download.savannah.gnu.org/releases/freetype/freetype-%{freetype_version}.tar.gz
+%source set freetype https://download.savannah.gnu.org/releases/freetype/freetype-old/freetype-%{freetype_version}.tar.gz
#
# Prepare the source code.
#
diff --git a/source-builder/config/gcc-10.cfg b/source-builder/config/gcc-10.cfg
new file mode 100644
index 0000000..d15c4a4
--- /dev/null
+++ b/source-builder/config/gcc-10.cfg
@@ -0,0 +1,20 @@
+#
+# GCC 10
+#
+# This configuration file configure's, make's and install's gcc. It uses
+# newlib, ISL, MPFR, MPC, and GMP in a one-tree build configuration.
+#
+
+%define isl_version 0.18
+%hash sha512 isl-%{isl_version}.tar.bz2 85d0b40f4dbf14cb99d17aa07048cdcab2dc3eb527d2fbb1e84c41b2de5f351025370e57448b63b2b8a8cf8a0843a089c3263f9baee1542d5c2e1cb37ed39d94
+
+%define mpfr_version 3.1.6
+%hash sha512 mpfr-%{mpfr_version}.tar.bz2 0c310dd7956be527884f8059c195a5aca1042b089d0927ac6341e6310b1250a7059bc61aaaab4dfb76c6ab8b67e440878ca203f72674529bbcb46770ed9b6885
+
+%define mpc_version 1.0.3
+%hash sha512 mpc-%{mpc_version}.tar.gz 0028b76df130720c1fad7de937a0d041224806ce5ef76589f19c7b49d956071a683e2f20d154c192a231e69756b19e48208f2889b0c13950ceb7b3cfaf059a43
+
+%define gmp_version 6.2.1
+%hash sha512 gmp-%{gmp_version}.tar.bz2 8904334a3bcc5c896ececabc75cda9dec642e401fb5397c4992c4fabea5e962c9ce8bd44e8e4233c34e55c8010cc28db0545f5f750cbdbb5f00af538dc763be9
+
+%include %{_configdir}/gcc-common-1.cfg
diff --git a/source-builder/config/gcc-12.cfg b/source-builder/config/gcc-12.cfg
new file mode 100644
index 0000000..2885819
--- /dev/null
+++ b/source-builder/config/gcc-12.cfg
@@ -0,0 +1,21 @@
+#
+# GCC 12
+#
+# This configuration file configure's, make's and install's gcc. It uses
+# newlib, ISL, MPFR and MPC in a one-tree build configuration.
+#
+
+%define isl_version 0.24
+%hash sha512 isl-%{isl_version}.tar.bz2 \
+ qrO929qWuAHQ9W0oaflDFXqtUqb25qYXRe3XQCNMY1w4IxryC8PxoI1Bal6XOpDhgkkHjtjkri8dXeV2WHOOlQ==
+
+%define mpfr_version 4.2.0
+%define mpfr_url https://www.mpfr.org/mpfr-%{mpfr_version}
+%hash sha512 mpfr-%{mpfr_version}.tar.bz2 \
+ yyqTFLlONKTqSc4mGYAulCDJguVSWKS8Qj+AJ0BjJkaj1CDn/PNzsZYYOFuLK0Eqv6En6PRzBThjQkysIziTwA==
+
+%define mpc_version 1.2.1
+%hash sha512 mpc-%{mpc_version}.tar.gz \
+ Mnn4E6s39H/cyADkrF8wZBfQf1OVk8pxWHbkPgSJbh1bzsz7KI7ykIo/JLdgdH0NvQOSokubNBvD4SCC5cg27g==
+
+%include %{_configdir}/gcc-common-1.cfg
diff --git a/source-builder/config/gcc-13.cfg b/source-builder/config/gcc-13.cfg
new file mode 100644
index 0000000..19b514a
--- /dev/null
+++ b/source-builder/config/gcc-13.cfg
@@ -0,0 +1,26 @@
+#
+# GCC 13
+#
+# This configuration file configure's, make's and install's gcc. It uses
+# newlib, ISL, MPFR and MPC in a one-tree build configuration.
+#
+
+%define isl_version 0.24
+%hash sha512 isl-%{isl_version}.tar.bz2 \
+ qrO929qWuAHQ9W0oaflDFXqtUqb25qYXRe3XQCNMY1w4IxryC8PxoI1Bal6XOpDhgkkHjtjkri8dXeV2WHOOlQ==
+# See #4657
+%patch add isl -p1 https://devel.rtems.org/raw-attachment/ticket/4657/fix-mac-arm64-isl-config.patch
+%hash sha512 fix-mac-arm64-isl-config.patch \
+ wH/bYFplINGUNYUEcx5jtUAhHvaAOD8cpOxltKxDridodTT9fYGWpNvoOg7PLEKkJUxx5gnuSEp2FFc7xJmi6A==
+
+%define mpfr_version 4.2.1
+%define mpfr_url https://ftp.gnu.org/gnu/mpfr
+%hash sha512 mpfr-%{mpfr_version}.tar.bz2 \
+ yBhCUy7MZjNI3rdADZEa1xkz07Ulovnlrc0EJlycD90fIuyiKfSCcDrH8iLvIJ/J4zndH6R9cq5X9/cLIzanbw==
+
+%define mpc_version 1.3.1
+%define mpc_url https://ftp.gnu.org/gnu/mpc
+%hash sha512 mpc-%{mpc_version}.tar.gz \
+ S6tO9gdvjF39yZ2BC1EQjO1h6ilCugwcky1iQ2ClRz3yDTKzAPx28rpKoql+Hydcn9SUobqfB8TLKtfOrrGulw==
+
+%include %{_configdir}/gcc-common-1.cfg
diff --git a/source-builder/config/gcc-4.3-1.cfg b/source-builder/config/gcc-4.3-1.cfg
index 69ea367..24d4010 100644
--- a/source-builder/config/gcc-4.3-1.cfg
+++ b/source-builder/config/gcc-4.3-1.cfg
@@ -24,13 +24,6 @@
%source set newlib https://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
#
-# Packages GCC requires
-#
-%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
-%source set mpc http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
-%source set gmp https://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
-
-#
# GCC Common build script.
#
%include %{_configdir}/gcc-common-1.cfg
diff --git a/source-builder/config/gcc-4.4-1.cfg b/source-builder/config/gcc-4.4-1.cfg
index 2c70919..c6ae586 100644
--- a/source-builder/config/gcc-4.4-1.cfg
+++ b/source-builder/config/gcc-4.4-1.cfg
@@ -23,13 +23,6 @@
%source set newlib https://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
#
-# Packages GCC requires
-#
-%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
-%source set mpc http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
-%source set gmp https://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
-
-#
# GCC Common build script.
#
%include %{_configdir}/gcc-common-1.cfg
diff --git a/source-builder/config/gcc-4.5-1.cfg b/source-builder/config/gcc-4.5-1.cfg
index fbff31c..8a9f8ca 100644
--- a/source-builder/config/gcc-4.5-1.cfg
+++ b/source-builder/config/gcc-4.5-1.cfg
@@ -19,13 +19,6 @@
%source set newlib https://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
#
-# Packages GCC requires
-#
-%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
-%source set mpc http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
-%source set gmp https://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
-
-#
# GCC Common build script.
#
%include %{_configdir}/gcc-common-1.cfg
diff --git a/source-builder/config/gcc-4.6-1.cfg b/source-builder/config/gcc-4.6-1.cfg
index 98f8d7e..cecfdb5 100644
--- a/source-builder/config/gcc-4.6-1.cfg
+++ b/source-builder/config/gcc-4.6-1.cfg
@@ -23,13 +23,6 @@
%source set newlib https://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
#
-# Packages GCC requires
-#
-%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
-%source set mpc http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
-%source set gmp https://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
-
-#
# GCC Common build script.
#
%include %{_configdir}/gcc-common-1.cfg
diff --git a/source-builder/config/gcc-4.7-1.cfg b/source-builder/config/gcc-4.7-1.cfg
index 0eac21f..79a50db 100644
--- a/source-builder/config/gcc-4.7-1.cfg
+++ b/source-builder/config/gcc-4.7-1.cfg
@@ -28,13 +28,6 @@
%source set newlib https://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
#
-# Packages GCC requires
-#
-%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
-%source set mpc http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
-%source set gmp https://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
-
-#
# GCC Common build script.
#
%include %{_configdir}/gcc-common-1.cfg
diff --git a/source-builder/config/gcc-4.8-1.cfg b/source-builder/config/gcc-4.8-1.cfg
index aa62837..b2d4208 100644
--- a/source-builder/config/gcc-4.8-1.cfg
+++ b/source-builder/config/gcc-4.8-1.cfg
@@ -19,13 +19,6 @@
%source set newlib https://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
#
-# Packages GCC requires
-#
-%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
-%source set mpc http://www.multiprecision.org/downloads/mpc-%{mpc_version}.tar.gz
-%source set gmp https://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
-
-#
# GCC Common build script.
#
%include %{_configdir}/gcc-common-1.cfg
diff --git a/source-builder/config/gcc-4.9-1.cfg b/source-builder/config/gcc-4.9-1.cfg
index e28b560..e472e47 100644
--- a/source-builder/config/gcc-4.9-1.cfg
+++ b/source-builder/config/gcc-4.9-1.cfg
@@ -18,21 +18,18 @@
#
%source set newlib https://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
-#
-# Packages GCC requires
-#
-%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
-%source set mpc http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
-%source set gmp https://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
-
%patch add gcc --rsb-file=Make-lang.in-b09fb02bb4c0d16fc2c842bec4069c033897b5f2.patch -p1 https://gcc.gnu.org/git/?p=gcc.git;a=blobdiff_plain;f=gcc/cp/Make-lang.in;h=b09fb02bb4c0d16fc2c842bec4069c033897b5f2;hp=e98beb1e33e4bcc4943361c559ae71b7eb345346;hb=1e5f1089dec3af328fd03125d6778f666d0bd4e4;hpb=88375bb2ba8b9004a9924cdae894d7ff32972652
-%hash sha512 Make-lang.in-b09fb02bb4c0d16fc2c842bec4069c033897b5f2.patch a47511de21fda0c0c314577ee295b8f2bc9f555084ceca88de12c931ebfe47e5fec349682085a7a1e8637e8e159b8f79188a56d42e54fda2ba5161d5bd3f56ac
+%hash sha512 Make-lang.in-b09fb02bb4c0d16fc2c842bec4069c033897b5f2.patch \
+ h0s+47lNCLhSKUjMuK6qILRHFeNpgsm/MulBzfqv934aPdryogCODhEdPiT5pUV02nMIzvg/kx7wus+8O6zTKQ==
%patch add gcc --rsb-file=cfns.gperf.b09fb02bb4c0d16fc2c842bec4069c033897b5f2.patch -p1 https://gcc.gnu.org/git/?p=gcc.git;a=blobdiff_plain;f=gcc/cp/cfns.gperf;h=b09fb02bb4c0d16fc2c842bec4069c033897b5f2;hp=e98beb1e33e4bcc4943361c559ae71b7eb345346;hb=1e5f1089dec3af328fd03125d6778f666d0bd4e4;hpb=88375bb2ba8b9004a9924cdae894d7ff32972652
-%hash sha512 cfns.gperf.b09fb02bb4c0d16fc2c842bec4069c033897b5f2.patch fdb49abb4f04ba627d6be7b0e0dd9bfdf3eb4b28c045627048bf1c56cabdf2c618cf084991bb847ac60c1eabf582a30ca1e0f4bfd943b9f34efd7e96879d251b
+%hash sha512 cfns.gperf.b09fb02bb4c0d16fc2c842bec4069c033897b5f2.patch \
+ nzj3FPeCC/NcOvuIzyd4EGoJFu3iqn1LUa8ya+P2hstwVLxiHGyvZKHaS1Cb0v7JlRCfhe6eftTZFmEzEqxCqw==
%patch add gcc --rsb-file=cfns.h-b09fb02bb4c0d16fc2c842bec4069c033897b5f2.patch -p1 https://gcc.gnu.org/git/?p=gcc.git;a=blobdiff_plain;f=gcc/cp/cfns.h;h=b09fb02bb4c0d16fc2c842bec4069c033897b5f2;hp=e98beb1e33e4bcc4943361c559ae71b7eb345346;hb=1e5f1089dec3af328fd03125d6778f666d0bd4e4;hpb=88375bb2ba8b9004a9924cdae894d7ff32972652
-%hash sha512 cfns.h-b09fb02bb4c0d16fc2c842bec4069c033897b5f2.patch ec0bd28a8266b136b99db4285c9a088c11fd7ba647dade5fb161308c00cb4189fa665e25ce6b139a7aa9740e97e617fd4e15ca506416dd9316e9fb7202f5c520
+%hash sha512 cfns.h-b09fb02bb4c0d16fc2c842bec4069c033897b5f2.patch \
+ Wl/1Njp/BOUEwxIVBZtElBLT2rSlBO545FuagJHbL/ajxCllSmtM6611QpWke16fzN/SDgyvkgsJxzfk76WaLw==
%patch add gcc --rsb-file=except.c-b09fb02bb4c0d16fc2c842bec4069c033897b5f2.patch -p1 https://gcc.gnu.org/git/?p=gcc.git;a=blobdiff_plain;f=gcc/cp/except.c;h=b09fb02bb4c0d16fc2c842bec4069c033897b5f2;hp=e98beb1e33e4bcc4943361c559ae71b7eb345346;hb=1e5f1089dec3af328fd03125d6778f666d0bd4e4;hpb=88375bb2ba8b9004a9924cdae894d7ff32972652
-%hash sha512 except.c-b09fb02bb4c0d16fc2c842bec4069c033897b5f2.patch ad05ceea98d7ec95fb2312b0f31aa6260f67119d7c796a1b8c1816fbcd2738edb626705594699bec22a2f770892589f6fc296e184d329bcb967ee2587fbfc5ba
+%hash sha512 except.c-b09fb02bb4c0d16fc2c842bec4069c033897b5f2.patch \
+ CyuFSBNswd7W8LVDjeOev7HSrQ19dqNEKiuDwNRn0pf02tAxuerxwONQP2fX5QkqwCNxiPnSwB6yzhu4RVSX/A==
#
# GCC Common build script.
diff --git a/source-builder/config/gcc-6-1.cfg b/source-builder/config/gcc-6-1.cfg
index 842ec35..2a2e3ec 100644
--- a/source-builder/config/gcc-6-1.cfg
+++ b/source-builder/config/gcc-6-1.cfg
@@ -19,13 +19,6 @@
%source set newlib https://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
#
-# Packages GCC requires
-#
-%source set mpfr http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
-%source set mpc http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
-%source set gmp https://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
-
-#
# GCC Common build script.
#
%include %{_configdir}/gcc-common-1.cfg
diff --git a/source-builder/config/gcc-7-1.cfg b/source-builder/config/gcc-7-1.cfg
index 5160968..06a790f 100644
--- a/source-builder/config/gcc-7-1.cfg
+++ b/source-builder/config/gcc-7-1.cfg
@@ -19,13 +19,6 @@
%source set newlib https://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
#
-# Packages GCC requires
-#
-%source set mpfr https://ftp.gnu.org/gnu/mpfr/mpfr-%{mpfr_version}.tar.bz2
-%source set mpc https://ftp.gnu.org/gnu/mpc/mpc-%{mpc_version}.tar.gz
-%source set gmp https://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
-
-#
# GCC Common build script.
#
%include %{_configdir}/gcc-common-1.cfg
diff --git a/source-builder/config/gcc-7.2-1.cfg b/source-builder/config/gcc-7.2-1.cfg
index 893a2f5..3f3ee03 100644
--- a/source-builder/config/gcc-7.2-1.cfg
+++ b/source-builder/config/gcc-7.2-1.cfg
@@ -19,13 +19,6 @@
%source set newlib https://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz
#
-# Packages GCC requires
-#
-%source set mpfr https://ftp.gnu.org/gnu/mpfr/mpfr-%{mpfr_version}.tar.bz2
-%source set mpc https://ftp.gnu.org/gnu/mpc/mpc-%{mpc_version}.tar.gz
-%source set gmp https://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
-
-#
# GCC Common build script.
#
%include %{_configdir}/gcc-common-1.cfg
diff --git a/source-builder/config/gcc-9.cfg b/source-builder/config/gcc-9.cfg
index f8cf69b..e076d63 100644
--- a/source-builder/config/gcc-9.cfg
+++ b/source-builder/config/gcc-9.cfg
@@ -17,8 +17,4 @@
%define gmp_version 6.1.0
%hash sha512 gmp-6.1.0.tar.bz2 3c82aeab9c1596d4da8afac2eec38e429e84f3211e1a572cf8fd2b546493c44c039b922a1133eaaa48bd7f3e11dbe795a384e21ed95cbe3ecc58d7ac02246117
-%source set mpc https://ftp.gnu.org/gnu/mpc/mpc-%{mpc_version}.tar.gz
-%source set gmp https://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
-%source set mpfr https://ftp.gnu.org/gnu/mpfr/mpfr-%{mpfr_version}.tar.bz2
-
%include %{_configdir}/gcc-common-1.cfg
diff --git a/source-builder/config/gcc-common-1.cfg b/source-builder/config/gcc-common-1.cfg
index 4e13efc..42c8a7b 100644
--- a/source-builder/config/gcc-common-1.cfg
+++ b/source-builder/config/gcc-common-1.cfg
@@ -34,7 +34,7 @@ URL: http://gcc.gnu.org/
# Default LTO to off.
#
%ifn %{defined with_lto}
- %define with_lto 0
+ %define enable_lto 1
%endif
#
@@ -47,14 +47,32 @@ URL: http://gcc.gnu.org/
%endif
#
+# Packages GCC URLs, can be defined for older packages
+#
+%if %{!defined cloog_url}
+ %define cloog_url https://gcc.gnu.org/pub/gcc/infrastructure
+%endif
+%if %{!defined isl_url}
+ %define isl_url https://gcc.gnu.org/pub/gcc/infrastructure
+%endif
+%if %{!defined mpc_url}
+ %define mpc_url https://gcc.gnu.org/pub/gcc/infrastructure
+%endif
+%if %{!defined mpfr_url}
+ %define mpfr_url https://gcc.gnu.org/pub/gcc/infrastructure
+%endif
+
+#
# Packages GCC requires
#
%if %{defined cloog_version}
-%source set cloog https://gcc.gnu.org/pub/gcc/infrastructure/cloog-%{cloog_version}.tar.gz
+%source set cloog %{_url}/cloog-%{cloog_version}.tar.gz
%endif
%if %{defined isl_version}
-%source set isl https://gcc.gnu.org/pub/gcc/infrastructure/isl-%{isl_version}.tar.bz2
+%source set isl %{isl_url}/isl-%{isl_version}.tar.bz2
%endif
+%source set mpc %{mpc_url}/mpc-%{mpc_version}.tar.gz
+%source set mpfr %{mpfr_url}/mpfr-%{mpfr_version}.tar.bz2
#
# Prepare the source code.
@@ -90,7 +108,7 @@ URL: http://gcc.gnu.org/
%source setup cloog -q -D -n cloog-%{cloog_version}
%patch setup cloog -p1
cd ${build_top}
- # Build MPFR one-tree style
+ # Build CLooG one-tree style
%{__rmfile} ${source_dir_gcc}/cloog
%{__ln_s} $PWD/${source_dir_cloog} ${source_dir_gcc}/cloog
%endif
@@ -101,20 +119,11 @@ URL: http://gcc.gnu.org/
%source setup isl -q -D -n isl-%{isl_version}
%patch setup isl -p1
cd ${build_top}
- # Build MPFR one-tree style
+ # Build ISL one-tree style
%{__rmfile} ${source_dir_gcc}/isl
%{__ln_s} $PWD/${source_dir_isl} ${source_dir_gcc}/isl
%endif
- # MPFR
- source_dir_mpfr="mpfr-%{mpfr_version}"
- %source setup mpfr -q -D -n mpfr-%{mpfr_version}
- %patch setup mpfr -p1
- cd ${build_top}
- # Build MPFR one-tree style
- %{__rmfile} ${source_dir_gcc}/mpfr
- %{__ln_s} $PWD/${source_dir_mpfr} ${source_dir_gcc}/mpfr
-
# MPC
source_dir_mpc="mpc-%{mpc_version}"
%source setup mpc -q -D -n mpc-%{mpc_version}
@@ -124,14 +133,14 @@ URL: http://gcc.gnu.org/
%{__rmfile} ${source_dir_gcc}/mpc
%{__ln_s} $PWD/${source_dir_mpc} ${source_dir_gcc}/mpc
- # GMP
- source_dir_gmp="gmp-%{gmp_version}"
- %source setup gmp -q -D -n gmp-%{gmp_version}
- %patch setup gmp -p1
+ # MPFR
+ source_dir_mpfr="mpfr-%{mpfr_version}"
+ %source setup mpfr -q -D -n mpfr-%{mpfr_version}
+ %patch setup mpfr -p1
cd ${build_top}
- # Build GMP one-tree style
- %{__rmfile} ${source_dir_gcc}/gmp
- %{__ln_s} $PWD/${source_dir_gmp} ${source_dir_gcc}/gmp
+ # Build MPFR one-tree style
+ %{__rmfile} ${source_dir_gcc}/mpfr
+ %{__ln_s} $PWD/${source_dir_mpfr} ${source_dir_gcc}/mpfr
echo "%{gcc_version_message}" > ${source_dir_gcc}/gcc/DEV-PHASE
@@ -143,6 +152,10 @@ URL: http://gcc.gnu.org/
%build
build_top=$(pwd)
+ %if %{defined _internal_gsed_path}
+ export PATH=%{_internal_gsed_path}/bin:$PATH
+ %endif
+
%{build_directory}
mkdir -p ${build_dir}
@@ -162,11 +175,8 @@ URL: http://gcc.gnu.org/
%if %{enable_fortran}
languages="$languages,fortran"
%endif
-%if %{enable_java}
- languages="$languages,java"
-%endif
-%if %{enable_objc}
- languages="$languages,objc"
+%if %{enable_lto}
+ languages="$languages,lto"
%endif
%{host_build_flags}
@@ -188,10 +198,11 @@ URL: http://gcc.gnu.org/
--with-newlib \
--disable-nls --without-included-gettext \
--disable-win32-registry \
+ --disable-werror \
--enable-version-specific-runtime-libs \
- %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
--enable-newlib-io-c99-formats \
%{?disable_MAKEINFO:MAKEINFO=missing} \
+ %{?enable_newlib_tls:--enable-newlib-reent-thread-local} \
%{?with_iconv:--enable-newlib-iconv} \
%{?with_iconv:--enable-newlib-iconv-encodings=%{_newlib_iconv_encodings}} \
%{?with_threads:--enable-threads}%{!?with_threads:--disable-threads} \
@@ -208,7 +219,7 @@ URL: http://gcc.gnu.org/
cp ../${source_dir_gcc}/gcc/gsyslimits.h gcc/include/syslimits.h
fi
- %{__make} %{?_smp_mflags} all
+ %{__make} -w %{?_smp_mflags} all
cd ${build_top}
diff --git a/source-builder/config/gdb-7.5-1.cfg b/source-builder/config/gdb-7.5-1.cfg
index e2d141b..aa73e3e 100644
--- a/source-builder/config/gdb-7.5-1.cfg
+++ b/source-builder/config/gdb-7.5-1.cfg
@@ -11,6 +11,9 @@
%define gdb_version 7.5
+%hash sha512 gdb-%{gdb_version}.tar.gz \
+ SnVe8LjmGIwPSX86ZuTsu2eZ5ciCOrxBj8Y/J5ms72y6FM8mhgSQkZMXiC4kxN8GiDYQKhWrhRxnM94Cubvibw==
+
#
# The gdb build instructions. We use 7.xx Release 1.
#
diff --git a/source-builder/config/gdb-common-1.cfg b/source-builder/config/gdb-common-1.cfg
index 397d44d..49bf673 100644
--- a/source-builder/config/gdb-common-1.cfg
+++ b/source-builder/config/gdb-common-1.cfg
@@ -42,8 +42,27 @@
# 2. Does the version of gdb specify a version of python that must be
# used. Override with '%define gdb-python-version python2'.
#
-# 3. Search for 'python2' and if not found search for 'python3'.
+# 3. Search for 'python3' and if not found search for 'python2'.
#
+# User options to help find a suitable python:
+#
+# --with-python2 : name of a python2 command
+#
+# --with-python3 : name of a python2 command
+#
+# --with-python-version : name of a python command with a specific version
+#
+# For example `--with-python-version=python3.6
+#
+%if %{defined with_python2}
+ %define gdb-python2 %{with_python2}
+%endif
+%if %{defined with_python3}
+ %define gdb-python3 %{with_python3}
+%endif
+%if %{defined with_python_version}
+ %define gdb-python-version %{with_python_version}
+%endif
%if %{defined gdb-python2}
%define gdb-enable-python %{gdb_python2}
%else
@@ -53,12 +72,12 @@
%if %{defined gdb-python-version}
%define gdb-enable-python %(command -v %{gdb-python-version} || true)
%else
- %define gdb-enable-python %(command -v python2 || true)
+ %define gdb-enable-python %(command -v python3 || true)
%if %{gdb-enable-python} == %{nil}
- %define gdb-enable-python %(command -v python3 || true)
+ %define gdb-enable-python %(command -v python2 || true)
%endif
%if %{gdb-enable-python} == %{nil}
- %define gdb-enable-python %(command -v python || true})
+ %define gdb-enable-python %(command -v python || true})
%endif
%endif
%if %{gdb-enable-python} == %{nil}
@@ -79,8 +98,13 @@
%endif
%if %{gdb-python-config} == %{nil}
%define gdb-python-config %(command -v %{gdb-enable-python}-config || true)
+ %if %{gdb-python-config} == %{nil}
+ %define gdb-python-config %(command -v %(basename %{gdb-enable-python})-config || true)
+ %endif
%endif
%define gdb-python-ver-mm %(%{gdb-enable-python} --version 2>&1 | sed -e 's/.* //g' | rev | cut -d'.' -f2- | rev)
+%define gdb-python-ver-major %(echo "%{gdb-python-ver-mm}" | sed -e 's/\..*//')
+%define gdb-python-ver-minor %(echo "%{gdb-python-ver-mm}" | sed -e 's/.*\.//')
%define gdb-python-header Python.h
%define gdb-python-ver-header python%{gdb-python-ver-mm}/%{gdb-python-header}
%define gdb-python-ver-lib libpython%{gdb-python-ver-mm}.*
@@ -98,29 +122,39 @@
%if %{gdb-python-header-check} == not-found && !%{_rsb_getting_source}
%error "gdb: python: header file not found: %{gdb-python-ver-header}, please install"
%endif
-#
-# Too hard to find on MacOS (darwin), the header is good enough.
-#
-%ifnos darwin
- %if %{host_ldflags} == %{nil}
- %define gdb-host-libs %{nil}
- %else
- %define gdb-host-libs -L '%{host_ldflags}'
- %endif
- %if %{gdb-python-config} != %{nil}
- %define gdb-python-lib-filter awk 'BEGIN{FS=" "}/python/{for(i=1;i<NF;++i)if(match($i,".*lpython.*")) print "lib"substr($i,3)"*";}'
- %if %{gdb-python-ver-mm} < 3.8
- %define gdb-python-config-lib-check-flags --ldflags
- %else
- %define gdb-python-config-lib-check-flags --ldflags --embed
- %endif
- %define gdb-python-config-libs %(%{gdb-python-config} %{gdb-python-config-lib-check-flags} | %{gdb-python-lib-filter})
- %define gdb-python-lib-check %(%{_sbdir}/sb/rtems-build-dep -c %{__cc} %{gdb-host-libs} -l %{gdb-python-config-libs})
+%if %{host_ldflags} == %{nil}
+ %define gdb-host-libs %{nil}
+%else
+ %define gdb-host-libs -L '%{host_ldflags}'
+%endif
+%if %{gdb-python-config} != %{nil}
+ %define gdb-python-lib-filter awk '{for(i=1;i<NF;++i)if(match($i,".*lpython.*")) print "lib"substr($i,3)"\\*";}'
+ %define gdb-python-libpath-filter awk '{for(i=1;i<NF;++i) if (match($i,"-L.*") == 1) l[substr($i,3)]=1;} END{for(i in l) printf("-L " i " "); printf("\n");}'
+ %if %{gdb-python-ver-major} < 3 || \
+ %{gdb-python-ver-major} == 3 && %{gdb-python-ver-minor} < 8
+ %define gdb-python-config-lib-check-flags --ldflags
%else
- %define gdb-python-lib-check %(%{_sbdir}/sb/rtems-build-dep -c %{__cc} %{gdb-host-libs} -l %{gdb-python-ver-lib})
+ %define gdb-python-config-lib-check-flags --ldflags --embed
%endif
- %if %{gdb-python-lib-check} == not-found && !%{_rsb_getting_source}
- %error "gdb: python: library file not found: %{gdb-python-ver-lib}, please install"
+ %define gdb-python-config-libs %(%{gdb-python-config} %{gdb-python-config-lib-check-flags} | %{gdb-python-lib-filter})
+ %define gdb-python-config-libpath %(%{gdb-python-config} %{gdb-python-config-lib-check-flags} | %{gdb-python-libpath-filter} | uniq)
+ %define gdb-python-lib-check %(%{_sbdir}/sb/rtems-build-dep -c %{__cc} %{gdb-host-libs} %{gdb-python-config-libpath} -l %{gdb-python-config-libs})
+%else
+ %define gdb-python-lib-check %(%{_sbdir}/sb/rtems-build-dep -c %{__cc} %{gdb-host-libs} -l %{gdb-python-ver-lib})
+%endif
+%if %{gdb-python-lib-check} == not-found && !%{_rsb_getting_source}
+ %error "gdb: python: library file not found: %{gdb-python-ver-lib}, please install"
+%endif
+
+#
+# If in a virtual environment use that as GDB will look 'bin/python' under it
+# Supportted in GDB 13 and later.
+#
+%define gdb_version_major %(echo "%{gdb_version}" | sed -e 's/\..*//')
+%if %{gdb_version_major} >= 13
+ %define python-venv %(echo $VIRTUAL_ENV)
+ %if %{python-venv} != %{nil}
+ %define gdb-enable-python %{python-venv}
%endif
%endif
@@ -173,7 +207,7 @@ URL: http://www.gnu.org/software/gdb/
#
# Source
#
-%source set gdb http://ftp.gnu.org/gnu/gdb/gdb-%{gdb_version}.tar.%{gdb_src_ext}
+%source set gdb https://ftp.gnu.org/gnu/gdb/gdb-%{gdb_version}.tar.%{gdb_src_ext}
#
# Disable Python on Cxc builds for now.
diff --git a/source-builder/config/glib-2-1.cfg b/source-builder/config/glib-2-1.cfg
index 09b43fa..5f80db0 100644
--- a/source-builder/config/glib-2-1.cfg
+++ b/source-builder/config/glib-2-1.cfg
@@ -60,6 +60,7 @@ URL: https://developer.gnome.org/glib/
--build=%{_build} --host=%{_host} \
--with-sysroot=$SYSROOT \
--disable-dtrace \
+ --enable-libmount=no \
--with-pcre=internal
%{_ld_library_path}=$SYSROOT/lib \
diff --git a/source-builder/config/gmp.cfg b/source-builder/config/gmp.cfg
index ffd3b20..352caef 100644
--- a/source-builder/config/gmp.cfg
+++ b/source-builder/config/gmp.cfg
@@ -15,9 +15,23 @@ Release: %{release}
URL: https://gmplib.org/
#
+# Allow the user to override the UURL
+#
+%if %{!defined gmp_url}
+ %define gmp_url https://gmplib.org/download/gmp
+%endif
+
+#
# Source
#
-%source set gmp https://gcc.gnu.org/pub/gcc/infrastructure/gmp-%{gmp_version}.tar.bz2
+%source set gmp %{gmp_url}/gmp-%{gmp_version}.tar.bz2
+
+#
+# Allow extra options
+#
+%if %{!defined gmp_extra_options}
+ %define gmp_extra_options %{nil}
+%endif
#
# Prepare the source code.
@@ -44,7 +58,8 @@ URL: https://gmplib.org/
--exec-prefix=%{_exec_prefix} \
--includedir=%{_includedir} --libdir=%{_libdir} \
--mandir=%{_mandir} --infodir=%{_infodir} \
- --disable-shared
+ --disable-shared \
+ %{gmp_extra_options}
%{__make} %{?_smp_mflags} all
diff --git a/source-builder/config/grub2.cfg b/source-builder/config/grub2.cfg
new file mode 100644
index 0000000..174b846
--- /dev/null
+++ b/source-builder/config/grub2.cfg
@@ -0,0 +1,76 @@
+#
+# GNU GRUB, the GRand Unified Bootloader
+#
+# This configuration file configure's, make's and install's GRUB2.
+#
+
+%define grub2_platform_supported = 1
+
+%ifos darwin
+%undefine grub2_platform_supported
+%{echo "Darwin does not support Grub2 compilation by default."}
+%{echo "If you need Grub2 on Darwin, please install objconv"}
+%{echo "and enable it by removing '%undefine grub2_platform_supported' above"}
+%endif
+
+%if %{defined grub2_platform_supported}
+
+%if %{release} == %{nil}
+%define release 1
+%endif
+
+Name: grub2-%{grub2_version}-%{_host}-%{release}
+Summary: GNU GRUB, the GRand Unified Bootloader v%{grub2_version} for target %{_target} on host %{_host}
+Version: %{grub2_version}
+Release: %{release}
+URL: https://www.gnu.org/software/grub/index.html
+
+#
+# Source
+#
+%source set grub2 https://ftp.gnu.org/gnu/grub/grub-%{grub2_version}.tar.xz
+
+#
+# Prepare the source code.
+#
+%prep
+ build_top=$(pwd)
+
+ %source setup grub2 -q -n grub-%{grub2_version}
+
+ cd ${build_top}
+
+%build
+ build_top=$(pwd)
+
+ cd grub-%{grub2_version}
+
+ %{host_build_flags}
+
+ ./configure \
+ --build=%{_build} --host=%{_host} \
+ --verbose \
+ --prefix=%{_prefix} --bindir=%{_bindir} \
+ --exec-prefix=%{_exec_prefix} \
+ --includedir=%{_includedir} --libdir=%{_libdir} \
+ --mandir=%{_mandir} --infodir=%{_infodir} \
+ --with-platform=%{grub2_platform} \
+ --target=%{grub2_target} \
+ --disable-libzfs \ # broken on FreeBSD and not needed at all
+ --disable-werror # fixes compilation by GCC 12
+
+ %{__make} %{?_smp_mflags} all
+
+ cd ${build_top}
+
+%install
+ build_top=$(pwd)
+
+ rm -rf $SB_BUILD_ROOT
+
+ cd grub-%{grub2_version}
+ %{__make} DESTDIR=$SB_BUILD_ROOT install
+
+ cd ${build_top}
+
+%endif
diff --git a/source-builder/config/gsed-1.cfg b/source-builder/config/gsed-1.cfg
new file mode 100644
index 0000000..9135414
--- /dev/null
+++ b/source-builder/config/gsed-1.cfg
@@ -0,0 +1,107 @@
+#
+# GNU sed 1.xx Version 1.
+#
+# This configuration file configure's, make's and install's GNU's sed
+#
+
+%if %{release} == %{nil}
+ %define release 1
+%endif
+
+%ifn %{defined _internal_gsed}
+ %define _internal_gsed no
+%endif
+
+Name: gsed-%{gsed_version}-%{_host}-%{release}
+Summary: GNU sed v%{gsed_version} for host %{_host}
+Version: %{gsed_version}
+Release: %{release}
+URL: https://www.gnu.org/software/sed/
+
+#
+# Source
+#
+%source set gsed https://ftp.gnu.org/gnu/sed/sed-%{gsed_version}.tar.gz
+
+#
+# Remap the install paths if it is an internal build
+#
+%if %{_internal_gsed} == yes
+ %if !%{defined _internal_gsed_path}
+ %error no gsed internal install path defined
+ %endif
+ %define gsed_prefix %{_internal_gsed_path}
+%else
+ %define gsed_prefix %{_prefix}
+%endif
+
+%define gsed_exec_prefix %{gsed_prefix}
+%define gsed_bindir %{gsed_exec_prefix}/bin
+%define gsed_sbindir %{gsed_exec_prefix}/sbin
+%define gsed_libexecdir %{gsed_exec_prefix}/libexec
+%define gsed_datarootdir %{gsed_prefix}/share
+%define gsed_datadir %{gsed_datarootdir}
+%define gsed_sysconfdir %{gsed_prefix}/etc
+%define gsed_sharedstatedir %{gsed_prefix}/com
+%define gsed_localstatedir %{gsed_prefix}/var
+%define gsed_includedir %{gsed_prefix}/include
+%define gsed_libdir %{gsed_exec_prefix}/%{_lib}
+%define gsed_mandir %{gsed_datarootdir}/man
+%define gsed_infodir %{gsed_datarootdir}/info
+%define gsed_localedir %{gsed_datarootdir}/locale
+
+#
+# Prepare the source code.
+#
+%prep
+ build_top=$(pwd)
+
+ source_dir_gsed="sed-%{gsed_version}"
+ %source setup gsed -q -n sed-%{gsed_version}
+ %patch setup gsed -p1
+
+ cd ${build_top}
+
+%build
+ build_top=$(pwd)
+
+ %if %{defined _internal_gsed_path}
+ export PATH="%{_internal_gsed_path}/bin:${PATH}"
+ %endif
+
+ %{build_directory}
+
+ mkdir -p ${build_dir}
+ cd ${build_dir}
+
+ %{host_build_flags}
+
+ ../${source_dir_gsed}/configure \
+ --prefix=%{gsed_prefix} \
+ --bindir=%{gsed_bindir} \
+ --exec_prefix=%{gsed_exec_prefix} \
+ --includedir=%{gsed_includedir} \
+ --libdir=%{gsed_libdir} \
+ --libexecdir=%{gsed_libexecdir} \
+ --mandir=%{gsed_mandir} \
+ --infodir=%{gsed_infodir} \
+ --datadir=%{gsed_datadir} \
+
+ %{__make} %{?_smp_mflags} all
+
+ cd ${build_top}
+
+%install
+ build_top=$(pwd)
+
+ %{__rmdir} $SB_BUILD_ROOT
+
+ cd ${build_dir}
+
+ %if %{_internal_gsed} == yes
+ %{__make} install
+ %else
+ %{__make} DESTDIR=$SB_BUILD_ROOT install
+ %endif
+
+ cd ${build_top}
diff --git a/source-builder/config/libtool-2-1.cfg b/source-builder/config/libtool-2-1.cfg
index e834e87..52a09f7 100644
--- a/source-builder/config/libtool-2-1.cfg
+++ b/source-builder/config/libtool-2-1.cfg
@@ -4,11 +4,11 @@
# This configuration file configure's, make's and install's libtool
#
-%ifn %{defined _internal_autotools}
+%if %{!defined _internal_autotools}
%define _internal_autotools no
- %ifn %{defined _internal_autotools_path}
- %define _internal_autotools_path %{nil}
- %endif
+%endif
+%if %{!defined _internal_autotools_path}
+ %define _internal_autotools_path %{_prefix}
%endif
Name: libtool-%{libtool_version}-%{_host}-%{release}
diff --git a/source-builder/config/mpfr.cfg b/source-builder/config/mpfr.cfg
new file mode 100644
index 0000000..6d64c1a
--- /dev/null
+++ b/source-builder/config/mpfr.cfg
@@ -0,0 +1,62 @@
+#
+# The GNU Multiple-precision Floating-point computations with correct Rounding (MPFR)
+#
+# This configuration file configure's, make's and install's GMP.
+#
+
+%if %{release} == %{nil}
+%define release 1
+%endif
+
+Name: mpfr-%{mpfr_version}-%{_host}-%{release}
+Summary: The GNU Multiple-precision Floating-point computations with correct Rounding Library (MPFR)
+ v%{mpfr_version} for target %{_target} on host %{_host}
+Version: %{mpfr_version}
+Release: %{release}
+URL: https://www.mpfr.org/
+
+#
+# Source
+#
+%source set mpfr https://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
+
+#
+# Prepare the source code.
+#
+%prep
+ build_top=$(pwd)
+
+ %source setup mpfr -q -n mpfr-%{mpfr_version}
+ %patch setup mpfr -p1
+
+ cd ${build_top}
+
+%build
+ build_top=$(pwd)
+
+ cd mpfr-%{mpfr_version}
+
+ %{host_build_flags}
+
+ ./configure \
+ --build=%{_build} --host=%{_host} \
+ --verbose \
+ --prefix=%{_prefix} --bindir=%{_bindir} \
+ --exec-prefix=%{_exec_prefix} \
+ --includedir=%{_includedir} --libdir=%{_libdir} \
+ --mandir=%{_mandir} --infodir=%{_infodir} \
+ --disable-shared
+
+ %{__make} %{?_smp_mflags} all
+
+ cd ${build_top}
+
+%install
+ build_top=$(pwd)
+
+ rm -rf $SB_BUILD_ROOT
+
+ cd mpfr-%{mpfr_version}
+ %{__make} DESTDIR=$SB_BUILD_ROOT install
+
+ cd ${build_top}
diff --git a/source-builder/config/nxlib-1.cfg b/source-builder/config/nxlib-1.cfg
index d177aa4..400f7dc 100644
--- a/source-builder/config/nxlib-1.cfg
+++ b/source-builder/config/nxlib-1.cfg
@@ -17,7 +17,9 @@ URL: http://www.microwindows.org/
#
# nxlib Source
#
-%source set nxlib git://github.com/alex-sever-h/nxlib.git
+%source set nxlib \
+ --rsb-file=nxlib-%{nxlib_version}.tar.gz \
+ https://codeload.github.com/alex-sever-h/nxlib/tar.gz/%{nxlib_version}
#
# Prepare the source code.
diff --git a/source-builder/config/or1ksim-1-1.cfg b/source-builder/config/or1ksim-1-1.cfg
index 468f524..a95f1ee 100644
--- a/source-builder/config/or1ksim-1-1.cfg
+++ b/source-builder/config/or1ksim-1-1.cfg
@@ -17,7 +17,9 @@ URL: https://github.com/openrisc/or1ksim
#
# Source
#
-%source set or1ksim https://github.com/openrisc/or1ksim/archive/or1k-master.zip
+%source set or1ksim \
+ --rsb-file=or1ksim-%{or1ksim_version}.tar.gz \
+ https://codeload.github.com/openrisc/or1ksim/tar.gz/%{or1ksim_version}
#
# Prepare the source code.
diff --git a/source-builder/config/pcre-8-1.cfg b/source-builder/config/pcre-8-1.cfg
index 461967f..8d854d8 100644
--- a/source-builder/config/pcre-8-1.cfg
+++ b/source-builder/config/pcre-8-1.cfg
@@ -20,7 +20,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source
#
-%source set pcre https://ftp.pcre.org/pub/pcre/pcre-%{pcre_version}.tar.bz2
+%source set pcre https://sourceforge.net/projects/pcre/files/pcre/%{pcre_version}/pcre-%{pcre_version}.tar.bz2/download
#
# Prepare the source code.
diff --git a/source-builder/config/qemu-common-2.cfg b/source-builder/config/qemu-common-2.cfg
index 1dbaf05..56cb8e6 100644
--- a/source-builder/config/qemu-common-2.cfg
+++ b/source-builder/config/qemu-common-2.cfg
@@ -119,12 +119,12 @@ URL: http://www.qemu.org/
PKG_CONFIG_PATH=$SYSROOT/lib/pkgconfig \
PKG_CONFIG_BUILD_TOP_DIR=$SB_TMPROOT \
%{_ld_library_path}=$SYSROOT/lib \
- LDFLAGS="-Wl,-rpath -Wl,/$SB_PREFIX_CLEAN/lib -L$SYSROOT/lib ${VDE_LDFLAGS}" \
- CFLAGS="${CFLAGS} ${VDE_CFLAGS}" \
../${source_dir_qemu}/configure \
--prefix=%{_prefix} \
${CROSS_PREFIX_OPTION} \
--make=%{__make} \
+ --extra-ldflags="-Wl,-rpath -Wl,/$SB_PREFIX_CLEAN/lib -L$SYSROOT/lib ${VDE_LDFLAGS}" \
+ --extra-cflags="${CFLAGS} ${VDE_CFLAGS}" \
%{qemu_target_list} \
${VDE_CONFIG} \
%{qemu_disables}
diff --git a/source-builder/config/sis-2-1.cfg b/source-builder/config/sis-2-1.cfg
index a07b2db..a3b9515 100644
--- a/source-builder/config/sis-2-1.cfg
+++ b/source-builder/config/sis-2-1.cfg
@@ -43,7 +43,6 @@ Release: %{release}
fi
CFLAGS="$SB_CFLAGS" \
./configure \
- --build=%{_build} --host=%{_host} \
--program-prefix="$SIS_PREFIX" \
--prefix=${ac_prefix}
diff --git a/source-builder/config/swig-4-1.cfg b/source-builder/config/swig-4-1.cfg
index 6c10114..82c2cd6 100644
--- a/source-builder/config/swig-4-1.cfg
+++ b/source-builder/config/swig-4-1.cfg
@@ -16,8 +16,10 @@ URL: http://www.swig.org/
#
# Source
#
-%source set swig --rsb-file=swig-rel-%{swig_version}.tar.gz https://github.com/swig/swig/archive/rel-%{swig_version}.tar.gz
-%source set pcre https://ftp.pcre.org/pub/pcre/pcre-%{pcre_version}.tar.bz2
+%source set swig --rsb-file=swig-rel-%{swig_version}.tar.gz \
+ https://github.com/swig/swig/archive/rel-%{swig_version}.tar.gz
+%source set pcre --rsb-file=pcre-%{pcre_version}.tar.bz2 \
+ https://sourceforge.net/projects/pcre/files/pcre/%{pcre_version}/pcre-%{pcre_version}.tar.bz2/download
#
# See if a special swig prefix is provided
diff --git a/source-builder/config/texinfo-1.cfg b/source-builder/config/texinfo-1.cfg
new file mode 100644
index 0000000..d1fc2a0
--- /dev/null
+++ b/source-builder/config/texinfo-1.cfg
@@ -0,0 +1,107 @@
+#
+# GNU texinfo 7.xx Version 1.
+#
+# This configuration file configure's, make's and install's GNU's texinfo
+#
+
+%if %{release} == %{nil}
+ %define release 1
+%endif
+
+%ifn %{defined _internal_texinfo}
+ %define _internal_texinfo no
+%endif
+
+Name: texinfo-%{texinfo_version}-%{_host}-%{release}
+Summary: GNU texinfo v%{texinfo_version} for host %{_host}
+Version: %{texinfo_version}
+Release: %{release}
+URL: https://www.gnu.org/software/texinfo/
+
+#
+# Source
+#
+%source set texinfo https://ftp.gnu.org/gnu/texinfo/texinfo-%{texinfo_version}.tar.gz
+
+#
+# Remap the install paths if it is an internal build
+#
+%if %{_internal_texinfo} == yes
+ %if !%{defined _internal_texinfo_path}
+ %error no texinfo internal install path defined
+ %endif
+ %define texinfo_prefix %{_internal_texinfo_path}
+%else
+ %define texinfo_prefix %{_prefix}
+%endif
+
+%define texinfo_exec_prefix %{texinfo_prefix}
+%define texinfo_bindir %{texinfo_exec_prefix}/bin
+%define texinfo_sbindir %{texinfo_exec_prefix}/sbin
+%define texinfo_libexecdir %{texinfo_exec_prefix}/libexec
+%define texinfo_datarootdir %{texinfo_prefix}/share
+%define texinfo_datadir %{texinfo_datarootdir}
+%define texinfo_sysconfdir %{texinfo_prefix}/etc
+%define texinfo_sharedstatedir %{texinfo_prefix}/com
+%define texinfo_localstatedir %{texinfo_prefix}/var
+%define texinfo_includedir %{texinfo_prefix}/include
+%define texinfo_libdir %{texinfo_exec_prefix}/%{_lib}
+%define texinfo_mandir %{texinfo_datarootdir}/man
+%define texinfo_infodir %{texinfo_datarootdir}/info
+%define texinfo_localedir %{texinfo_datarootdir}/locale
+
+#
+# Prepare the source code.
+#
+%prep
+ build_top=$(pwd)
+
+ source_dir_texinfo="texinfo-%{texinfo_version}"
+ %source setup texinfo -q -n texinfo-%{texinfo_version}
+ %patch setup texinfo -p1
+
+ cd ${build_top}
+
+%build
+ build_top=$(pwd)
+
+ %if %{defined _internal_texinfo_path}
+ export PATH="%{_internal_texinfo_path}/bin:${PATH}"
+ %endif
+
+ %{build_directory}
+
+ mkdir -p ${build_dir}
+ cd ${build_dir}
+
+ %{host_build_flags}
+
+ ../${source_dir_texinfo}/configure \
+ --prefix=%{texinfo_prefix} \
+ --bindir=%{texinfo_bindir} \
+ --exec_prefix=%{texinfo_exec_prefix} \
+ --includedir=%{texinfo_includedir} \
+ --libdir=%{texinfo_libdir} \
+ --libexecdir=%{texinfo_libexecdir} \
+ --mandir=%{texinfo_mandir} \
+ --infodir=%{texinfo_infodir} \
+ --datadir=%{texinfo_datadir} \
+
+ %{__make} %{?_smp_mflags} all
+
+ cd ${build_top}
+
+%install
+ build_top=$(pwd)
+
+ %{__rmdir} $SB_BUILD_ROOT
+
+ cd ${build_dir}
+
+ %if %{_internal_texinfo} == yes
+ %{__make} install
+ %else
+ %{__make} DESTDIR=$SB_BUILD_ROOT install
+ %endif
+
+ cd ${build_top}
diff --git a/source-builder/defaults.mc b/source-builder/defaults.mc
index 8ed7003..6575e35 100644
--- a/source-builder/defaults.mc
+++ b/source-builder/defaults.mc
@@ -98,7 +98,7 @@ _host_cc: none, none, 'gcc'
_host_cxx: none, none, 'g++'
_arch: none, none, '%{_host_arch}'
_topdir: dir, required, '%{_cwd}'
-_configdir: dir, optional, '%{_topdir}/config:%{_sbdir}/config:%{_sbtop}/bare/config'
+_configdir: dir, optional, '%{_topdir}/config:%{_sbdir}/config:%{_sbtop}/bare/config:%{_sbtop}/rtems/config'
_tardir: dir, optional, '%{_topdir}/tar'
_sourcedir: dir, optional, '%{_topdir}/sources'
_patchdir: dir, optional, '%{_topdir}/patches:%{_sbdir}/patches'
@@ -109,6 +109,7 @@ _docdir: dir, none, '%{_defaultdocdir}'
_tmppath: dir, none, '%{_topdir}/build/tmp'
_tmproot: dir, none, '%{_tmppath}/sb-%{_uid}/%{_bset_tmp}'
_tmpcxcroot: dir, none, '%{_tmppath}/sb-%{_uid}-cxc/%{_bset_tmp}'
+_tmpinternal: dir, none, '%{_tmppath}/sb-%{_uid}-internal'
_datadir: dir, none, '%{_prefix}/share'
_defaultdocdir: dir, none, '%{_prefix}/share/doc'
_dry_run: none, none, '0'
@@ -131,7 +132,7 @@ _infodir: dir, none, '%{_datarootdir}/info'
_localedir: dir, none, '%{_datarootdir}/locale'
_localedir: dir, none, '%{_datadir}/locale'
_localstatedir: dir, none, '%{_prefix}/var'
-_pathprepend: none, none, ''
+_pathprepend: none, none, '%{_tmpinternal}/bin'
_pathpostpend: none, none, ''
_prefix: dir, none, '%{_usr}'
_usr: dir, none, '/usr/local'
@@ -179,18 +180,17 @@ __ld: exe, required, '/usr/bin/ld'
__ldconfig: exe, required, '/sbin/ldconfig'
__ln_s: exe, none, 'ln -s'
__make: exe, required, 'make'
-__makeinfo: exe, required, '/usr/bin/makeinfo'
+__makeinfo: exe, optional, '/usr/bin/makeinfo'
__mkdir: exe, required, '/bin/mkdir'
__mkdir_p: exe, none, '/bin/mkdir -p'
__mv: exe, required, '/bin/mv'
__nm: exe, required, '/usr/bin/nm'
-__objcopy: exe, optional, '/usr/bin/objcopy'
-__objdump: exe, optional, '/usr/bin/objdump'
+__objcopy: exe, none, '/usr/bin/objcopy'
+__objdump: exe, none, '/usr/bin/objdump'
__patch_bin: exe, required, '/usr/bin/patch'
__patch_opts: none, none, '%{nil}'
__patch: exe, none, '%{__patch_bin} %{__patch_opts}'
__perl: exe, optional, 'perl'
-__svn: exe, optional, '/usr/bin/svn'
__ranlib: exe, required, 'ranlib'
__rm: exe, required, '/bin/rm'
__rmfile: exe, none, '%{__rm} -f'
diff --git a/source-builder/pkg-config b/source-builder/pkg-config
index 10db546..8d0a174 100755
--- a/source-builder/pkg-config
+++ b/source-builder/pkg-config
@@ -86,6 +86,19 @@ def log(s, lf = True):
sys.stdout.flush()
print(s, end = '', file = out)
+def cflags_filter(cflags, prefixes, include=True):
+ cflags = cflags.split(' ')
+ f_cflags = []
+ for f in cflags:
+ for p in prefixes:
+ if f.startswith(p):
+ f_cflags += [f]
+ if not include:
+ not_f_cflags = [f for f in cflags if f not in f_cflags]
+ f_cflags = not_f_cflags
+ return ' '.join(f_cflags)
+
+
def run(argv):
class version_action(argparse.Action):
@@ -110,6 +123,7 @@ def run(argv):
help = 'Make error messages short.')
opts.add_argument('--silence-errors', dest = 'silence_errors', action = 'store_true',
default = False,
+
help = 'Do not print any errors.')
opts.add_argument('--errors-to-stdout', dest = 'errors_to_stdout', action = 'store_true',
default = False,
@@ -118,6 +132,14 @@ def run(argv):
default = False,
help = 'This prints pre-processor and compile flags required to' \
' compile the package(s)')
+ opts.add_argument('--cflags-only-I', dest = 'cflags_only_i', action = 'store_true',
+ default = False,
+ help = 'This prints the -I part of "--cflags". That is, it defines the header' \
+ 'search path but doesn\'t specify anything else.')
+ opts.add_argument('--cflags-only-other', dest = 'cflags_only_other', action = 'store_true',
+ default = False,
+ help = 'Return all compiler flags, other than the include path flags, ' \
+ 'required to compile against the package.')
opts.add_argument('--libs', dest = 'libs', action = 'store_true',
default = False,
help = 'This option is identical to "--cflags", only it prints the' \
@@ -193,6 +215,20 @@ def run(argv):
log('cflags: %s' % (flags['cflags']))
else:
log('cflags: empty')
+ if args.cflags_only_i:
+ cflags = cflags_filter(flags['cflags'], ['-I', '-system'], True)
+ if len(cflags):
+ print(cflags)
+ log('cflags: %s' % (flags['cflags']))
+ else:
+ log('cflags: empty')
+ if args.cflags_only_other:
+ cflags = cflags_filter(flags['cflags'], ['-I', '-system'], False)
+ if len(cflags):
+ print(cflags)
+ log('cflags: %s' % (flags['cflags']))
+ else:
+ log('cflags: empty')
if args.libs:
if len(flags['libs']):
print(flags['libs'])
diff --git a/source-builder/sb-rtems-pkg b/source-builder/sb-rtems-pkg
new file mode 100755
index 0000000..99ed26c
--- /dev/null
+++ b/source-builder/sb-rtems-pkg
@@ -0,0 +1,29 @@
+#! /usr/bin/env python
+#
+# RTEMS Tools Project (http://www.rtems.org/)
+# Copyright 2024 Chris Johns (chrisj@rtems.org)
+# All rights reserved.
+#
+# This file is part of the RTEMS Tools package in 'rtems-tools'.
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+from __future__ import print_function
+
+try:
+ import sb.rtemspkg
+ sb.rtemspkg.run()
+except ImportError:
+ import sys
+ print("Incorrect Source Builder installation", file = sys.stderr)
+ sys.exit(1)
diff --git a/source-builder/sb/build.py b/source-builder/sb/build.py
index 16a495b..5b80912 100644
--- a/source-builder/sb/build.py
+++ b/source-builder/sb/build.py
@@ -76,6 +76,14 @@ class script:
def __init__(self):
self.reset()
+ def __str__(self):
+ i = 0
+ text = []
+ for l in self.body:
+ i += 1
+ text += ['script:%3d: %s' % (self.lc + i, l)]
+ return os.linesep.join(text)
+
def reset(self):
self.body = []
self.lc = 0
@@ -103,7 +111,7 @@ class script:
s = None
try:
s = open(path.host(name), 'w')
- s.write('\n'.join(self.body))
+ s.write(os.linesep.join(self.body))
s.close()
os.chmod(path.host(name), stat.S_IRWXU | \
stat.S_IRGRP | stat.S_IXGRP | \
@@ -434,8 +442,8 @@ class build:
def builddir(self):
builddir = self.config.abspath('_builddir')
- self.rmdir(builddir)
if not self.opts.dry_run():
+ self.rmdir(builddir)
self.mkdir(builddir)
def prep(self, package):
@@ -583,12 +591,16 @@ class build:
self.script_build.append('echo "=> ' + name + ': BUILD"')
self.prep(package)
self.build_package(package)
+ self.builddir()
+ build_sn = path.join(self.config.expand('%{_builddir}'), 'do-build')
+ clean_sn = path.join(self.config.expand('%{_builddir}'), 'do-clean')
+ log.trace('script: ' + build_sn)
+ log.trace(str(self.script_build))
+ log.trace('script: ' + clean_sn)
+ log.trace(str(self.script_clean))
if not self.opts.dry_run():
- self.builddir()
- build_sn = path.join(self.config.expand('%{_builddir}'), 'do-build')
log.output('write script: ' + build_sn)
self.script_build.write(build_sn)
- clean_sn = path.join(self.config.expand('%{_builddir}'), 'do-clean')
log.output('write script: ' + clean_sn)
self.script_clean.write(clean_sn)
log.notice('building: %s%s' % (cxc_label, name))
diff --git a/source-builder/sb/config.py b/source-builder/sb/config.py
index 5bc96e2..06762d6 100644
--- a/source-builder/sb/config.py
+++ b/source-builder/sb/config.py
@@ -68,6 +68,13 @@ def _check_nil(value):
istrue = False
return istrue
+def _check_number(value):
+ try:
+ float(value)
+ return True
+ except ValueError:
+ return False
+
class package:
def __init__(self, name, arch, config):
@@ -251,7 +258,7 @@ class file:
re.compile('%select'),
re.compile('%disable') ]
- def __init__(self, name, opts, macros = None):
+ def __init__(self, name, opts, macros = None, load = True):
log.trace('config: %s: initialising' % (name))
self.opts = opts
self.init_name = name
@@ -260,7 +267,8 @@ class file:
self.sf = re.compile(r'%\([^\)]+\)')
self.set_macros(macros)
self._reset(name)
- self.load(name)
+ if load:
+ self.load(name)
def __str__(self):
@@ -778,7 +786,16 @@ class file:
mn = '%{nil}'
if mn:
if mn.lower() in self.macros:
- s = s.replace(m, self.macros[mn.lower()])
+ em = self.macros[mn.lower()]
+ if self.macros.get_type(mn) == 'dir' and ':' in em:
+ ss = []
+ for sp in s.split():
+ if m in sp:
+ sp = ':'.join([sp.replace(mn, ps) for ps in em.split(':')])
+ ss += [sp]
+ s = ' '.join(ss)
+ else:
+ s = s.replace(m, self.macros[mn.lower()])
expanded = True
elif show_warning:
self._error("macro '%s' not found" % (mn))
@@ -915,6 +932,12 @@ class file:
(self.name, self.lc,
self.if_depth,
join_op))
+ # If OR and the previous check was true short circuit the evaluation
+ if join_op == 'or' and cistrue:
+ log.trace('config: %s: %3d: _if[%i]: OR true, short circuit eval' % \
+ (self.name, self.lc,
+ self.if_depth))
+ break
ori = 0
andi = 0
i = len(cls)
@@ -935,10 +958,8 @@ class file:
i = andi
elif andi == 0:
i = ori
- elif ori < andi:
- i = andi
else:
- i = andi
+ i = min(ori, andi)
log.trace('config: %s: %3d: _if[%i]: next OP found at %i' % \
(self.name, self.lc,
self.if_depth,
@@ -996,37 +1017,27 @@ class file:
ifls = (' '.join(ifls[:op_pos]), op, ' '.join(ifls[op_pos + 1:]))
break
if len(ifls) != 3:
- self._error('malformed if: ' + reduce(add, ls, ''))
- if ifls[1] == '==':
- if ifls[0] == ifls[2]:
- istrue = True
- else:
- istrue = False
- elif ifls[1] == '!=' or ifls[1] == '=!':
- if ifls[0] != ifls[2]:
- istrue = True
- else:
- istrue = False
- elif ifls[1] == '>':
- if ifls[0] > ifls[2]:
- istrue = True
- else:
- istrue = False
- elif ifls[1] == '>=' or ifls[1] == '=>':
- if ifls[0] >= ifls[2]:
- istrue = True
- else:
- istrue = False
- elif ifls[1] == '<=' or ifls[1] == '=<':
- if ifls[0] <= ifls[2]:
- istrue = True
- else:
- istrue = False
- elif ifls[1] == '<':
- if ifls[0] < ifls[2]:
- istrue = True
- else:
- istrue = False
+ self._error('malformed if: ' + reduce(add, ls, ''))
+ lhs = ifls[0]
+ operator = ifls[1]
+ rhs = ifls[2]
+ if _check_number(lhs) and _check_number(rhs):
+ log.trace('config: %s: %3d: _if: numeric value check' % \
+ (self.name, self.lc))
+ lhs = float(lhs)
+ rhs = float(rhs)
+ if operator == '==':
+ istrue = lhs == rhs
+ elif operator == '!=' or operator == '=!':
+ istrue = lhs != rhs
+ elif operator == '>':
+ istrue = lhs > rhs
+ elif operator == '>=' or operator == '=>':
+ istrue = lhs >= rhs
+ elif operator == '<=' or operator == '=<':
+ istrue = lhs <= rhs
+ elif operator == '<':
+ istrue = lhs < rhs
else:
self._error('invalid %if operator: ' + reduce(add, ls, ''))
@@ -1344,6 +1355,14 @@ class file:
right = right[:-1]
return end
+ def search_path(confignames):
+ for configname in confignames.split(':'):
+ if not configname.endswith('.cfg'):
+ configname = '%s.cfg' % (configname)
+ if path.exists(configname):
+ return configname
+ return None
+
if self.load_depth == 0:
self._packages[self.package] = package(self.package,
self.define('%{_arch}'),
@@ -1357,7 +1376,7 @@ class file:
#
# Locate the config file. Expand any macros then add the
- # extension. Check if the file exists, therefore directly
+ # extension. Check if the file exists then it is directly
# referenced. If not see if the file contains ':' or the path
# separator. If it does split the path else use the standard config dir
# path in the defaults.
@@ -1365,32 +1384,13 @@ class file:
exname = self.expand(name)
- #
- # Macro could add an extension.
- #
- if exname.endswith('.cfg'):
- configname = exname
- else:
- configname = '%s.cfg' % (exname)
- name = '%s.cfg' % (name)
-
- if ':' in configname:
- cfgname = path.basename(configname)
- else:
- cfgname = common_end(configname, name)
+ configname = search_path(exname)
+ if configname is None:
+ configname = search_path(self.expand(path.join('%{_configdir}', exname)))
+ if configname is None:
+ raise error.general('no config file found: %s' % (','.join(exname.split(':'))))
- if not path.exists(configname):
- if ':' in configname:
- configdirs = path.dirname(configname).split(':')
- else:
- configdirs = self.define('_configdir').split(':')
- for cp in configdirs:
- configname = path.join(path.abspath(cp), cfgname)
- if path.exists(configname):
- break
- configname = None
- if configname is None:
- raise error.general('no config file found: %s' % (cfgname))
+ name = path.basename(configname)
try:
log.trace('config: %s: _open: %s' % (self.name, path.host(configname)))
diff --git a/source-builder/sb/download.py b/source-builder/sb/download.py
index 410edeb..0201675 100644
--- a/source-builder/sb/download.py
+++ b/source-builder/sb/download.py
@@ -85,6 +85,8 @@ def _hash_check(file_, absfile, macros, remove = True):
hash = hash.split()
if len(hash) != 2:
raise error.internal('invalid hash format: %s' % (file_))
+ if hash[0] == 'NO-HASH':
+ return not failed
try:
hashlib_algorithms = hashlib.algorithms
except:
@@ -132,9 +134,7 @@ def _hash_check(file_, absfile, macros, remove = True):
if hasher is not None:
del hasher
else:
- if version.released():
- raise error.general('%s: no hash found in released RSB' % (file_))
- log.warning('%s: no hash found' % (file_))
+ raise error.general('%s: no hash found' % (file_))
return not failed
def _local_path(source, pathkey, config):
@@ -191,7 +191,7 @@ def _http_parser(source, pathkey, config, opts):
#
# Wipe out everything special in the file name.
#
- source['file'] = re.sub(r'[^a-zA-Z0-9.\-]+', '-', source['file'])
+ source['file'] = re.sub(r'[^a-zA-Z0-9.\-_]+', '-', source['file'])
max_file_len = 127
if len(source['file']) > max_file_len:
raise error.general('file name length is greater than %i (maybe use --rsb-file=FILE option): %s' % \
@@ -481,7 +481,8 @@ def _git_downloader(url, local, config, opts):
else:
repo.clean(['-f', '-d'])
repo.reset('--hard')
- repo.checkout('master')
+ default_branch = repo.default_branch()
+ repo.checkout(default_branch)
for a in us[1:]:
_as = a.split('=')
if _as[0] == 'branch' or _as[0] == 'checkout':
diff --git a/source-builder/sb/ereport.py b/source-builder/sb/ereport.py
index d8fb5f6..52ee2eb 100755
--- a/source-builder/sb/ereport.py
+++ b/source-builder/sb/ereport.py
@@ -54,7 +54,9 @@ def generate(name, opts, header = None, footer = None):
name = name.replace('/', '-')
with open(name, 'w') as l:
l.write(os.linesep.join(r))
- log.notice(' See error report: %s' % (name))
+ log.notice(os.linesep.join([' See error report: %s' % (name),
+ ' Note: In some cases the error appears only in',
+ ' the complete build log (see --log option)']))
except:
log.stderr('error: failure to create error report')
raise
diff --git a/source-builder/sb/execute.py b/source-builder/sb/execute.py
index 3db9abc..b491c47 100755
--- a/source-builder/sb/execute.py
+++ b/source-builder/sb/execute.py
@@ -27,6 +27,7 @@
from __future__ import print_function
import functools
+import codecs
import io
import os
import re
@@ -181,6 +182,10 @@ class execute(object):
if trace_threads:
print('execute:_readthread: start')
+ if sys.stdout.encoding is not None:
+ decoder = codecs.getincrementaldecoder(sys.stdout.encoding)()
+ else:
+ decoder = None
count = 0
line = ''
try:
@@ -200,8 +205,8 @@ class execute(object):
_output_line(line + '\n', exe, prefix, out, count)
break
# str and bytes are the same type in Python2
- if type(data) is not str and type(data) is bytes:
- data = data.decode(sys.stdout.encoding)
+ if decoder is not None and type(data) is not str and type(data) is bytes:
+ data = decoder.decode(data)
last_ch = data[-1]
sd = (line + data).split('\n')
if last_ch != '\n':
diff --git a/source-builder/sb/freebsd.py b/source-builder/sb/freebsd.py
index 472f670..628ef22 100644
--- a/source-builder/sb/freebsd.py
+++ b/source-builder/sb/freebsd.py
@@ -101,22 +101,24 @@ def load():
cxx = '/usr/bin/clang++'
if check.check_exe(cxx, cxx):
raise error.general('no valid c++ found')
- #
- # Assume the compiler is clang and so we need to increase
- # bracket depth build build the gcc ARM compiler.
- #
- defines['build_cflags'] = '-O2 -pipe -fbracket-depth=1024'
- defines['build_cxxflags'] = '-O2 -pipe -fbracket-depth=1024'
cvs = 'cvs'
if check.check_exe(cvs, cvs):
defines['__cvs'] = cvs
+ defines['build_cflags'] = '-O2 -pipe'
+ defines['build_cxxflags'] = '-O2 -pipe'
+ if fb_version <= 12:
+ #
+ # Assume the compiler is clang and so we need to increase
+ # bracket depth build build the gcc ARM compiler.
+ #
+ defines['build_cflags'] += ' -fbracket-depth=1024'
+ defines['build_cxxflags'] += ' -fbracket-depth=1024'
#
# Fix the mess iconv is on FreeBSD 10.0 and higher.
#
defines['iconv_includes'] = ('none', 'none', '%{host_includes} %{host_ldflags}')
if fb_version >= 12:
defines['iconv_prefix'] = ('none', 'none', '%{_usr}')
-
#
# On 11.0+ makeinfo and install-info have moved to /usr/local/...
#
diff --git a/source-builder/sb/getsources.py b/source-builder/sb/getsources.py
index d348da4..eb5c855 100644
--- a/source-builder/sb/getsources.py
+++ b/source-builder/sb/getsources.py
@@ -60,7 +60,9 @@ def run(args = sys.argv):
default = version.version())
argsp.add_argument('--list-hosts', help = 'List the hosts.',
action = 'store_true')
- argsp.add_argument('--list-bsets', help = 'List the hosts.',
+ argsp.add_argument('--list-bsets', help = 'List the buildsets.',
+ action = 'store_true')
+ argsp.add_argument('--list-root-bsets', help = 'List the toplevel or root buildsets.',
action = 'store_true')
argsp.add_argument('--download-dir', help = 'Download directory.',
type = str)
@@ -71,8 +73,14 @@ def run(args = sys.argv):
argsp.add_argument('--log', help = 'Log file.',
type = str,
default = simhost.log_default('getsource'))
+ argsp.add_argument('--stop-on-error', help = 'Stop on error.',
+ action = 'store_true')
argsp.add_argument('--trace', help = 'Enable trace logging for debugging.',
action = 'store_true')
+ argsp.add_argument('--used', help = 'Save the used buildset and config files.',
+ type = str, default = None)
+ argsp.add_argument('--unused', help = 'Save the unused buildset and config files.',
+ type = str, default = None)
argsp.add_argument('bsets', nargs='*', help = 'Build sets.')
argopts = argsp.parse_args(args[1:])
@@ -84,10 +92,14 @@ def run(args = sys.argv):
opts = simhost.load_options(args, argopts, extras = ['--with-download'])
configs = build.get_configs(opts)
+ stop_on_error = argopts.stop_on_error
+
if argopts.list_hosts:
simhost.list_hosts()
elif argopts.list_bsets:
simhost.list_bset_files(opts, configs)
+ elif argopts.list_root_bsets:
+ simhost.list_root_bset_files(opts, configs)
else:
if argopts.clean:
if argopts.download_dir is None:
@@ -95,11 +107,11 @@ def run(args = sys.argv):
if path.exists(argopts.download_dir):
log.notice('Cleaning source directory: %s' % (argopts.download_dir))
path.removeall(argopts.download_dir)
- all_bsets = simhost.get_bset_files(configs)
if len(argopts.bsets) == 0:
- bsets = all_bsets
+ bsets = simhost.get_root_bset_files(opts, configs)
else:
bsets = argopts.bsets
+ deps = copy.copy(simhost.strip_common_prefix(bsets))
for bset in bsets:
b = None
try:
@@ -108,11 +120,23 @@ def run(args = sys.argv):
b = simhost.buildset(bset, configs, opts)
get_sources_error = False
b.build(host)
+ deps += b.deps()
del b
except error.general as gerr:
+ if stop_on_error:
+ raise
log.stderr(str(gerr))
log.stderr('Build FAILED')
b = None
+ deps = sorted(list(set(deps)))
+ if argopts.used:
+ with open(argopts.used, 'w') as o:
+ o.write(os.linesep.join(deps))
+ if argopts.unused:
+ cfgs_bsets = \
+ [cb for cb in simhost.get_config_bset_files(opts, configs) if not cb in deps]
+ with open(argopts.unused, 'w') as o:
+ o.write(os.linesep.join(cfgs_bsets))
except error.general as gerr:
if get_sources_error:
log.stderr(str(gerr))
diff --git a/source-builder/sb/git.py b/source-builder/sb/git.py
index 237e690..0aa4da9 100644
--- a/source-builder/sb/git.py
+++ b/source-builder/sb/git.py
@@ -226,6 +226,18 @@ class repo:
hash = l1[len('commit '):]
return hash
+ def default_branch(self):
+ ec, output = self._run(['remote', 'show'])
+ if ec == 0:
+ origin = output.split('\n')[0]
+ ec, output = self._run(['remote', 'show', origin])
+ if ec == 0:
+ for l in output.split('\n'):
+ l = l.strip()
+ if l.startswith('HEAD branch: '):
+ return l[len('HEAD branch: '):]
+ return None
+
if __name__ == '__main__':
import os.path
import sys
diff --git a/source-builder/sb/linux.py b/source-builder/sb/linux.py
index d89377b..45f88b0 100644
--- a/source-builder/sb/linux.py
+++ b/source-builder/sb/linux.py
@@ -28,6 +28,7 @@ import pprint
import os
from . import path
+from . import log
def load():
uname = os.uname()
@@ -56,40 +57,11 @@ def load():
}
# platform.dist() was removed in Python 3.8
- if hasattr(platform, 'dist'):
- # Works for LSB distros
- try:
- distro = platform.dist()[0]
- distro_ver = float(platform.dist()[1])
- except ValueError:
- # Non LSB distro found, use failover"
- pass
- else:
- distro = ''
-
- # Non LSB - fail over to issue
- if distro == '':
- try:
- issue = open('/etc/issue').read()
- distro = issue.split(' ')[0]
- distro_ver = float(issue.split(' ')[2])
- except:
- pass
-
- # Manage distro aliases
- if distro in ['centos']:
- distro = 'redhat'
- elif distro in ['fedora']:
- if distro_ver < 17:
- distro = 'redhat'
- elif distro in ['centos', 'fedora']:
- distro = 'redhat'
- elif distro in ['Ubuntu', 'ubuntu', 'MX', 'LinuxMint', 'linuxmint']:
- distro = 'debian'
- elif distro in ['Arch']:
- distro = 'arch'
- elif distro in ['SuSE']:
- distro = 'suse'
+ # The distro module (introduced in Python 3.6, back-ported to 2.6)
+ # is preferred.
+ distro = ''
+ distro_like = ''
+ distro_ver = 0
variations = {
'debian' : { '__bzip2': ('exe', 'required', '/bin/bzip2'),
@@ -118,10 +90,63 @@ def load():
'__sed': ('exe', 'required', '/bin/sed') },
}
+ try:
+ import distro as distro_mod
+ distro = distro_mod.id()
+ distro_like = distro_mod.like()
+ try:
+ distro_ver = float(distro_mod.version())
+ except ValueError:
+ pass
+ except:
+ pass
+
+ if distro == '' and hasattr(platform, 'dist'):
+ distro = platform.dist()[0]
+ try:
+ distro_ver = float(platform.dist()[1])
+ except ValueError:
+ pass
+
+ # Non LSB - last resort, try issue
+ if distro == '':
+ try:
+ with open('/etc/issue') as f:
+ issue = f.read().split(' ')
+ distro = issue[0]
+ distro_ver = float(issue[2])
+ except:
+ pass
+
+ if distro:
+ distro = distro.lower()
+ if distro_like:
+ distro_like = distro_like.lower().split(' ')[0]
+
+ # Some additional distro aliases
+ if distro in ['centos']:
+ distro_like = 'redhat'
+ elif distro in ['fedora']:
+ if distro_ver < 17:
+ distro_like = 'redhat'
+ elif distro in ['ubuntu', 'mx', 'linuxmint']:
+ distro_like = 'debian'
+
+ if not (distro in variations) and (distro_like in variations):
+ distro = distro_like
+ # Versions don't carry over to likes; e.g. linuxmint 21.6 != debian 21.6.
+ distro_ver = 0
+
if distro in variations:
for v in variations[distro]:
if path.exists(variations[distro][v][2]):
defines[v] = variations[distro][v]
+ else:
+ log.warning('Unrecognized OS distro; assuming defaults for grep, sed, etc.')
+ try:
+ distro_mod
+ except:
+ log.warning("The 'distro' package may fix this problem; try 'pip install distro'.")
defines['_build'] = defines['_host']
defines['_build_vendor'] = defines['_host_vendor']
diff --git a/source-builder/sb/mailer.py b/source-builder/sb/mailer.py
index ff25df5..aafe6d6 100644
--- a/source-builder/sb/mailer.py
+++ b/source-builder/sb/mailer.py
@@ -1,21 +1,33 @@
#
# RTEMS Tools Project (http://www.rtems.org/)
-# Copyright 2013 Chris Johns (chrisj@rtems.org)
+# Copyright 2013-2016 Chris Johns (chrisj@rtems.org)
+# Copyright (C) 2021 On-Line Applications Research Corporation (OAR)
# All rights reserved.
#
# This file is part of the RTEMS Tools package in 'rtems-tools'.
#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
# Manage emailing results or reports.
@@ -28,18 +40,72 @@ import smtplib
import socket
from . import error
+from . import execute
from . import options
from . import path
+_options = {
+ '--mail' : 'Send email report or results.',
+ '--use-gitconfig': 'Use mail configuration from git config.',
+ '--mail-to' : 'Email address to send the email to.',
+ '--mail-from' : 'Email address the report is from.',
+ '--smtp-host' : 'SMTP host to send via.',
+ '--smtp-port' : 'SMTP port to send via.',
+ '--smtp-user' : 'User for SMTP authentication.',
+ '--smtp-password': 'Password for SMTP authentication.'
+}
+
def append_options(opts):
- opts['--mail'] = 'Send email report or results.'
- opts['--smtp-host'] = 'SMTP host to send via.'
- opts['--mail-to'] = 'Email address to send the email too.'
- opts['--mail-from'] = 'Email address the report is from.'
+ for o in _options:
+ opts[o] = _options[o]
+
+def add_arguments(argsp):
+ argsp.add_argument('--mail', help = _options['--mail'], action = 'store_true')
+ argsp.add_argument('--use-gitconfig', help = _options['--use-gitconfig'], action = 'store_true')
+ no_add = ['--mail', '--use-gitconfig']
+ for o in [opt for opt in list(_options) if opt not in no_add]:
+ argsp.add_argument(o, help = _options[o], type = str)
class mail:
def __init__(self, opts):
self.opts = opts
+ self.gitconfig_lines = None
+ if opts.find_arg('--use-gitconfig') is not None:
+ # Read the output of `git config --list` instead of reading the
+ # .gitconfig file directly because Python 2 ConfigParser does not
+ # accept tabs at the beginning of lines.
+ e = execute.capture_execution()
+ exit_code, proc, output = e.open('git config --list', shell=True)
+ if exit_code == 0:
+ self.gitconfig_lines = output.split(os.linesep)
+
+ def _args_are_macros(self):
+ return isinstance(self.opts, options.command_line)
+
+ def _get_arg(self, arg):
+ if self._args_are_macros():
+ value = self.opts.find_arg(arg)
+ if value is not None:
+ value = self.opts.find_arg(arg)[1]
+ else:
+ if arg.startswith('--'):
+ arg = arg[2:]
+ arg = arg.replace('-', '_')
+ if arg in vars(self.opts):
+ value = vars(self.opts)[arg]
+ else:
+ value = None
+ return value
+
+ def _get_from_gitconfig(self, variable_name):
+ if self.gitconfig_lines is None:
+ return None
+
+ for line in self.gitconfig_lines:
+ if line.startswith(variable_name):
+ ls = line.split('=')
+ if len(ls) >= 2:
+ return ls[1]
def from_address(self):
@@ -52,9 +118,15 @@ class mail:
l = l[:l.index('\n')]
return l.strip()
- addr = self.opts.get_arg('--mail-from')
+ addr = self._get_arg('--mail-from')
if addr is not None:
- return addr[1]
+ return addr
+ addr = self._get_from_gitconfig('user.email')
+ if addr is not None:
+ name = self._get_from_gitconfig('user.name')
+ if name is not None:
+ addr = '%s <%s>' % (name, addr)
+ return addr
mailrc = None
if 'MAILRC' in os.environ:
mailrc = os.environ['MAILRC']
@@ -63,9 +135,8 @@ class mail:
if mailrc is not None and path.exists(mailrc):
# set from="Joe Blow <joe@blow.org>"
try:
- mrc = open(mailrc, 'r')
- lines = mrc.readlines()
- mrc.close()
+ with open(mailrc, 'r') as mrc:
+ lines = mrc.readlines()
except IOError as err:
raise error.general('error reading: %s' % (mailrc))
for l in lines:
@@ -76,40 +147,99 @@ class mail:
addr = fa[fa.index('=') + 1:].replace('"', ' ').strip()
if addr is not None:
return addr
- addr = self.opts.defaults.get_value('%{_sbgit_mail}')
+ if self._args_are_macros():
+ addr = self.opts.defaults.get_value('%{_sbgit_mail}')
+ else:
+ raise error.general('no valid from address for mail')
return addr
def smtp_host(self):
- host = self.opts.get_arg('--smtp-host')
+ host = self._get_arg('--smtp-host')
if host is not None:
- return host[1]
- host = self.opts.defaults.get_value('%{_mail_smtp_host}')
+ return host
+ host = self._get_from_gitconfig('sendemail.smtpserver')
+ if host is not None:
+ return host
+ if self._args_are_macros():
+ host = self.opts.defaults.get_value('%{_mail_smtp_host}')
if host is not None:
return host
return 'localhost'
+ def smtp_port(self):
+ port = self._get_arg('--smtp-port')
+ if port is not None:
+ return port
+ port = self._get_from_gitconfig('sendemail.smtpserverport')
+ if port is not None:
+ return port
+ if self._args_are_macros():
+ port = self.opts.defaults.get_value('%{_mail_smtp_port}')
+ return port
+
+ def smtp_user(self):
+ user = self._get_arg('--smtp-user')
+ if user is not None:
+ return user
+ user = self._get_from_gitconfig('sendemail.smtpuser')
+ return user
+
+ def smtp_password(self):
+ password = self._get_arg('--smtp-password')
+ if password is not None:
+ return password
+ password = self._get_from_gitconfig('sendemail.smtppass')
+ return password
+
def send(self, to_addr, subject, body):
from_addr = self.from_address()
msg = "From: %s\r\nTo: %s\r\nSubject: %s\r\n\r\n" % \
(from_addr, to_addr, subject) + body
- if type(to_addr) is str:
- to_addr = to_addr.split(',')
- if type(to_addr) is not list:
- raise error.general('invalid to_addr type')
+ port = self.smtp_port()
+
try:
- s = smtplib.SMTP(self.smtp_host())
- s.sendmail(from_addr, to_addr, msg)
+ s = smtplib.SMTP(self.smtp_host(), port, timeout=10)
+
+ password = self.smtp_password()
+ # If a password is provided, assume that authentication is required.
+ if password is not None:
+ user = self.smtp_user()
+ if user is None:
+ user = from_addr
+ s.starttls()
+ s.login(user, password)
+
+ s.sendmail(from_addr, [to_addr], msg)
except smtplib.SMTPException as se:
raise error.general('sending mail: %s' % (str(se)))
except socket.error as se:
raise error.general('sending mail: %s' % (str(se)))
+ def send_file_as_body(self, to_addr, subject, name, intro = None):
+ try:
+ with open(name, 'r') as f:
+ body = f.readlines()
+ except IOError as err:
+ raise error.general('error reading mail body: %s' % (name))
+ if intro is not None:
+ body = intro + body
+ self.send(to_addr, from_addr, body)
+
if __name__ == '__main__':
import sys
+ from . import macros
optargs = {}
+ rtdir = 'source-builder'
+ defaults = '%s/defaults.mc' % (rtdir)
append_options(optargs)
- opts = options.load(sys.argv, optargs = optargs, defaults = 'defaults.mc')
+ opts = options.command_line(base_path = '.',
+ argv = sys.argv,
+ optargs = optargs,
+ defaults = macros.macros(name = defaults, rtdir = rtdir),
+ command_path = '.')
+ options.load(opts)
m = mail(opts)
print('From: %s' % (m.from_address()))
print('SMTP Host: %s' % (m.smtp_host()))
- m.send(m.from_address(), 'Test mailer.py', 'This is a test')
+ if '--mail' in sys.argv:
+ m.send(m.from_address(), 'Test mailer.py', 'This is a test')
diff --git a/source-builder/sb/options.py b/source-builder/sb/options.py
index d6bffd0..05ad208 100644
--- a/source-builder/sb/options.py
+++ b/source-builder/sb/options.py
@@ -46,7 +46,7 @@ basepath = 'sb'
#
# Save the host and POSIX state.
#
-host_windows = False
+host_windows = os.name == 'nt'
host_posix = True
class command_line:
@@ -103,6 +103,10 @@ class command_line:
self.defaults[self._long_opts[lo][0]] = ('none',
'none',
self._long_opts[lo][3])
+ # Set the _uid field, performance improvement on Unix
+ if not host_windows:
+ self.defaults['_uid'] = str(os.getuid())
+ self.defaults['_gid'] = str(os.getgid())
def __str__(self):
def _dict(dd):
@@ -235,7 +239,7 @@ class command_line:
print('--with-<label> : Add the --with-<label> to the build')
print('--without-<label> : Add the --without-<label> to the build')
print('--rtems-tools path : Path to an install RTEMS tool set')
- print('--rtems-bsp arc/bsp : Standard RTEMS architecure and BSP specifier')
+ print('--rtems-bsp arch/bsp : Standard RTEMS architecure and BSP specifier')
print('--rtems-version ver : The RTEMS major/minor version string')
if self.optargs:
for a in self.optargs:
@@ -517,6 +521,15 @@ class command_line:
return None
return self.parse_args(arg)
+ def find_arg(self, arg):
+ if self.optargs is None or arg not in self.optargs:
+ raise error.internal('bad arg: %s' % (arg))
+ for a in self.args:
+ sa = a.split('=')
+ if sa[0].startswith(arg):
+ return sa
+ return None
+
def with_arg(self, label, default = 'not-found'):
# the default if there is no option for without.
result = default
@@ -582,7 +595,22 @@ class command_line:
self.opts['no-install'] = '1'
def info(self):
- s = ' Command Line: %s%s' % (' '.join(self.argv), os.linesep)
+ # Filter potentially sensitive mail options out.
+ filtered_args = [
+ arg for arg in self.argv
+ if all(
+ smtp_opt not in arg
+ for smtp_opt in [
+ '--smtp-host',
+ '--mail-to',
+ '--mail-from',
+ '--smtp-user',
+ '--smtp-password',
+ '--smtp-port'
+ ]
+ )
+ ]
+ s = ' Command Line: %s%s' % (' '.join(filtered_args), os.linesep)
s += ' Python: %s' % (sys.version.replace('\n', ''))
return s
@@ -610,6 +638,7 @@ class command_line:
if len(ab) != 2:
raise error.general('invalid --rtems-bsp option')
self.args.append('--target=%s-rtems%s' % (ab[0], rtems_version))
+ self.args.append('--with-rtems-arch=%s' % (ab[0]))
self.args.append('--with-rtems-bsp=%s' % (ab[1]))
def load(args, optargs = None, defaults = '%{_sbdir}/defaults.mc', logfile = True):
diff --git a/source-builder/sb/path.py b/source-builder/sb/path.py
index b27cf14..d9e926e 100644
--- a/source-builder/sb/path.py
+++ b/source-builder/sb/path.py
@@ -58,7 +58,7 @@ def host(path):
def shell(path):
if isinstance(path, bytes):
- path = path.decode('ascii')
+ path = path.decode('utf8')
if path is not None:
if windows or windows_posix:
path = path.encode('ascii', 'ignore').decode('ascii')
@@ -71,6 +71,20 @@ def shell(path):
path = path.replace('//', '/')
return path
+def host_encode(dpath):
+ '''Encoding the path was present in the RSB however on a ZFS pool I am
+ seeing a failure with a go test in gcc:
+ gcc/testsuite/go.test/test/fixedbugs/issue27836.dir
+ Not encoding works however I am not sure why the encoding was added
+ so the following keeps the encoding and falls back to not encoded
+ if there is an error.0
+ '''
+ try:
+ return host(dpath).encode('utf8')
+ except:
+ pass
+ return dpath
+
def basename(path):
path = shell(path)
return shell(os.path.basename(host(path)))
@@ -189,11 +203,11 @@ def removeall(path):
# get to the max path length on Windows.
#
def _isdir(path):
- hpath = host(path)
+ hpath = host_encode(path)
return os.path.isdir(hpath) and not os.path.islink(hpath)
def _remove_node(path):
- hpath = host(path)
+ hpath = host_encode(path)
if not os.path.islink(hpath) and not os.access(hpath, os.W_OK):
os.chmod(hpath, stat.S_IWUSR)
if _isdir(path):
@@ -216,7 +230,7 @@ def removeall(path):
_remove_node(dir)
path = shell(path)
- hpath = host(path)
+ hpath = host_encode(path)
if os.path.exists(hpath):
_remove(path)
@@ -317,11 +331,11 @@ def get_size(path, depth = -1):
# get to the max path length on Windows.
#
def _isdir(path):
- hpath = host(path)
+ hpath = host_encode(path)
return os.path.isdir(hpath) and not os.path.islink(hpath)
def _node_size(path):
- hpath = host(path)
+ hpath = host_encode(path)
size = 0
if not os.path.islink(hpath):
size = os.path.getsize(hpath)
@@ -345,7 +359,7 @@ def get_size(path, depth = -1):
return size
path = shell(path)
- hpath = host(path)
+ hpath = host_encode(path)
size = 0
if os.path.exists(hpath):
diff --git a/source-builder/sb/pkgconfig.py b/source-builder/sb/pkgconfig.py
index 198ec80..bfe769f 100755
--- a/source-builder/sb/pkgconfig.py
+++ b/source-builder/sb/pkgconfig.py
@@ -90,7 +90,7 @@ class package(object):
get_recursion = ['cflags', 'libs']
no_dup_flags = ['-I', '-l', '-L']
dual_opts = ['-D', '-U', '-I', '-l', '-L']
- lib_list_splitter = re.compile('[\s,]+')
+ lib_list_splitter = re.compile(r'[\s,]+')
loaded_prefixes = None
loaded = {}
@@ -514,7 +514,7 @@ class package(object):
return None
s = ''
if self.file_:
- mre = re.compile('\$\{[^\}]+\}')
+ mre = re.compile(r'\$\{[^\}]+\}')
s = self.fields[label.lower()]
expanded = True
tm = False
diff --git a/source-builder/sb/rtems-build-dep b/source-builder/sb/rtems-build-dep
index 48a0823..71c8890 100755
--- a/source-builder/sb/rtems-build-dep
+++ b/source-builder/sb/rtems-build-dep
@@ -154,13 +154,16 @@ if [ ${op} = "library" ]; then
awk 'BEGIN {FS="-L"} {for (i=0;++i<=NF;) if (length($i) > 0) print $i;}')
for p in ${lib_paths_1} ${lib_paths_2}
do
- if [ ${verbose} = yes ]; then
- echo "Library: ${p}/${name}"
- fi
- if ls ${p}/${name} 1> /dev/null 2>&1; then
- echo "found"
- exit 0
- fi
+ for lname in ${name} lib${name}.a
+ do
+ if [ ${verbose} = yes ]; then
+ echo "Library: ${p}/${lname}"
+ fi
+ if ls ${p}/${lname} 1> /dev/null 2>&1; then
+ echo "found"
+ exit 0
+ fi
+ done
done
echo "not-found"
exit 0
diff --git a/source-builder/sb/rtems-kernel-config-check b/source-builder/sb/rtems-kernel-config-check
new file mode 100755
index 0000000..2256925
--- /dev/null
+++ b/source-builder/sb/rtems-kernel-config-check
@@ -0,0 +1,127 @@
+#! /usr/bin/env python
+"""
+SPDX-License-Identifier: BSD-2-Clause
+
+COPYRIGHT (C) 2021 On-Line Applications Research Corporation (OAR).
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+"""
+
+from __future__ import print_function
+
+import argparse
+import os.path
+import sys
+
+try:
+ import ConfigParser
+ configparser = ConfigParser # used for python2
+except ImportError:
+ try:
+ import configparser # used for python3
+ except ImportError:
+ print("Could not import configparser. Exiting...", file=sys.stderr)
+ sys.exit(1)
+
+
+def run():
+ parser = argparse.ArgumentParser()
+ parser.add_argument("config", help="path to config file")
+ parser.add_argument(
+ "-a",
+ "--arch",
+ help="return target architecture specified in the config",
+ action="store_true")
+ parser.add_argument("-b",
+ "--bsp",
+ help="return BSP specified in the config",
+ action="store_true")
+ parser.add_argument(
+ "-c",
+ "--arch-bsp",
+ help="return target architecture and BSP specified in the config",
+ action="store_true")
+ parser.add_argument("-v",
+ "--rtems-version",
+ help="version of RTEMS",
+ type=int,
+ default=6)
+ parser.add_argument("-t",
+ "--tests",
+ help="Build tests is true",
+ action="store_true")
+ args = parser.parse_args()
+ config = configparser.ConfigParser()
+
+ if args.config[-4:] != ".ini":
+ print("The config file is missing an *.ini extension.",
+ file=sys.stderr)
+ sys.exit(1)
+
+ if not os.path.exists(args.config):
+ print("Config file not found: " + args.config, file=sys.stderr)
+ sys.exit(1)
+
+ try:
+ config.read(args.config)
+ except configparser.MissingSectionHeaderError:
+ print("There is no section header in the config file", file=sys.stderr)
+ sys.exit(1)
+ except configparser.ParsingError:
+ print("An exception occured when parsing the config file",
+ file=sys.stderr)
+ sys.exit(1)
+ except:
+ print("An unknown exception occured", file=sys.stderr)
+
+ for arch_bsp in config.sections():
+ if len(arch_bsp.split("/")) != 2:
+ print("arch/bsp section in config is missing '/'", file=sys.stderr)
+ sys.exit(1)
+
+ if (args.arch or args.bsp) and args.arch_bsp:
+ args.arch = False
+
+ if args.arch:
+ print(' '.join([ab.split('/')[0] for ab in config.sections()]))
+ return
+
+ if args.bsp:
+ print(' '.join([ab.split('/')[1] for ab in config.sections()]))
+ return
+
+ if args.arch_bsp:
+ print(' '.join([arch_bsp for arch_bsp in config.sections()]))
+ return
+
+ if args.tests:
+ for sec in ["DEFAULT"] + config.sections():
+ for item in config[sec].items():
+ if item[0] == 'buld_tests' or item[0] == 'build_samples':
+ print("True")
+ return
+ print("False")
+ return
+
+
+if __name__ == "__main__":
+ run()
diff --git a/source-builder/sb/rtemspkg.py b/source-builder/sb/rtemspkg.py
new file mode 100644
index 0000000..492eb59
--- /dev/null
+++ b/source-builder/sb/rtemspkg.py
@@ -0,0 +1,287 @@
+#
+# RTEMS Tools Project (http://www.rtems.org/)
+# Copyright 2024 Chris Johns (chrisj@rtems.org)
+# All rights reserved.
+#
+# This file is part of the RTEMS Tools package in 'rtems-tools'.
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+#
+# This code builds a package compiler tool suite given a tool set. A tool
+# set lists the various tools. These are specific tool configurations.
+#
+
+from __future__ import print_function
+
+import argparse
+import base64
+import copy
+import datetime
+import hashlib
+import os
+import sys
+
+try:
+ from . import build
+ from . import download
+ from . import error
+ from . import git
+ from . import log
+ from . import path
+ from . import simhost
+ from . import version
+except KeyboardInterrupt:
+ print('abort: user terminated', file=sys.stderr)
+ sys.exit(1)
+except:
+ raise
+
+#
+# RTEMS Packages we maintian a git hash of in the RSB
+#
+rpc_label = 0
+rpc_config = 1
+rpc_version = 2
+rpc_repo = 3
+rpc_repo_name = 4
+rpc_branch = 5
+rpc_snapshot = 6
+rpc_package = 7
+rtems_pkg_cfgs = [
+ [
+ 'RTEMS Tools', 'tools/rtems-tools-%{rtems_version}.cfg',
+ 'rtems_tools_version', 'git://git.rtems.org/rtems-tools',
+ 'rtems-tools.git', 'master',
+ 'https://git.rtems.org/rtems-tools/snapshot/rtems-tools-%{rtems_tools_version}.tar.bz2',
+ 'rtems-tools-%{rtems_tools_version}.tar.bz2'
+ ],
+ [
+ 'RTEMS Kernel', 'tools/rtems-kernel-%{rtems_version}.cfg',
+ 'rtems_kernel_version', 'git://git.rtems.org/rtems', 'rtems.git',
+ 'master',
+ 'https://git.rtems.org/rtems/snapshot/rtems-%{rtems_kernel_version}.tar.bz2',
+ 'rtems-kernel-%{rtems_kernel_version}.tar.bz2'
+ ],
+ [
+ 'RTEMS LibBSD', 'tools/rtems-libbsd-%{rtems_version}.cfg',
+ 'rtems_libbsd_version', 'git://git.rtems.org/rtems-libbsd',
+ 'rtems-libbsd.git', '6-freebsd-12',
+ 'https://git.rtems.org/rtems-libbsd/snapshot/rtems-libbsd-%{rtems_libbsd_version}.tar.%{rtems_libbsd_ext}',
+ 'rtems-libbsd-%{rtems_libbsd_version}.tar.%{rtems_libbsd_ext}'
+ ],
+ [
+ 'RTEMS Net Legacy', 'tools/rtems-net-legacy-%{rtems_version}.cfg',
+ 'rtems_net_version', 'git://git.rtems.org/rtems-net-legacy',
+ 'rtems-net-legacy.git', 'main',
+ 'https://git.rtems.org/rtems-net-legacy/snapshot/rtems-net-legacy-%{rtems_net_version}.tar.%{rtems_net_ext}',
+ 'rtems-net-legacy-%{rtems_net_version}.tar.%{rtems_net_ext}'
+ ],
+ [
+ 'RTEMS Net Services', 'net/net-services-1.cfg',
+ 'rtems_net_services_version', 'git://git.rtems.org/rtems-net-services',
+ 'rtems-net-services.git', 'master',
+ 'https://git.rtems.org/rtems-net-services/snapshot/rtems-net-services-%{rtems_net_services_version}.tar.%{rtems_net_services_ext}',
+ 'rtems-net-services-%{rtems_net_services_version}.tar.%{rtems_net_services_ext}'
+ ],
+]
+
+
+def clean_line(line):
+ line = line[0:-1]
+ b = line.find('#')
+ if b >= 0:
+ line = line[1:b] + ('\\' if line[-1] == '\\' else '')
+ return line.strip()
+
+
+def clean_and_pack(line, last_line):
+ leading_ws = ' ' if len(line) > 0 and line[0].isspace() else ''
+ line = clean_line(line)
+ if len(last_line) > 0:
+ line = last_line + leading_ws + line
+ return line
+
+
+def config_patch(configdir, config, version_label, config_hash, repo_hash,
+ checksum):
+ for cd in configdir.split(':'):
+ cf = path.join(cd, config)
+ if path.exists(cf):
+ try:
+ with open(cf) as f:
+ lines = f.readlines()
+ except IOError as err:
+ raise error.general('config: %s: read error: %s' %
+ (config, str(err)))
+ new_config = []
+ new_lines = []
+ last_line = ''
+ for line in lines:
+ new_lines += [line]
+ line = clean_and_pack(line, last_line)
+ if len(line) > 0:
+ if line[-1] == '\\':
+ last_line = line[:-1]
+ continue
+ last_line = ''
+ if version_label in line and not 'rsb_version' in line:
+ if line.startswith('%define ' + version_label):
+ new_lines = [
+ '%define ' + version_label + ' ' + repo_hash +
+ os.linesep
+ ]
+ elif line.startswith('%hash '):
+ ls = line.split()
+ if len(ls) != 4:
+ raise error.general('invalid %hash: ' + line)
+ new_lines = [
+ ' '.join(ls[0:3]) + ' \\' + os.linesep,
+ ' ' + checksum + os.linesep
+ ]
+ new_config += new_lines
+ new_lines = []
+ try:
+ with open(cf, 'w') as f:
+ f.writelines(new_config)
+ except IOError as err:
+ raise error.general('config: %s: write error: %s' %
+ (config, str(err)))
+ return
+ raise error.general('could not find: ' + config)
+
+
+def checksum_sha512_base64(tarball):
+ hasher = hashlib.new('sha512')
+ try:
+ with open(path.host(tarball), 'rb') as f:
+ hasher.update(f.read())
+ except IOError as err:
+ log.notice('hash: %s: read error: %s' % (file_, str(err)))
+ except:
+ raise
+ raise error.general('cannot hash the tar file')
+ hash_hex = hasher.hexdigest()
+ hash_base64 = base64.b64encode(hasher.digest()).decode('utf-8')
+ return hash_base64
+
+
+def run(args=sys.argv):
+ ec = 0
+ output = []
+ try:
+ #
+ # The RSB options support cannot be used because it loads the defaults
+ # for the host which we cannot do here.
+ #
+ description = 'RTEMS Track Dependencies a build set has for all hosts.'
+
+ argsp = argparse.ArgumentParser(prog='sb-rtems-pkg',
+ description=description)
+ argsp.add_argument('--rtems-version',
+ help='Set the RTEMS version.',
+ type=str,
+ default=version.version())
+ argsp.add_argument('--log',
+ help='Log file.',
+ type=str,
+ default=simhost.log_default('rtems-pkg'))
+ argsp.add_argument('--trace',
+ help='Enable trace logging for debugging.',
+ action='store_true')
+ argsp.add_argument('--dry-run',
+ help='Dry run, do not update the configurations',
+ action='store_true')
+ argsp.add_argument('bsets', nargs='*', help='Build sets.')
+
+ argopts = argsp.parse_args(args[1:])
+
+ simhost.load_log(argopts.log)
+ log.notice('RTEMS Source Builder - RTEMS Package Update, %s' %
+ (version.string()))
+ log.tracing = argopts.trace
+
+ opts = simhost.load_options(args, argopts, extras=['--with-download'])
+ opts.defaults['_rsb_getting_source'] = '1'
+ opts.defaults[
+ 'rtems_waf_build_root_suffix'] = '%{waf_build_root_suffix}'
+ opts.defaults['rtems_version'] = argopts.rtems_version
+
+ for cfg in rtems_pkg_cfgs:
+ b = None
+ try:
+ bopts = copy.copy(opts)
+ bmacros = copy.copy(opts.defaults)
+ b = build.build(cfg[rpc_config], False, bopts, bmacros)
+ git_hash_key = b.macros.find(cfg[rpc_version])
+ if len(git_hash_key) == 0:
+ raise error.general(cfg[rpc_label] +
+ ': cannot find version macro')
+ source_dir = b.macros.expand('%{_sourcedir}')
+ config_hash = b.macros.expand('%{' + cfg[rpc_version] + '}')
+ repo_path = path.join(source_dir, cfg[rpc_repo_name])
+ download.get_file(
+ cfg[rpc_repo] + '?fetch?checkout=' + cfg[rpc_branch],
+ repo_path, bopts, b)
+ repo = git.repo(repo_path)
+ repo_hash = repo.head()
+ if config_hash != repo_hash:
+ update = True
+ update_str = 'UPDATE'
+ else:
+ update = False
+ update_str = 'matching'
+ print(cfg[rpc_label] + ': ' + update_str + ' config:' +
+ config_hash + ' repo:' + repo_hash)
+ b.macros[cfg[rpc_version]] = repo_hash
+ tarball = b.macros.expand(cfg[rpc_package])
+ b.macros.set_write_map('hashes')
+ b.macros[tarball] = 'NO-HASH NO-HASH'
+ b.macros.unset_write_map()
+ tarball_path = path.join(source_dir,
+ b.macros.expand(cfg[rpc_package]))
+ download.get_file(b.macros.expand(cfg[rpc_snapshot]),
+ tarball_path, bopts, b)
+ tarball_hash = checksum_sha512_base64(tarball_path)
+ if update and not argopts.dry_run:
+ config_patch(b.macros.expand('%{_configdir}'),
+ b.macros.expand(cfg[rpc_config]),
+ cfg[rpc_version], config_hash, repo_hash,
+ tarball_hash)
+ del b
+ except error.general as gerr:
+ log.stderr(str(gerr))
+ log.stderr('Configuration load FAILED')
+ b = None
+ except error.general as gerr:
+ log.stderr(str(gerr))
+ log.stderr('Build FAILED')
+ ec = 1
+ except error.internal as ierr:
+ log.stderr(str(ierr))
+ log.stderr('Internal Build FAILED')
+ ec = 1
+ except error.exit as eerr:
+ pass
+ except KeyboardInterrupt:
+ log.notice('abort: user terminated')
+ ec = 1
+ except:
+ raise
+ log.notice('abort: unknown error')
+ ec = 1
+ sys.exit(ec)
+
+
+if __name__ == "__main__":
+ run()
diff --git a/source-builder/sb/setbuilder.py b/source-builder/sb/setbuilder.py
index b0e2b23..46d7fe7 100644
--- a/source-builder/sb/setbuilder.py
+++ b/source-builder/sb/setbuilder.py
@@ -30,11 +30,14 @@ import glob
import operator
import os
import sys
+import tarfile
+
import textwrap
try:
from . import build
from . import check
+ from . import config
from . import error
from . import log
from . import mailer
@@ -223,6 +226,9 @@ class buildset:
def installing(self):
return self.install_mode() == 'installing'
+ def installable(self):
+ return not self.opts.no_install() and self.installing()
+
def staging(self):
return not self.installing()
@@ -259,21 +265,31 @@ class buildset:
self.root_copy(_build.config.expand('%{buildroot}'),
_build.config.expand('%{_tmproot}'))
- def bset_tar(self, _build):
- tardir = _build.config.expand('%{_tardir}')
- if (self.opts.get_arg('--bset-tar-file') or self.opts.canadian_cross()) \
- and not _build.macros.get('%{_disable_packaging}'):
+ def bset_tar(self, stagingroot):
+ if self.opts.get_arg('--bset-tar-file') or self.opts.canadian_cross():
+ # Use a config to expand the macros because it supports all
+ # expansions, ie %{_cwd}
+ cfg = config.file(self.bset, self.opts, self.macros, load=False)
+ prefix = cfg.expand('%{_prefix}')
+ tardir = cfg.expand('%{_tardir}')
path.mkdir(tardir)
- tar = path.join(tardir,
- _build.config.expand('%s.tar.bz2' % \
- (_build.main_package().name())))
- log.notice('tarball: %s' % (os.path.relpath(path.host(tar))))
+ tarname = path.join(tardir,
+ path.basename('%s.tar.bz2' % (self.bset)))
+ log.notice('tarfile: %s' % (os.path.relpath(path.host(tarname))))
if not self.opts.dry_run():
- tmproot = _build.config.expand('%{_tmproot}')
- cmd = _build.config.expand('"cd ' + tmproot + \
- ' && %{__tar} -cf - . | %{__bzip2} > ' + \
- tar + '"')
- _build.run(cmd, shell_opts = '-c', cwd = tmproot)
+ tar = None
+ try:
+ tar = tarfile.open(tarname, 'w:bz2')
+ for filedir in sorted(path.listdir(stagingroot)):
+ src = path.join(stagingroot, filedir)
+ dst = path.join(prefix, filedir)
+ log.trace('tar: %s -> %s' % (src, dst))
+ tar.add(src, dst)
+ except OSError as oe:
+ raise error.general('tarfile: %s: %s' % (self.bset, oe))
+ finally:
+ if tar is not None:
+ tar.close()
def parse(self, bset):
@@ -284,6 +300,14 @@ class buildset:
line = line[1:b]
return line.strip()
+ def _clean_and_pack(line, last_line):
+ leading_ws = ' ' if len(line) > 0 and line[0].isspace() else ''
+ line = _clean(line)
+ if len(last_line) > 0:
+ line = last_line + leading_ws + line
+ return line
+
+ bset = macro_expand(self.macros, bset)
bsetname = bset
if not path.exists(bsetname):
@@ -305,25 +329,37 @@ class buildset:
try:
lc = 0
+ ll = ''
for l in bset:
lc += 1
- l = _clean(l)
+ l = _clean_and_pack(l, ll)
if len(l) == 0:
continue
+ if l[-1] == '\\':
+ ll = l[0:-1]
+ continue
+ ll = ''
log.trace('_bset: : %s: %03d: %s' % (self.bset, lc, l))
ls = l.split()
if ls[0][-1] == ':' and ls[0][:-1] == 'package':
self.bset_pkg = ls[1].strip()
self.macros['package'] = self.bset_pkg
- elif ls[0][0] == '%':
+ elif ls[0][0] == '%' and (len(ls[0]) > 1 and ls[0][1] != '{'):
def err(msg):
raise error.general('%s:%d: %s' % (self.bset, lc, msg))
- if ls[0] == '%define':
+ if ls[0] == '%define' or ls[0] == '%defineifnot' :
+ name = ls[1].strip()
+ value = None
if len(ls) > 2:
- self.macros.define(ls[1].strip(),
- ' '.join([f.strip() for f in ls[2:]]))
- else:
- self.macros.define(ls[1].strip())
+ value = ' '.join([f.strip() for f in ls[2:]])
+ if ls[0] == '%defineifnot':
+ if self.macros.defined(name):
+ name = None
+ if name is not None:
+ if value is not None:
+ self.macros.define(name, value)
+ else:
+ self.macros.define(name)
elif ls[0] == '%undefine':
if len(ls) > 2:
raise error.general('%s:%d: %undefine requires ' \
@@ -336,7 +372,7 @@ class buildset:
elif ls[0] == '%hash':
sources.hash(ls[1:], self.macros, err)
else:
- l = l.strip()
+ l = macro_expand(self.macros, l.strip())
c = build.find_config(l, self.configs)
if c is None:
raise error.general('%s:%d: cannot find file: %s' % (self.bset,
@@ -397,19 +433,11 @@ class buildset:
interrupted = False
#
- # If this is the outter most buildset it's files are installed. Nested
- # build sets staged their installed file. The staged files are install
- # when the outtter most build finishes.
- #
- if nesting_count != 1:
- if self.installing():
- self.macros['install_mode'] = 'staging'
-
- #
- # Only the outter build set can have staging to install. Get the staging
- # root via the config because it could require a valid config.
+ # If installing switch to staging. Not sure if this is still
+ # needed.
#
- have_staging = False
+ if nesting_count > 1 and self.installing():
+ self.macros['install_mode'] = 'staging'
try:
configs = self.load()
@@ -417,7 +445,7 @@ class buildset:
log.trace('_bset: %2d: %s: configs: %s' % (nesting_count,
self.bset, ', '.join(configs)))
- if nesting_count == 1 and len(configs) > 1:
+ if nesting_count == 1:
#
# Prepend staging areas, bin directory to the
# path. Lets the later package depend on the earlier
@@ -449,8 +477,6 @@ class buildset:
'=' * (74 - len(configs[s]))))
bs = buildset(configs[s], self.configs, opts, macros)
bs.build(deps, nesting_count, mail)
- if self.installing():
- have_staging = True
del bs
elif configs[s].endswith('.cfg'):
if mail:
@@ -480,8 +506,6 @@ class buildset:
copy.copy(self.macros),
format = 'xml',
mail = mail)
- if s == len(configs) - 1 and not have_errors:
- self.bset_tar(b)
else:
deps += b.config.includes()
builds += [b]
@@ -514,23 +538,22 @@ class buildset:
#
# Installing or staging ...
#
- log.trace('_bset: %2d: %s: deps:%r no-install:%r' % \
+ log.trace('_bset: %2d: mode: %s: deps:%r no-install:%r' % \
(nesting_count, self.install_mode(),
deps is None, self.opts.no_install()))
- log.trace('_bset: %2d: %s: builds: %s' % \
+ log.trace('_bset: %2d: mode: %s: builds: %s' % \
(nesting_count, self.install_mode(),
', '.join([b.name() for b in builds])))
- if deps is None and not self.opts.no_install() and not have_errors:
+ if deps is None and not have_errors:
for b in builds:
- log.trace('_bset: : %s: %r' % (self.install_mode(),
- b.installable()))
+ log.trace('_bset: : %s: installable=%r build-installable=%r' % \
+ (self.install_mode(), self.installable(), b.installable()))
if b.installable():
prefix = b.config.expand('%{_prefix}')
buildroot = path.join(b.config.expand('%{buildroot}'), prefix)
- if self.staging():
- prefix = b.config.expand('%{stagingroot}')
- self.install(self.install_mode(), b.name(), buildroot, prefix)
-
+ self.install('staging', b.name(), buildroot, b.config.expand('%{stagingroot}'))
+ if self.installable():
+ self.install('installing', b.name(), buildroot, prefix)
#
# Sizes ...
#
@@ -584,16 +607,20 @@ class buildset:
del b
#
- # If builds have been staged install into the finaly prefix.
+ # If builds have been staged install into the final prefix.
#
- if have_staging and not self.opts.no_install() and not have_errors:
+ if self.installing() and not have_errors:
stagingroot = macro_expand(self.macros, '%{stagingroot}')
have_stagingroot = path.exists(stagingroot)
- log.trace('_bset: %2d: install staging, present: %s' % \
- (nesting_count, have_stagingroot))
+ do_install = not self.opts.no_install()
+ if do_install:
+ log.trace('_bset: %2d: install staging, present: %s' % \
+ (nesting_count, have_stagingroot))
if have_stagingroot:
prefix = macro_expand(self.macros, '%{_prefix}')
- self.install(self.install_mode(), self.bset, stagingroot, prefix)
+ if do_install:
+ self.install(self.install_mode(), self.bset, stagingroot, prefix)
+ self.bset_tar(stagingroot)
staging_size = path.get_size(stagingroot)
if not self.opts.no_clean() or self.opts.always_clean():
log.notice('clean staging: %s' % (self.bset))
@@ -673,6 +700,16 @@ def list_bset_cfg_files(opts, configs):
return True
return False
+def list_host(opts):
+ if opts.get_arg('--list-host'):
+ print('Host operating system information:')
+ print('Operating system: %s' % macro_expand(opts.defaults, '%{_os}'))
+ print('Number of processors: %s' % macro_expand(opts.defaults, '%{_ncpus}'))
+ print('Build architecture: %s' % macro_expand(opts.defaults, '%{_host_arch}'))
+ print('Host triplet: %s' % macro_expand(opts.defaults, '%{_host}'))
+ return True
+ return False
+
def run():
import sys
ec = 0
@@ -683,6 +720,7 @@ def run():
'--list-bsets': 'List available build sets',
'--list-configs': 'List available configuration files.',
'--list-deps': 'List the dependent files.',
+ '--list-host': 'List host information and the host triplet.',
'--bset-tar-file': 'Create a build set tar file',
'--pkg-tar-files': 'Create package tar files',
'--no-report': 'Do not create a package report.',
@@ -695,6 +733,8 @@ def run():
'log' : '',
'reports': [],
'failure': None }
+ # Request this now to generate any errors.
+ smtp_host = mail['mail'].smtp_host()
to_addr = opts.get_arg('--mail-to')
if to_addr is not None:
mail['to'] = to_addr[1]
@@ -718,7 +758,8 @@ def run():
deps = []
else:
deps = None
- if not list_bset_cfg_files(opts, configs):
+
+ if not list_bset_cfg_files(opts, configs) and not list_host(opts):
prefix = macro_expand(opts.defaults, '%{_prefix}')
if opts.canadian_cross():
opts.disable_install()
diff --git a/source-builder/sb/simhost.py b/source-builder/sb/simhost.py
index 1ff98e8..f58a66d 100644
--- a/source-builder/sb/simhost.py
+++ b/source-builder/sb/simhost.py
@@ -36,6 +36,7 @@ try:
from . import log
from . import macros
from . import path
+ from . import shell
from . import sources
from . import version
except KeyboardInterrupt:
@@ -122,7 +123,6 @@ profiles = {
'_var': ('dir', 'optional', '/usr/local/var') },
}
-
class log_capture(object):
def __init__(self):
self.log = []
@@ -154,6 +154,18 @@ def find_bset_config(bset_config, macros):
raise error.general('no build set file found: %s' % (bset_config))
return name
+def macro_expand(macros, _str):
+ cstr = None
+ while cstr != _str:
+ cstr = _str
+ _str = macros.expand(_str)
+ _str = shell.expand(macros, _str)
+ return _str
+
+def strip_common_prefix(files):
+ commonprefix = os.path.commonprefix(files)
+ return sorted(list(set([f[len(commonprefix):] for f in files])))
+
#
# A skinny options command line class to get the configs to load.
#
@@ -252,10 +264,10 @@ class options(object):
a += 1
return None
- def rtems_bsp(self):
+ def rtems_bsp(self, arch='arch'):
self.defaults['rtems_version'] = str(version.version())
- self.defaults['_target'] = 'arch-rtems'
- self.defaults['rtems_host'] = 'rtems-arch'
+ self.defaults['_target'] = arch + '-rtems'
+ self.defaults['rtems_host'] = 'rtems-' + arch
self.defaults['with_rtems_bsp'] = 'rtems-bsp'
def sb_git(self):
@@ -383,8 +395,19 @@ class buildset:
rebased += [i]
return rebased
+ def root(self):
+ for i in self._includes:
+ si = i.split(':')
+ if len(si) == 2:
+ if si[1] == 'root':
+ return si[0]
+ return None
+
def includes(self):
- return sorted(list(set(self._includes)))
+ return [i for i in self._includes if not i.endswith(':root')]
+
+ def deps(self):
+ return strip_common_prefix([i.split(':')[0] for i in self.includes()])
def errors(self):
return sorted(list(set(self._errors)))
@@ -393,7 +416,7 @@ class buildset:
if not _build.disabled():
_build.make()
- def parse(self, bset):
+ def parse(self, bset, expand=True):
#
# Ouch, this is a copy of the setbuilder.py code.
@@ -409,7 +432,7 @@ class buildset:
bsetname = find_bset_config(bset, self.macros)
try:
- log.trace('_bset: %s: open: %s' % (self.bset, bsetname))
+ log.trace('_bset: %s: open: %s %s' % (self.bset, bsetname, expand))
bsetf = open(path.host(bsetname), 'r')
except IOError as err:
raise error.general('error opening bset file: %s' % (bsetname))
@@ -432,19 +455,26 @@ class buildset:
if ls[0][-1] == ':' and ls[0][:-1] == 'package':
self.bset_pkg = ls[1].strip()
self.macros['package'] = self.bset_pkg
- elif ls[0][0] == '%':
+ elif ls[0][0] == '%' and (len(ls[0]) > 1 and ls[0][1] != '{'):
def err(msg):
raise error.general('%s:%d: %s' % (self.bset, lc, msg))
- if ls[0] == '%define':
+ if ls[0] == '%define' or ls[0] == '%defineifnot' :
+ name = ls[1].strip()
+ value = None
if len(ls) > 2:
- self.macros.define(ls[1].strip(),
- ' '.join([f.strip() for f in ls[2:]]))
- else:
- self.macros.define(ls[1].strip())
+ value = ' '.join([f.strip() for f in ls[2:]])
+ if ls[0] == '%defineifnot':
+ if self.macros.defined(name):
+ name = None
+ if name is not None:
+ if value is not None:
+ self.macros.define(name, value)
+ else:
+ self.macros.define(name)
elif ls[0] == '%undefine':
if len(ls) > 2:
- raise error.general('%s:%d: %undefine requires just the name' \
- % (self.bset, lc))
+ raise error.general('%s:%d: %undefine requires ' \
+ 'just the name' % (self.bset, lc))
self.macros.undefine(ls[1].strip())
elif ls[0] == '%include':
configs += self.parse(ls[1].strip())
@@ -453,12 +483,18 @@ class buildset:
elif ls[0] == '%hash':
sources.hash(ls[1:], self.macros, err)
else:
- l = l.strip()
- c = build.find_config(l, self.configs)
- if c is None:
- raise error.general('%s:%d: cannot find file: %s'
- % (self.bset, lc, l))
- configs += [c + ':' + self.parent]
+ try:
+ l = macro_expand(self.macros, l.strip())
+ except:
+ if expand:
+ raise
+ l = None
+ if l is not None:
+ c = build.find_config(l, self.configs)
+ if c is None:
+ raise error.general('%s:%d: cannot find file: %s'
+ % (self.bset, lc, l))
+ configs += [c + ':' + self.parent]
finally:
bsetf.close()
self.parent = parent
@@ -523,7 +559,7 @@ class buildset:
nesting_count += 1
- log.trace('_bset: %s for %s: make' % (self.bset, host))
+ log.trace('_bset: %2d: %s for %s: make' % (nesting_count, self.bset, host))
log.notice('Build Set: %s for %s' % (self.bset, host))
mail_subject = '%s on %s' % (self.bset,
@@ -538,7 +574,7 @@ class buildset:
try:
configs = self.load()
- log.trace('_bset: %s: configs: %s' % (self.bset, ','.join(configs)))
+ log.trace('_bset: %2d: %s: configs: %s' % (nesting_count, self.bset, ','.join(configs)))
sizes_valid = False
builds = []
@@ -556,14 +592,14 @@ class buildset:
self.set_host_details(host, opts, macros)
config, parent = configs[s].split(':', 2)
if config.endswith('.bset'):
- log.trace('_bset: == %2d %s' % (nesting_count + 1, '=' * 75))
+ log.trace('_bset: %2d: %s' % (nesting_count + 1, '=' * 75))
bs = buildset(config, self.configs, opts, macros)
bs.build(host, nesting_count)
self._includes += \
self._rebase_includes(bs.includes(), parent)
del bs
elif config.endswith('.cfg'):
- log.trace('_bset: -- %2d %s' % (nesting_count + 1, '-' * 75))
+ log.trace('_bset: %2d: %s' % (nesting_count + 1, '-' * 75))
try:
b = build.build(config,
False,
@@ -579,7 +615,7 @@ class buildset:
#
# Dump post build macros.
#
- log.trace('_bset: macros post-build')
+ log.trace('_bset: %2d: macros post-build' % (nesting_count))
log.trace(str(macros))
else:
raise error.general('invalid config type: %s' % (config))
@@ -589,13 +625,16 @@ class buildset:
if self.build_failure is None:
self.build_failure = b.name()
self._includes += b.includes()
- self._errors += [find_bset_config(config, opts.defaults) + ':' + parent] + self._includes
+ self._errors += \
+ [find_bset_config(config, opts.defaults) + ':' + parent] + self._includes
raise
#
# Clear out the builds ...
#
for b in builds:
del b
+ self._includes += \
+ [find_bset_config(c.split(':')[0], self.macros) + ':' + self.bset for c in configs]
except error.general as gerr:
if not build_error:
log.stderr(str(gerr))
@@ -616,9 +655,9 @@ def list_hosts():
max_os_len = max(len(h) for h in hosts)
max_host_len = max(len(profiles[h]['_host'][2]) for h in hosts)
for h in hosts:
- print('%*s: %-*s %s' % (max_os_len, h, max_host_len,
- profiles[h]['_host'][2],
- profiles[h]['_host'][2]))
+ log.notice('%*s: %-*s %s' % (max_os_len, h, max_host_len,
+ profiles[h]['_host'][2],
+ profiles[h]['_host'][2]))
def get_files(configs, ext, localpath):
files = []
@@ -635,14 +674,39 @@ def get_config_files(configs, localpath = False):
def get_bset_files(configs, localpath = False):
return get_files(configs, '.bset', localpath)
+def get_config_bset_files(opts, configs):
+ cbs = get_config_files(configs) + get_bset_files(configs)
+ return strip_common_prefix([find_bset_config(cb, opts.defaults) for cb in cbs])
+
+def get_root_bset_files(opts, configs, localpath = False):
+ bsets = get_bset_files(configs, localpath)
+ incs = {}
+ for bs in bsets:
+ bset = buildset(bs, configs, opts)
+ cfgs = [find_bset_config(c.split(':')[0], bset.macros) for c in bset.parse(bs, False)]
+ incs[bset.root()] = bset.includes() + cfgs
+ roots = sorted(incs.keys())
+ for inc in incs:
+ for i in incs[inc]:
+ si = i.split(':')
+ if len(si) > 0 and si[0] in roots:
+ roots.remove(si[0])
+ return roots
+
def get_root(configs):
return configs['root']
+def list_root_bset_files(opts, configs):
+ for p in configs['paths']:
+ log.notice('Examining: %s' % (os.path.relpath(p)))
+ for r in strip_common_prefix(get_root_bset_files(opts, configs)):
+ log.notice(' %s' % (r))
+
def list_bset_files(opts, configs):
for p in configs['paths']:
- print('Examining: %s' % (os.path.relpath(p)))
+ log.notice('Examining: %s' % (os.path.relpath(p)))
for b in get_bset_files(configs):
- print(' %s' % (b[:b.rfind('.')]))
+ log.notice(' %s' % (b[:b.rfind('.')]))
def load_log(logfile):
log.default = log.log(streams = [logfile])
diff --git a/source-builder/sb/version.py b/source-builder/sb/version.py
index 29d2dc5..eb6a17d 100644
--- a/source-builder/sb/version.py
+++ b/source-builder/sb/version.py
@@ -89,9 +89,13 @@ _version_str = '%s.%s' % (_version, _revision)
_released = False
_git = False
_is_loaded = False
+_top_dir = None
def _top():
- top = path.dirname(sys.argv[0])
+ if _top_dir is None:
+ top = path.dirname(sys.argv[0])
+ else:
+ top = _top_dir
if len(top) == 0:
top = '.'
return top
@@ -106,7 +110,7 @@ def _load_released_version_config():
import configparser
except ImportError:
import ConfigParser as configparser
- v = configparser.SafeConfigParser()
+ v = configparser.ConfigParser()
try:
v.read(path.host(ver))
except Exception as e:
@@ -183,6 +187,10 @@ def _load_git_version():
_is_loaded = True
return _git
+def set_top(top):
+ global _top_dir
+ _top_dir = top
+
def load_release_settings(section, error = False):
vc, v = _load_released_version_config()
items = []
diff --git a/source-builder/x86_64-linux-gnu-pkg-config b/source-builder/x86_64-linux-gnu-pkg-config
new file mode 100755
index 0000000..09d7b16
--- /dev/null
+++ b/source-builder/x86_64-linux-gnu-pkg-config
@@ -0,0 +1,3 @@
+#! /bin/sh
+base=$(dirname $0)
+exec ${base}/pkg-config $*