Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
2d81350
autoconf: don't squash source files on incremental build
jkloetzke Dec 19, 2025
49c0421
devel::binutils: bump to 2.45.1
jkloetzke Dec 19, 2025
6bfff88
devel::binutils: update L4Re patch
jkloetzke Dec 19, 2025
2c55813
devel::binutils: add optional zstd support
jkloetzke Dec 19, 2025
0b0a520
libs::uclibc-l4re: bump to r-2025-W50
jkloetzke Dec 10, 2025
5034c09
devel::gcc: bump to 14.3.0
jkloetzke Dec 10, 2025
2323913
devel::gcc: fix L4Re runtime loader path
jkloetzke Dec 10, 2025
c396b30
devel/gcc: configure multilib in bare compiler too
jkloetzke Dec 10, 2025
813d915
libs::glibc: bump to 2.42
jkloetzke Dec 10, 2025
31ec52c
libs::newlib: bump to 4.5.0.20241231
jkloetzke Dec 10, 2025
bfc7a30
libs::newlib: add nano newlib support
jkloetzke Dec 10, 2025
86c14a7
devel::cross-toolchain: enable multilib for arm-none-eabi
jkloetzke Dec 10, 2025
92991a8
libs::readline: fix L4Re compilation
jkloetzke Nov 28, 2025
4ffc071
devel::gcc: update L4Re patch
jkloetzke Dec 19, 2025
48f7186
devel::cross-toolchain: leverage packageDepends
jkloetzke Dec 19, 2025
f0c0e4e
devel::cross-toolchain: hard link compiler shared libs in sysroot
jkloetzke Dec 19, 2025
0f91249
devel::gcc: do not force initfini-array option
jkloetzke Jan 24, 2026
cd39841
libs::mingw-w64: add v13.0.0
jkloetzke Jan 24, 2026
7cab58b
devel::gcc: add mingw support
jkloetzke Jan 24, 2026
1132df2
devel::cross-toolchain: add mingw-w64 toolchain
jkloetzke Jan 24, 2026
bf5536a
tests: buildall: add mingw toolchain to standard build
jkloetzke Jan 24, 2026
2ed11b3
devel::gcc: fix canadian cross build
jkloetzke Jan 17, 2026
5f5f71c
devel::gcc: set the upstream project url in help text
jkloetzke Jan 24, 2026
684be01
devel::gcc: make sure only release checks are enabled
jkloetzke Jan 24, 2026
e2f177f
devel::gcc: fix build host libs/header contamination
jkloetzke Jan 23, 2026
db264b0
devel::gcc-cross: explicitly sets target binutils
jkloetzke Jan 25, 2026
55a92b1
libs::compat::glibc: use make 4.3 to fix build
jkloetzke Jan 25, 2026
f74a09d
devel::flex: fix build on gcc-15 host systems
jkloetzke Jan 25, 2026
251ea44
host-compat-toolchain: build everything with -O2
jkloetzke Jan 27, 2026
9f4c4da
Default to -O2 optimization level
jkloetzke Jan 27, 2026
5eab2c5
devel::gcc: obey CFLAGS and friends
jkloetzke Jan 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion classes/autoconf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ buildSetup: |

autoconfSync () {
mkdir -p $2
rsync -aH --delete --exclude=".autoreconf.stamp" $1/ $2/
rsync -aHu --exclude=".autoreconf.stamp" $1/ $2/
}

# Moves the sources of $1 to $2 and calls autoconfReconfigure
Expand Down
10 changes: 5 additions & 5 deletions default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ environment:
SOURCEWARE_MIRROR: "https://sourceware.org/pub"

# default compile flags
BASEMENT_OPTIMIZE: "s" # compiler optimization level (0/1/2/s)
BASEMENT_OPTIMIZE: "2" # compiler optimization level (0/1/2/3/s/g)
BASEMENT_DEBUG: "1" # generate debug symbols (0/1)

