pistachio: fix build errors with gcc 12

Fixes #4837
This commit is contained in:
Christian Prochaska 2023-04-26 03:26:28 +02:00 committed by Christian Helmuth
parent ed5cbbfa1b
commit 0eda98b03e
3 changed files with 24 additions and 2 deletions

View File

@ -15,7 +15,7 @@ unexport .SHELLFLAGS
user_build.tag:
LIBGCCFLAGS="$(CC_MARCH)" \
LDFLAGS="$(addprefix $(LD_PREFIX),$(LD_MARCH)) -nostdlib" \
CFLAGS="$(CC_MARCH) $(CC_WARN)" \
CFLAGS="$(CC_MARCH) $(CC_WARN) -fno-tree-loop-distribute-patterns" \
$(PISTACHIO_CONTRIB_DIR)/user/configure --build=ia32 --host i686 \
CC=$(CROSS_DEV_PREFIX)gcc
$(VERBOSE_MK) MAKEFLAGS= $(MAKE) -s $(VERBOSE_DIR)

View File

@ -0,0 +1,22 @@
gcc12.patch
diff --git a/kernel/src/api/v4/tcb.h b/kernel/src/api/v4/tcb.h
index 21b10df..779aad5 100644
--- a/kernel/src/api/v4/tcb.h
+++ b/kernel/src/api/v4/tcb.h
@@ -763,13 +763,13 @@ INLINE arch_ktcb_t *tcb_t::get_arch()
INLINE tcb_t * get_idle_tcb()
{
- extern tcb_t *__idle_tcb;
+ extern const tcb_t *__idle_tcb;
return (tcb_t*)__idle_tcb;
}
INLINE tcb_t * get_dummy_tcb()
{
- extern tcb_t *__dummy_tcb;
+ extern const tcb_t *__dummy_tcb;
return (tcb_t*)__dummy_tcb;
}

View File

@ -1 +1 @@
2961c41705536e84699829f8c1d3825c24c063d3
10ce61c40c6a740070eee64320bce5df390180fa