summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--patches/gcc-15.1.0-x86_64-pc-elf/0001-platform.patch (renamed from patches/gcc-15.1.0-x86_64-pc-elf/0001-no-red-zone.patch)8
-rwxr-xr-xscripts/0500-build-target-gcc.sh1
3 files changed, 7 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index ab4095c..d2bffed 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,8 @@ NEWLIB_VERSION ?= 4.5.0.20241231
TARGET ?= x86_64-pc-elf
PLATFORM ?= x86-64
+IMAGE_BUILD ?= 2
+
all:
podman pull docker.io/archlinux:latest
podman build \
@@ -16,5 +18,5 @@ all:
--build-arg GDB_VERSION=$(GDB_VERSION) \
--build-arg NEWLIB_VERSION=$(NEWLIB_VERSION) \
--build-arg TARGET=$(TARGET) \
- --tag registry.gitlab.ost.ch:45023/teachos/devcontainers/$(PLATFORM):$(GCC_VERSION) \
+ --tag registry.gitlab.ost.ch:45023/teachos/devcontainers/$(PLATFORM):$(GCC_VERSION)-$(IMAGE_BUILD) \
.
diff --git a/patches/gcc-15.1.0-x86_64-pc-elf/0001-no-red-zone.patch b/patches/gcc-15.1.0-x86_64-pc-elf/0001-platform.patch
index 0c468a7..1b3c0f2 100644
--- a/patches/gcc-15.1.0-x86_64-pc-elf/0001-no-red-zone.patch
+++ b/patches/gcc-15.1.0-x86_64-pc-elf/0001-platform.patch
@@ -1,10 +1,8 @@
--- /dev/null
+++ gcc/config/i386/t-x86_64-pc-elf
-@@ -0,0 +1,4 @@
-+MULTILIB_OPTIONS += mno-red-zone
-+MULTILIB_EXTRA_OPTS += mcmodel=large
-+MULTILIB_DIRNAMES += no-red-zone
-+CRTSTUFF_T_CFLAGS = -mcmodel=large
+@@ -0,0 +1,2 @@
++MULTILIB_EXTRA_OPTS += mno-red-zone mcmodel=large fno-gnu-tm fPIE
++CRTSTUFF_T_CFLAGS = -mno-red-zone -mcmodel=large -fno-gnu-tm -fPIE
--- gcc/config.gcc 2024-08-01 10:17:14.000000000 +0200
+++ gcc/config.gcc 2024-09-16 14:03:02.049140896 +0200
@@ -1960,6 +1960,7 @@
diff --git a/scripts/0500-build-target-gcc.sh b/scripts/0500-build-target-gcc.sh
index e1ca9c7..913405f 100755
--- a/scripts/0500-build-target-gcc.sh
+++ b/scripts/0500-build-target-gcc.sh
@@ -11,6 +11,7 @@ PATH=/opt/bootstrap/bin:/opt/toolchain/bin:$PATH
../gcc-$GCC_VERSION/configure \
--disable-hosted-libstdcxx \
--disable-nls \
+ --disable-tm-clone-registry \
--disable-wchar_t \
--enable-cxx-flags=-fno-exceptions \
--enable-default-pie \