##########################################################################
Expand All @@ -29,10 +29,10 @@ environment:
#
# Attention: keep in sync with devel::host-compat-toolchain! These flags
# should be reset by the compat-toolchain exactly to their default values.
CPPFLAGS: "-Wdate-time"
CFLAGS: "-Os -pipe -fPIC"
CXXFLAGS: "-Os -pipe -fPIC"
LDFLAGS: "-Wl,-O1 -Wl,--hash-style=gnu"
CPPFLAGS: ""
CFLAGS: "-O2 -pipe -fPIC"
CXXFLAGS: "-O2 -pipe -fPIC"
LDFLAGS: ""

archiveAppend:
backend: http
Expand Down
4 changes: 2 additions & 2 deletions doc/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ supposed to be widely supported. To tweak the standard compile flags, the
following variables may be optionally set when pulling in the toolchain.

``BASEMENT_OPTIMIZE``
Compiler optimization level (``-O``). Defaults to ``s`` to optimize for
small binaries.
Compiler optimization level (``-O``). Defaults to ``2`` to optimize for
speed.

``BASEMENT_DEBUG``
May be ``0`` or ``1`` and controls the generation of debugging information.
Expand Down
33 changes: 29 additions & 4 deletions recipes/devel/binutils.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
inherit: [autotools, patch]

metaEnvironment:
PKG_VERSION: "2.45"
PKG_VERSION: "2.45.1"
PKG_LICENSE: "FSFAP AND GFDL-1.3 AND GPL-2.0-or-later AND LGPL-2.0-or-later"

checkoutSCM:
scm: url
url: ${GNU_MIRROR}/binutils/binutils-${PKG_VERSION}.tar.xz
digestSHA1: "09fd8a50a95be4a94412fe3847d16280996679c5"
digestSHA1: "db1bb5b24bab487664380f4cbb498c8b2595e5a8"
stripComponents: 1

checkoutDeterministic: True
Expand All @@ -20,7 +20,25 @@ buildTools: [host-toolchain, bison]
buildToolsWeak: [m4]
multiPackage:
"":
buildVars: [AUTOCONF_HOST, AUTOCONF_TARGET, BINUTILS_PREFIX]
Config:
BINUTILS_ZSTD:
type: bool
help: "Enable zstd compression support for debug sections"
default: False
BINUTILS_COMPRESS_DEBUG:
type: bool
help: "Compress debug sections by default in linker"
default: False

depends:
- if: $BINUTILS_ZSTD
depends:
- libs::zstd-dev
- name: libs::zstd-tgt
use: []

buildVars: [AUTOCONF_HOST, AUTOCONF_TARGET, BINUTILS_PREFIX,
BINUTILS_ZSTD, BINUTILS_COMPRESS_DEBUG]
buildScript: |
export MAKEINFO=true
autotoolsBuild -o MAKEINFO=true -O MAKEINFO=true $1 \
Expand All @@ -31,12 +49,16 @@ multiPackage:
--disable-nls \
--disable-werror \
--enable-plugins \
--enable-lto
--enable-lto \
--enable-compressed-debug-sections=$([[ $BINUTILS_COMPRESS_DEBUG == 1 ]] && echo ld || echo none) \
--enable-default-compressed-debug-sections-algorithm=$(\
[[ $BINUTILS_ZSTD == 1 ]] && echo zstd || echo zlib)

multiPackage:
dev:
packageScript: |
autotoolsPackageDev
provideDeps: [ "*-dev" ]
"":
packageScript: |
autotoolsPackageTgt
Expand All @@ -51,6 +73,7 @@ multiPackage:
popd
fi

provideDeps: [ "*-tgt" ]
provideTools:
binutils: usr/bin

Expand All @@ -67,5 +90,7 @@ multiPackage:
multiPackage:
dev:
packageScript: autotoolsPackageDev
provideDeps: [ "*-dev" ]
tgt:
packageScript: autotoolsPackageTgt
provideDeps: [ "*-tgt" ]
216 changes: 138 additions & 78 deletions recipes/devel/binutils/0001-Add-L4Re-as-a-target.patch
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@
From 30844bbcdfda35af99cec00fabc828dcbe7202f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Kl=C3=B6tzke?= <jan.kloetzke@kernkonzept.com>
Date: Mon, 19 May 2025 16:42:07 +0200
Subject: [PATCH] Add L4Re as a target

---
bfd/config.bfd | 13 +++++++++++--
gas/configure.tgt | 4 +++-
ld/Makefile.am | 1 +
ld/Makefile.in | 2 ++
ld/configure.tgt | 10 ++++++++--
ld/emulparams/armelf_l4re.sh | 3 +++
6 files changed, 28 insertions(+), 5 deletions(-)
create mode 100644 ld/emulparams/armelf_l4re.sh

diff --git a/bfd/config.bfd b/bfd/config.bfd
index 6553aac1e99..1a2ebed62cb 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
diff -Nurp a/bfd/config.bfd b/bfd/config.bfd
--- a/bfd/config.bfd 2025-11-10 01:00:00.000000000 +0100
+++ b/bfd/config.bfd 2025-12-12 11:43:46.804841462 +0100
@@ -274,6 +274,11 @@ case "${targ}" in
targ_selvecs="aarch64_elf64_be_vec arm_elf32_le_vec arm_elf32_be_vec"
want64=true
Expand Down Expand Up @@ -49,7 +37,7 @@ index 6553aac1e99..1a2ebed62cb 100644
targ_defvec=i386_elf32_vec
targ_selvecs="iamcu_elf32_vec i386_coff_vec"
;;
@@ -681,7 +690,7 @@ case "${targ}" in
@@ -681,11 +690,11 @@ case "${targ}" in
targ_selvecs="i386_elf32_vec iamcu_elf32_vec"
want64=true
;;
Expand All @@ -58,72 +46,119 @@ index 6553aac1e99..1a2ebed62cb 100644
targ_defvec=x86_64_elf64_vec
targ_selvecs="i386_elf32_vec iamcu_elf32_vec x86_64_elf32_vec"
case "${targ}" in
diff --git a/gas/configure.tgt b/gas/configure.tgt
index d58f21873a3..65f22474c7d 100644
--- a/gas/configure.tgt
+++ b/gas/configure.tgt
- x86_64-*-rtems*)
+ x86_64-*-rtems* | x86_64-*-l4re*)
targ_selvecs="${targ_selvecs} x86_64_pe_vec x86_64_pei_vec"
esac
want64=true
diff -Nurp a/gas/config/tc-i386.c b/gas/config/tc-i386.c
--- a/gas/config/tc-i386.c 2025-11-10 01:00:00.000000000 +0100
+++ b/gas/config/tc-i386.c 2025-12-11 14:19:35.383263645 +0100
@@ -574,7 +574,8 @@ const char extra_symbol_chars[] = "*%-([
&& !defined (TE_Haiku) \
&& !defined (TE_FreeBSD) \
&& !defined (TE_DragonFly) \
- && !defined (TE_NetBSD))
+ && !defined (TE_NetBSD) \
+ && !defined (TE_L4Re))
/* This array holds the chars that always start a comment. If the
pre-processor is disabled, these aren't very useful. The option
--divide will remove '/' from this list. */
diff -Nurp a/gas/config/te-arml4reeabi.h b/gas/config/te-arml4reeabi.h
--- a/gas/config/te-arml4reeabi.h 1970-01-01 01:00:00.000000000 +0100
+++ b/gas/config/te-arml4reeabi.h 2025-12-11 14:15:11.115733180 +0100
@@ -0,0 +1,25 @@
+/* Copyright (C) 2004-2025 Free Software Foundation, Inc.
+
+ This file is part of GAS, the GNU Assembler.
+
+ GAS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 3,
+ or (at your option) any later version.
+
+ GAS is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
+ the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GAS; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#include "te-l4re.h"
+
+/* The EABI requires the use of VFP. */
+#define FPU_DEFAULT FPU_ARCH_SOFTVFP
+#define EABI_DEFAULT EF_ARM_EABI_VER5
+
diff -Nurp a/gas/config/te-l4re.h b/gas/config/te-l4re.h
--- a/gas/config/te-l4re.h 1970-01-01 01:00:00.000000000 +0100
+++ b/gas/config/te-l4re.h 2025-12-11 14:14:06.976941014 +0100
@@ -0,0 +1,31 @@
+/* te-l4re.h -- L4Re target environment declarations.
+ Copyright (C) 2000-2025 Free Software Foundation, Inc.
+
+ This file is part of GAS, the GNU Assembler.
+
+ GAS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ GAS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GAS; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+/* Target environment for L4Re. It is the same as the generic
+ target, except that it arranges via the TE_L4Re define to
+ suppress the use of "/" as a comment character. Some code in the
+ L4Re kernel uses "/" to mean division. (What a concept!) */
+#define TE_L4Re 1
+
+#define LOCAL_LABELS_DOLLAR 1
+#define LOCAL_LABELS_FB 1
+
+#include "obj-format.h"
+
diff -Nurp a/gas/configure.tgt b/gas/configure.tgt
--- a/gas/configure.tgt 2025-11-10 01:00:00.000000000 +0100
+++ b/gas/configure.tgt 2025-12-11 14:17:04.656682621 +0100
@@ -130,6 +130,7 @@ case ${generic_target} in
aarch64*-*-fuchsia*) fmt=elf;;
aarch64*-*-haiku*) fmt=elf em=haiku ;;
aarch64*-*-genode*) fmt=elf;;
+ aarch64*-*-l4re*) fmt=elf;;
+ aarch64*-*-l4re*) fmt=elf em=l4re;;
aarch64*-*-linux*) fmt=elf em=linux
case ${cpu}-${os} in
aarch64*-linux-gnu_ilp32) arch=aarch64:32 ;;
@@ -150,7 +151,7 @@ case ${generic_target} in
@@ -169,6 +170,7 @@ case ${generic_target} in
arm-*-pe) fmt=coff em=pe ;;
arm-*-fuchsia*) fmt=elf ;;
arm-*-haiku*) fmt=elf em=haiku ;;
+ arm-*-l4re*) fmt=elf em=arml4reeabi ;;

arm-*-phoenix*) fmt=elf ;;
arm-*-elf) fmt=elf ;;
- arm-*-eabi* | arm-*-rtems* | arm-*-genode*) fmt=elf em=armeabi ;;
+ arm-*-eabi* | arm-*-rtems* | arm-*-genode* | arm-*-l4re*) fmt=elf em=armeabi ;;
arm-*-kaos*) fmt=elf ;;
arm-*-conix*) fmt=elf ;;
arm-*-freebsd[89].* | armeb-*-freebsd[89].*)
@@ -232,6 +233,7 @@ case ${generic_target} in
avr-*-*) fmt=elf bfd_gas=yes ;;

@@ -232,6 +234,7 @@ case ${generic_target} in
i386-*-fuchsia*) fmt=elf ;;
i386-*-haiku*) fmt=elf em=haiku ;;
i386-*-genode*) fmt=elf ;;
+ i386-*-l4re*) fmt=elf ;;
+ i386-*-l4re*) fmt=elf em=l4re ;;
i386-*-bsd*) fmt=aout em=386bsd ;;
i386-*-netbsd*-gnu* | \
i386-*-knetbsd*-gnu | \
diff --git a/ld/Makefile.am b/ld/Makefile.am
index 6a9833e5775..62db5a687b9 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -168,6 +168,7 @@ ALL_EMULATION_SOURCES = \
earmelf_fbsd.c \
earmelf_fuchsia.c \
earmelf_haiku.c \
+ earmelf_l4re.c \
earmelf_linux.c \
earmelf_linux_eabi.c \
earmelf_linux_fdpiceabi.c \
diff --git a/ld/Makefile.in b/ld/Makefile.in
index 8639e782cdf..01bae52a9ba 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -679,6 +679,7 @@ ALL_EMULATION_SOURCES = \
earmelf_fbsd.c \
earmelf_fuchsia.c \
earmelf_haiku.c \
+ earmelf_l4re.c \
earmelf_linux.c \
earmelf_linux_eabi.c \
earmelf_linux_fdpiceabi.c \
@@ -1303,6 +1304,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_fbsd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_fuchsia.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_haiku.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_l4re.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_linux.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_linux_eabi.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_linux_fdpiceabi.Po@am__quote@
diff --git a/ld/configure.tgt b/ld/configure.tgt
index f937f78b876..ff858bb909b 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -98,6 +98,9 @@ aarch64-*-freebsd*) targ_emul=aarch64fbsd
diff -Nurp a/ld/configure.tgt b/ld/configure.tgt
--- a/ld/configure.tgt 2025-11-10 01:00:00.000000000 +0100
+++ b/ld/configure.tgt 2025-12-11 13:34:38.706376257 +0100
@@ -98,6 +98,9 @@ aarch64-*-freebsd*) targ_emul=aarch64fbs
aarch64-*-fuchsia*) targ_emul=aarch64elf
targ_extra_emuls="aarch64elfb armelf armelfb"
;;
Expand All @@ -133,7 +168,7 @@ index f937f78b876..ff858bb909b 100644
aarch64_be-*-linux-gnu_ilp32)
targ_emul=aarch64linux32b
targ_extra_libpath="aarch64linuxb aarch64linux aarch64linux32 armelfb_linux_eabi armelf_linux_eabi"
@@ -257,6 +260,9 @@ arm*-*-fuchsia*) targ_emul=armelf_fuchsia
@@ -257,6 +260,9 @@ arm*-*-fuchsia*) targ_emul=armelf_fuchsi
arm*-*-haiku*) targ_emul=armelf_haiku
targ_extra_emuls=armelf
;;
Expand All @@ -152,7 +187,7 @@ index f937f78b876..ff858bb909b 100644
targ_emul=elf_i386
targ_extra_emuls=elf_iamcu
;;
@@ -1036,7 +1042,7 @@ x86_64-*-netbsd* | x86_64-*-openbsd*)
@@ -1032,7 +1038,7 @@ x86_64-*-netbsd* | x86_64-*-openbsd*)
tdir_elf_i386=`echo ${targ_alias} | \
sed -e 's/x86_64/i386/' -e 's/aout//'`
;;
Expand All @@ -161,15 +196,40 @@ index f937f78b876..ff858bb909b 100644
targ_emul=elf_x86_64
targ_extra_emuls="elf_i386 elf_iamcu elf32_x86_64"
targ_extra_libpath="elf_i386 elf_iamcu elf32_x86_64"
diff --git a/ld/emulparams/armelf_l4re.sh b/ld/emulparams/armelf_l4re.sh
new file mode 100644
index 00000000000..556c65af3a3
--- /dev/null
+++ b/ld/emulparams/armelf_l4re.sh
diff -Nurp a/ld/emulparams/armelf_l4re.sh b/ld/emulparams/armelf_l4re.sh
--- a/ld/emulparams/armelf_l4re.sh 1970-01-01 01:00:00.000000000 +0100
+++ b/ld/emulparams/armelf_l4re.sh 2025-12-11 13:34:38.706376257 +0100
@@ -0,0 +1,3 @@
+source_sh ${srcdir}/emulparams/armelf_linux_eabi.sh
+
+TEXT_START_ADDR=0x01000000
--
2.39.5

diff -Nurp a/ld/Makefile.am b/ld/Makefile.am
--- a/ld/Makefile.am 2025-11-10 01:00:00.000000000 +0100
+++ b/ld/Makefile.am 2025-12-11 13:34:38.706376257 +0100
@@ -168,6 +168,7 @@ ALL_EMULATION_SOURCES = \
earmelf_fbsd.c \
earmelf_fuchsia.c \
earmelf_haiku.c \
+ earmelf_l4re.c \
earmelf_linux.c \
earmelf_linux_eabi.c \
earmelf_linux_fdpiceabi.c \
diff -Nurp a/ld/Makefile.in b/ld/Makefile.in
--- a/ld/Makefile.in 2025-11-10 01:00:00.000000000 +0100
+++ b/ld/Makefile.in 2025-12-11 13:34:38.706376257 +0100
@@ -679,6 +679,7 @@ ALL_EMULATION_SOURCES = \
earmelf_fbsd.c \
earmelf_fuchsia.c \
earmelf_haiku.c \
+ earmelf_l4re.c \
earmelf_linux.c \
earmelf_linux_eabi.c \
earmelf_linux_fdpiceabi.c \
@@ -1301,6 +1302,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_fbsd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_fuchsia.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_haiku.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_l4re.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_linux.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_linux_eabi.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_linux_fdpiceabi.Po@am__quote@
Loading