BuildSystem: binutils1.39->1.44, gcc12.2.0->15.1.0
This commit is contained in:
parent
9c86e5e54d
commit
32c35a822b
|
@ -68,7 +68,9 @@ namespace Kernel
|
||||||
|
|
||||||
bool has_fd(int fd) const
|
bool has_fd(int fd) const
|
||||||
{
|
{
|
||||||
if (fd < 0 || static_cast<size_t>(fd) >= events.size())
|
// For some reason having (fd < 0 || ...) makes GCC 15.1.0
|
||||||
|
// think bitmap access can be out of bounds...
|
||||||
|
if (static_cast<size_t>(fd) >= events.size())
|
||||||
return false;
|
return false;
|
||||||
return bitmap[fd / 32] & (1u << (fd % 32));
|
return bitmap[fd / 32] & (1u << (fd % 32));
|
||||||
}
|
}
|
||||||
|
|
|
@ -179,7 +179,7 @@ namespace Kernel
|
||||||
BAN::Atomic<bool> m_smp_free_lock { false };
|
BAN::Atomic<bool> m_smp_free_lock { false };
|
||||||
SMPMessage* m_smp_free { nullptr };
|
SMPMessage* m_smp_free { nullptr };
|
||||||
|
|
||||||
SMPMessage* m_smp_message_storage;
|
SMPMessage* m_smp_message_storage { nullptr };
|
||||||
|
|
||||||
void* m_current_page_table { nullptr };
|
void* m_current_page_table { nullptr };
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace Kernel
|
||||||
long ret;
|
long ret;
|
||||||
asm volatile("int %[irq]"
|
asm volatile("int %[irq]"
|
||||||
: "=a"(ret)
|
: "=a"(ret)
|
||||||
: [irq]"i"(IRQ_SYSCALL)
|
: [irq]"i"(static_cast<int>(IRQ_SYSCALL)) // WTF GCC 15
|
||||||
, "a"(syscall)
|
, "a"(syscall)
|
||||||
, "b"((uintptr_t)arg1)
|
, "b"((uintptr_t)arg1)
|
||||||
, "c"((uintptr_t)arg2)
|
, "c"((uintptr_t)arg2)
|
||||||
|
|
|
@ -746,6 +746,8 @@ namespace Kernel::ACPI::AML
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wstack-usage="
|
||||||
static BAN::ErrorOr<void> perform_store(const Node& source, Reference* target, TargetType target_type)
|
static BAN::ErrorOr<void> perform_store(const Node& source, Reference* target, TargetType target_type)
|
||||||
{
|
{
|
||||||
dprintln_if(AML_DUMP_FUNCTION_CALLS, "perform_store");
|
dprintln_if(AML_DUMP_FUNCTION_CALLS, "perform_store");
|
||||||
|
@ -826,6 +828,7 @@ namespace Kernel::ACPI::AML
|
||||||
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
static BAN::ErrorOr<void> store_into_target(ParseContext& context, const Node& node)
|
static BAN::ErrorOr<void> store_into_target(ParseContext& context, const Node& node)
|
||||||
{
|
{
|
||||||
|
|
|
@ -176,19 +176,20 @@ namespace Kernel
|
||||||
switch (entry->type)
|
switch (entry->type)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
Processor processor;
|
MUST(apic->m_processors.emplace_back(Processor {
|
||||||
processor.processor_id = entry->entry0.acpi_processor_id;
|
.processor_id = entry->entry0.acpi_processor_id,
|
||||||
processor.apic_id = entry->entry0.apic_id;
|
.apic_id = entry->entry0.apic_id,
|
||||||
processor.flags = entry->entry0.flags & 0x03;
|
.flags = static_cast<uint8_t>(entry->entry0.flags & 0x03),
|
||||||
MUST(apic->m_processors.push_back(processor));
|
}));
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
IOAPIC ioapic;
|
MUST(apic->m_io_apics.emplace_back(IOAPIC {
|
||||||
ioapic.id = entry->entry1.ioapic_id;
|
.id = entry->entry1.ioapic_id,
|
||||||
ioapic.paddr = entry->entry1.ioapic_address;
|
.paddr = entry->entry1.ioapic_address,
|
||||||
ioapic.gsi_base = entry->entry1.gsi_base;
|
.vaddr = 0,
|
||||||
ioapic.max_redirs = 0;
|
.gsi_base = entry->entry1.gsi_base,
|
||||||
MUST(apic->m_io_apics.push_back(ioapic));
|
.max_redirs = 0,
|
||||||
|
}));
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
apic->m_irq_overrides[entry->entry2.irq_source] = entry->entry2.gsi;
|
apic->m_irq_overrides[entry->entry2.irq_source] = entry->entry2.gsi;
|
||||||
|
|
|
@ -391,7 +391,7 @@ namespace Kernel
|
||||||
// NOTE: This is offset by 2 pointers since interrupt without PL change
|
// NOTE: This is offset by 2 pointers since interrupt without PL change
|
||||||
// does not push SP and SS. This allows accessing "whole" interrupt stack.
|
// does not push SP and SS. This allows accessing "whole" interrupt stack.
|
||||||
:: [load_sp]"r"(Processor::current_stack_top() - 2 * sizeof(uintptr_t)),
|
:: [load_sp]"r"(Processor::current_stack_top() - 2 * sizeof(uintptr_t)),
|
||||||
[yield]"i"(IRQ_YIELD)
|
[yield]"i"(static_cast<int>(IRQ_YIELD)) // WTF GCC 15
|
||||||
: "memory", "rcx"
|
: "memory", "rcx"
|
||||||
);
|
);
|
||||||
#elif ARCH(i686)
|
#elif ARCH(i686)
|
||||||
|
@ -403,7 +403,7 @@ namespace Kernel
|
||||||
// NOTE: This is offset by 2 pointers since interrupt without PL change
|
// NOTE: This is offset by 2 pointers since interrupt without PL change
|
||||||
// does not push SP and SS. This allows accessing "whole" interrupt stack.
|
// does not push SP and SS. This allows accessing "whole" interrupt stack.
|
||||||
:: [load_sp]"r"(Processor::current_stack_top() - 2 * sizeof(uintptr_t)),
|
:: [load_sp]"r"(Processor::current_stack_top() - 2 * sizeof(uintptr_t)),
|
||||||
[yield]"i"(IRQ_YIELD)
|
[yield]"i"(static_cast<int>(IRQ_YIELD)) // WTF GCC 15
|
||||||
: "memory", "ecx"
|
: "memory", "ecx"
|
||||||
);
|
);
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -0,0 +1,144 @@
|
||||||
|
diff -ruN binutils-2.44/bfd/config.bfd binutils-2.44-banan_os/bfd/config.bfd
|
||||||
|
--- binutils-2.44/bfd/config.bfd 2025-02-02 02:00:00.000000000 +0200
|
||||||
|
+++ binutils-2.44-banan_os/bfd/config.bfd 2025-06-19 11:04:48.871180511 +0300
|
||||||
|
@@ -612,6 +612,11 @@
|
||||||
|
targ_defvec=i386_elf32_vec
|
||||||
|
targ_selvecs=iamcu_elf32_vec
|
||||||
|
;;
|
||||||
|
+ i[3-7]86-*-banan_os*)
|
||||||
|
+ targ_defvec=i386_elf32_vec
|
||||||
|
+ targ_selvecs=
|
||||||
|
+ targ64_selvecs=x86_64_elf64_vec
|
||||||
|
+ ;;
|
||||||
|
i[3-7]86-*-dicos*)
|
||||||
|
targ_defvec=i386_elf32_vec
|
||||||
|
targ_selvecs=iamcu_elf32_vec
|
||||||
|
@@ -666,6 +671,11 @@
|
||||||
|
targ64_selvecs=x86_64_elf64_vec
|
||||||
|
;;
|
||||||
|
#ifdef BFD64
|
||||||
|
+ x86_64-*-banan_os*)
|
||||||
|
+ targ_defvec=x86_64_elf64_vec
|
||||||
|
+ targ_selvecs=i386_elf32_vec
|
||||||
|
+ want64=true
|
||||||
|
+ ;;
|
||||||
|
x86_64-*-cloudabi*)
|
||||||
|
targ_defvec=x86_64_elf64_cloudabi_vec
|
||||||
|
want64=true
|
||||||
|
diff -ruN binutils-2.44/config.sub binutils-2.44-banan_os/config.sub
|
||||||
|
--- binutils-2.44/config.sub 2025-02-02 02:00:00.000000000 +0200
|
||||||
|
+++ binutils-2.44-banan_os/config.sub 2025-06-19 11:05:16.922967546 +0300
|
||||||
|
@@ -1976,6 +1976,7 @@
|
||||||
|
| atheos* \
|
||||||
|
| auroraux* \
|
||||||
|
| aux* \
|
||||||
|
+ | banan_os* \
|
||||||
|
| beos* \
|
||||||
|
| bitrig* \
|
||||||
|
| bme* \
|
||||||
|
diff -ruN binutils-2.44/gas/configure.tgt binutils-2.44-banan_os/gas/configure.tgt
|
||||||
|
--- binutils-2.44/gas/configure.tgt 2025-02-02 02:00:00.000000000 +0200
|
||||||
|
+++ binutils-2.44-banan_os/gas/configure.tgt 2025-06-19 11:06:43.781629742 +0300
|
||||||
|
@@ -225,6 +225,7 @@
|
||||||
|
h8300-*-elf) fmt=elf ;;
|
||||||
|
h8300-*-linux*) fmt=elf em=linux ;;
|
||||||
|
|
||||||
|
+ i386-*-banan_os*) fmt=elf em=gnu ;;
|
||||||
|
i386-*-beospe*) fmt=coff em=pe ;;
|
||||||
|
i386-*-beos*) fmt=elf ;;
|
||||||
|
i386-*-elfiamcu) fmt=elf arch=iamcu ;;
|
||||||
|
diff -ruN binutils-2.44/ld/configure.tgt binutils-2.44-banan_os/ld/configure.tgt
|
||||||
|
--- binutils-2.44/ld/configure.tgt 2025-02-02 02:00:00.000000000 +0200
|
||||||
|
+++ binutils-2.44-banan_os/ld/configure.tgt 2025-06-19 11:08:48.725342089 +0300
|
||||||
|
@@ -367,6 +367,10 @@
|
||||||
|
i[3-7]86-*-rdos*) targ_emul=elf_i386
|
||||||
|
targ_extra_emuls=elf_iamcu
|
||||||
|
;;
|
||||||
|
+i[3-7]86-*-banan_os*) targ_emul=elf_i386_banan_os
|
||||||
|
+ targ_extra_emuls=elf_i386
|
||||||
|
+ targ64_extra_emuls="elf_x86_64_banan_os elf_x86_64"
|
||||||
|
+ ;;
|
||||||
|
i[3-7]86-*-bsd) targ_emul=i386bsd
|
||||||
|
targ_extra_ofiles=
|
||||||
|
;;
|
||||||
|
@@ -1000,6 +1004,9 @@
|
||||||
|
;;
|
||||||
|
x86_64-*-rdos*) targ_emul=elf64rdos
|
||||||
|
;;
|
||||||
|
+x86_64-*-banan_os*) targ_emul=elf_x86_64_banan_os
|
||||||
|
+ targ_extra_emuls="elf_i386_banan_os elf_x86_64 elf_i386"
|
||||||
|
+ ;;
|
||||||
|
x86_64-*-cloudabi*) targ_emul=elf_x86_64_cloudabi
|
||||||
|
;;
|
||||||
|
x86_64-*-haiku*) targ_emul=elf_x86_64_haiku
|
||||||
|
diff -ruN binutils-2.44/ld/emulparams/elf_banan_os.sh binutils-2.44-banan_os/ld/emulparams/elf_banan_os.sh
|
||||||
|
--- binutils-2.44/ld/emulparams/elf_banan_os.sh 1970-01-01 02:00:00.000000000 +0200
|
||||||
|
+++ binutils-2.44-banan_os/ld/emulparams/elf_banan_os.sh 2025-06-19 11:10:25.877588187 +0300
|
||||||
|
@@ -0,0 +1 @@
|
||||||
|
+ELF_INTERPRETER_NAME=\"/usr/lib/DynamicLoader.so\"
|
||||||
|
diff -ruN binutils-2.44/ld/emulparams/elf_i386_banan_os.sh binutils-2.44-banan_os/ld/emulparams/elf_i386_banan_os.sh
|
||||||
|
--- binutils-2.44/ld/emulparams/elf_i386_banan_os.sh 1970-01-01 02:00:00.000000000 +0200
|
||||||
|
+++ binutils-2.44-banan_os/ld/emulparams/elf_i386_banan_os.sh 2025-06-19 11:10:51.233390738 +0300
|
||||||
|
@@ -0,0 +1,2 @@
|
||||||
|
+source_sh ${srcdir}/emulparams/elf_i386.sh
|
||||||
|
+source_sh ${srcdir}/emulparams/elf_banan_os.sh
|
||||||
|
diff -ruN binutils-2.44/ld/emulparams/elf_x86_64_banan_os.sh binutils-2.44-banan_os/ld/emulparams/elf_x86_64_banan_os.sh
|
||||||
|
--- binutils-2.44/ld/emulparams/elf_x86_64_banan_os.sh 1970-01-01 02:00:00.000000000 +0200
|
||||||
|
+++ binutils-2.44-banan_os/ld/emulparams/elf_x86_64_banan_os.sh 2025-06-19 11:11:11.664231452 +0300
|
||||||
|
@@ -0,0 +1,2 @@
|
||||||
|
+source_sh ${srcdir}/emulparams/elf_x86_64.sh
|
||||||
|
+source_sh ${srcdir}/emulparams/elf_banan_os.sh
|
||||||
|
diff -ruN binutils-2.44/ld/Makefile.am binutils-2.44-banan_os/ld/Makefile.am
|
||||||
|
--- binutils-2.44/ld/Makefile.am 2025-02-02 02:00:00.000000000 +0200
|
||||||
|
+++ binutils-2.44-banan_os/ld/Makefile.am 2025-06-19 11:12:13.666857368 +0300
|
||||||
|
@@ -277,6 +277,7 @@
|
||||||
|
eelf32xtensa.c \
|
||||||
|
eelf32z80.c \
|
||||||
|
eelf_i386.c \
|
||||||
|
+ eelf_i386_banan_os.c \
|
||||||
|
eelf_i386_be.c \
|
||||||
|
eelf_i386_fbsd.c \
|
||||||
|
eelf_i386_haiku.c \
|
||||||
|
@@ -459,6 +460,7 @@
|
||||||
|
eelf64tilegx_be.c \
|
||||||
|
eelf_mipsel_haiku.c \
|
||||||
|
eelf_x86_64.c \
|
||||||
|
+ eelf_x86_64_banan_os.c \
|
||||||
|
eelf_x86_64_cloudabi.c \
|
||||||
|
eelf_x86_64_fbsd.c \
|
||||||
|
eelf_x86_64_haiku.c \
|
||||||
|
diff -ruN binutils-2.44/ld/Makefile.in binutils-2.44-banan_os/ld/Makefile.in
|
||||||
|
--- binutils-2.44/ld/Makefile.in 2025-02-02 02:00:00.000000000 +0200
|
||||||
|
+++ binutils-2.44-banan_os/ld/Makefile.in 2025-06-19 11:14:27.198888034 +0300
|
||||||
|
@@ -788,6 +788,7 @@
|
||||||
|
eelf32xtensa.c \
|
||||||
|
eelf32z80.c \
|
||||||
|
eelf_i386.c \
|
||||||
|
+ eelf_i386_banan_os.c \
|
||||||
|
eelf_i386_be.c \
|
||||||
|
eelf_i386_fbsd.c \
|
||||||
|
eelf_i386_haiku.c \
|
||||||
|
@@ -969,6 +970,7 @@
|
||||||
|
eelf64tilegx_be.c \
|
||||||
|
eelf_mipsel_haiku.c \
|
||||||
|
eelf_x86_64.c \
|
||||||
|
+ eelf_x86_64_banan_os.c \
|
||||||
|
eelf_x86_64_cloudabi.c \
|
||||||
|
eelf_x86_64_fbsd.c \
|
||||||
|
eelf_x86_64_haiku.c \
|
||||||
|
@@ -1476,6 +1478,7 @@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64tilegx.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64tilegx_be.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386.Po@am__quote@
|
||||||
|
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_banan_os.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_be.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_fbsd.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_haiku.Po@am__quote@
|
||||||
|
@@ -1486,6 +1489,7 @@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_mipsel_haiku.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_s390.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64.Po@am__quote@
|
||||||
|
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_banan_os.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_cloudabi.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_fbsd.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_haiku.Po@am__quote@
|
|
@ -1,11 +1,11 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
BINUTILS_VERSION="binutils-2.39"
|
BINUTILS_VERSION="binutils-2.44"
|
||||||
BINUTILS_TAR="$BINUTILS_VERSION.tar.gz"
|
BINUTILS_TAR="$BINUTILS_VERSION.tar.gz"
|
||||||
BINUTILS_URL="https://ftp.gnu.org/gnu/binutils/$BINUTILS_TAR"
|
BINUTILS_URL="https://ftp.gnu.org/gnu/binutils/$BINUTILS_TAR"
|
||||||
|
|
||||||
GCC_VERSION="gcc-12.2.0"
|
GCC_VERSION="gcc-15.1.0"
|
||||||
GCC_TAR="$GCC_VERSION.tar.gz"
|
GCC_TAR="$GCC_VERSION.tar.gz"
|
||||||
GCC_URL="https://ftp.gnu.org/gnu/gcc/$GCC_VERSION/$GCC_TAR"
|
GCC_URL="https://ftp.gnu.org/gnu/gcc/$GCC_VERSION/$GCC_TAR"
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,219 @@
|
||||||
|
diff -ruN gcc-15.1.0/config.sub gcc-15.1.0-banan_os/config.sub
|
||||||
|
--- gcc-15.1.0/config.sub 2025-04-25 11:17:59.000000000 +0300
|
||||||
|
+++ gcc-15.1.0-banan_os/config.sub 2025-06-19 11:29:44.368548733 +0300
|
||||||
|
@@ -1749,7 +1749,7 @@
|
||||||
|
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
|
||||||
|
| midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
|
||||||
|
| nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
|
||||||
|
- | fiwix* )
|
||||||
|
+ | fiwix* | banan_os* )
|
||||||
|
;;
|
||||||
|
# This one is extra strict with allowed versions
|
||||||
|
sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
|
||||||
|
diff -ruN gcc-15.1.0/fixincludes/mkfixinc.sh gcc-15.1.0-banan_os/fixincludes/mkfixinc.sh
|
||||||
|
--- gcc-15.1.0/fixincludes/mkfixinc.sh 2025-04-25 11:17:59.000000000 +0300
|
||||||
|
+++ gcc-15.1.0-banan_os/fixincludes/mkfixinc.sh 2025-06-19 11:30:13.427343038 +0300
|
||||||
|
@@ -11,6 +11,7 @@
|
||||||
|
|
||||||
|
# Check for special fix rules for particular targets
|
||||||
|
case $machine in
|
||||||
|
+ *-*-banan_os* | \
|
||||||
|
i?86-*-cygwin* | \
|
||||||
|
*-mingw32* | \
|
||||||
|
powerpc-*-eabisim* | \
|
||||||
|
diff -ruN gcc-15.1.0/gcc/config/banan_os.h gcc-15.1.0-banan_os/gcc/config/banan_os.h
|
||||||
|
--- gcc-15.1.0/gcc/config/banan_os.h 1970-01-01 02:00:00.000000000 +0200
|
||||||
|
+++ gcc-15.1.0-banan_os/gcc/config/banan_os.h 2025-06-19 11:30:53.316059523 +0300
|
||||||
|
@@ -0,0 +1,35 @@
|
||||||
|
+/* Useful if you wish to make target-specific GCC changes. */
|
||||||
|
+#undef TARGET_BANAN_OS
|
||||||
|
+#define TARGET_BANAN_OS 1
|
||||||
|
+
|
||||||
|
+/* Default arguments you want when running your
|
||||||
|
+ *-banan_os-gcc toolchain */
|
||||||
|
+#undef LIB_SPEC
|
||||||
|
+#define LIB_SPEC "-lc" /* link against C standard library */
|
||||||
|
+
|
||||||
|
+/* Files that are linked before user code.
|
||||||
|
+ The %s tells GCC to look for these files in the library directory. */
|
||||||
|
+#undef STARTFILE_SPEC
|
||||||
|
+#define STARTFILE_SPEC "%{!shared:crt0.o%s} crti.o%s %{shared|static-pie|!no-pie:crtbeginS.o%s; :crtbegin.o%s}"
|
||||||
|
+
|
||||||
|
+/* Files that are linked after user code. */
|
||||||
|
+#undef ENDFILE_SPEC
|
||||||
|
+#define ENDFILE_SPEC "%{shared|static-pie|!no-pie:crtendS.o%s; :crtend.o%s} crtn.o%s"
|
||||||
|
+
|
||||||
|
+#undef LINK_SPEC
|
||||||
|
+#define LINK_SPEC "%{shared:-shared} %{static:-static} %{!shared: %{!static: %{rdynamic:-export-dynamic}}}"
|
||||||
|
+
|
||||||
|
+/* We don't have separate math library so don't link it. */
|
||||||
|
+#undef MATH_LIBRARY
|
||||||
|
+#define MATH_LIBRARY ""
|
||||||
|
+
|
||||||
|
+/* Additional predefined macros. */
|
||||||
|
+#undef TARGET_OS_CPP_BUILTINS
|
||||||
|
+#define TARGET_OS_CPP_BUILTINS() \
|
||||||
|
+ do { \
|
||||||
|
+ builtin_define ("__banan_os__"); \
|
||||||
|
+ builtin_define ("__unix__"); \
|
||||||
|
+ builtin_assert ("system=banan_os"); \
|
||||||
|
+ builtin_assert ("system=unix"); \
|
||||||
|
+ builtin_assert ("system=posix"); \
|
||||||
|
+ } while(0);
|
||||||
|
diff -ruN gcc-15.1.0/gcc/config/banan_os.opt gcc-15.1.0-banan_os/gcc/config/banan_os.opt
|
||||||
|
--- gcc-15.1.0/gcc/config/banan_os.opt 1970-01-01 02:00:00.000000000 +0200
|
||||||
|
+++ gcc-15.1.0-banan_os/gcc/config/banan_os.opt 2025-06-19 11:31:29.325802503 +0300
|
||||||
|
@@ -0,0 +1,32 @@
|
||||||
|
+; banan_os options.
|
||||||
|
+
|
||||||
|
+; Copyright (C) 2025 Oskari Alaranta <oskari.alaranta@bananymous.com>
|
||||||
|
+;
|
||||||
|
+; This file is part of GCC.
|
||||||
|
+;
|
||||||
|
+; GCC 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.
|
||||||
|
+;
|
||||||
|
+; GCC 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 GCC; see the file COPYING3. If not see
|
||||||
|
+; <http://www.gnu.org/licenses/>.
|
||||||
|
+
|
||||||
|
+; See the GCC internals manual (options.texi) for a description of
|
||||||
|
+; this file's format.
|
||||||
|
+
|
||||||
|
+; Please try to keep this file in ASCII collating order.
|
||||||
|
+
|
||||||
|
+posix
|
||||||
|
+Driver
|
||||||
|
+
|
||||||
|
+pthread
|
||||||
|
+Driver
|
||||||
|
+
|
||||||
|
+; This comment is to ensure we retain the blank line above.
|
||||||
|
diff -ruN gcc-15.1.0/gcc/config/banan_os.opt.urls gcc-15.1.0-banan_os/gcc/config/banan_os.opt.urls
|
||||||
|
--- gcc-15.1.0/gcc/config/banan_os.opt.urls 1970-01-01 02:00:00.000000000 +0200
|
||||||
|
+++ gcc-15.1.0-banan_os/gcc/config/banan_os.opt.urls 2025-06-19 11:31:29.325802503 +0300
|
||||||
|
@@ -0,0 +1 @@
|
||||||
|
+; Not sure what to put here but this works
|
||||||
|
diff -ruN gcc-15.1.0/gcc/config.gcc gcc-15.1.0-banan_os/gcc/config.gcc
|
||||||
|
--- gcc-15.1.0/gcc/config.gcc 2025-04-25 11:18:00.000000000 +0300
|
||||||
|
+++ gcc-15.1.0-banan_os/gcc/config.gcc 2025-06-19 11:32:50.391220522 +0300
|
||||||
|
@@ -723,6 +723,14 @@
|
||||||
|
|
||||||
|
# Common parts for widely ported systems.
|
||||||
|
case ${target} in
|
||||||
|
+*-*-banan_os*)
|
||||||
|
+ gas=yes
|
||||||
|
+ gnu_ld=yes
|
||||||
|
+ default_use_cxa_atexit=yes
|
||||||
|
+ extra_options="${extra_options} banan_os.opt"
|
||||||
|
+ use_gcc_stdint=provide
|
||||||
|
+ tmake_file="t-slibgcc"
|
||||||
|
+ ;;
|
||||||
|
*-*-darwin*)
|
||||||
|
tmake_file="t-darwin "
|
||||||
|
tm_file="${tm_file} darwin.h"
|
||||||
|
@@ -1972,6 +1980,12 @@
|
||||||
|
tm_file="${tm_file} i386/unix.h i386/att.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h i386/rdos.h i386/rdos64.h"
|
||||||
|
tmake_file="i386/t-i386elf t-svr4"
|
||||||
|
;;
|
||||||
|
+i[34567]86-*-banan_os*)
|
||||||
|
+ tm_file="${tm_file} i386/unix.h i386/att.h elfos.h glibc-stdint.h i386/i386elf.h banan_os.h"
|
||||||
|
+ ;;
|
||||||
|
+x86_64-*-banan_os*)
|
||||||
|
+ tm_file="${tm_file} i386/unix.h i386/att.h elfos.h glibc-stdint.h i386/i386elf.h i386/x86-64.h banan_os.h"
|
||||||
|
+ ;;
|
||||||
|
i[34567]86-*-dragonfly*)
|
||||||
|
tm_file="${tm_file} i386/unix.h i386/att.h elfos.h dragonfly.h dragonfly-stdint.h i386/dragonfly.h"
|
||||||
|
tmake_file="${tmake_file} i386/t-crtstuff"
|
||||||
|
diff -ruN gcc-15.1.0/libgcc/config/t-slibgcc gcc-15.1.0-banan_os/libgcc/config/t-slibgcc
|
||||||
|
--- gcc-15.1.0/libgcc/config/t-slibgcc 2025-04-25 11:18:04.000000000 +0300
|
||||||
|
+++ gcc-15.1.0-banan_os/libgcc/config/t-slibgcc 2025-06-19 11:34:04.674683603 +0300
|
||||||
|
@@ -26,7 +26,6 @@
|
||||||
|
SHLIB_OBJS = @shlib_objs@
|
||||||
|
SHLIB_DIR = @multilib_dir@
|
||||||
|
SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
|
||||||
|
-SHLIB_LC = -lc
|
||||||
|
SHLIB_MAKE_SOLINK = $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK)
|
||||||
|
SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \
|
||||||
|
$(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
|
||||||
|
diff -ruN gcc-15.1.0/libgcc/config.host gcc-15.1.0-banan_os/libgcc/config.host
|
||||||
|
--- gcc-15.1.0/libgcc/config.host 2025-04-25 11:18:04.000000000 +0300
|
||||||
|
+++ gcc-15.1.0-banan_os/libgcc/config.host 2025-06-19 11:33:42.354845264 +0300
|
||||||
|
@@ -627,6 +627,14 @@
|
||||||
|
fixed_point=no
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
+i[34567]86-*-banan_os*)
|
||||||
|
+ extra_parts="$extra_parts crti.o crtbegin.o crtbeginS.o crtend.o crtendS.o crtn.o"
|
||||||
|
+ tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic t-slibgcc"
|
||||||
|
+ ;;
|
||||||
|
+x86_64-*-banan_os*)
|
||||||
|
+ extra_parts="$extra_parts crti.o crtbegin.o crtbeginS.o crtend.o crtendS.o crtn.o"
|
||||||
|
+ tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic t-slibgcc"
|
||||||
|
+ ;;
|
||||||
|
bfin*-elf*)
|
||||||
|
tmake_file="bfin/t-bfin bfin/t-crtlibid bfin/t-crtstuff t-libgcc-pic t-fdpbit"
|
||||||
|
extra_parts="$extra_parts crtbeginS.o crtendS.o crti.o crtn.o crtlibid.o"
|
||||||
|
diff -ruN gcc-15.1.0/libstdc++-v3/acinclude.m4 gcc-15.1.0-banan_os/libstdc++-v3/acinclude.m4
|
||||||
|
--- gcc-15.1.0/libstdc++-v3/acinclude.m4 2025-04-25 11:18:05.000000000 +0300
|
||||||
|
+++ gcc-15.1.0-banan_os/libstdc++-v3/acinclude.m4 2025-06-19 11:34:58.939289470 +0300
|
||||||
|
@@ -1792,7 +1792,7 @@
|
||||||
|
ac_has_nanosleep=yes
|
||||||
|
ac_has_sched_yield=yes
|
||||||
|
;;
|
||||||
|
- freebsd*|netbsd*|dragonfly*|rtems*)
|
||||||
|
+ freebsd*|netbsd*|dragonfly*|rtems*|banan_os*)
|
||||||
|
ac_has_clock_monotonic=yes
|
||||||
|
ac_has_clock_realtime=yes
|
||||||
|
ac_has_nanosleep=yes
|
||||||
|
diff -ruN gcc-15.1.0/libstdc++-v3/configure gcc-15.1.0-banan_os/libstdc++-v3/configure
|
||||||
|
--- gcc-15.1.0/libstdc++-v3/configure 2025-04-25 11:18:05.000000000 +0300
|
||||||
|
+++ gcc-15.1.0-banan_os/libstdc++-v3/configure 2025-06-19 11:37:41.265102481 +0300
|
||||||
|
@@ -15789,8 +15789,8 @@ if test "$enable_shared" = yes; then
|
||||||
|
glibcxx_compiler_shared_flag="-D_GLIBCXX_SHARED"
|
||||||
|
|
||||||
|
else
|
||||||
|
- glibcxx_lt_pic_flag=
|
||||||
|
- glibcxx_compiler_pic_flag=
|
||||||
|
+ glibcxx_lt_pic_flag="-prefer-pic"
|
||||||
|
+ glibcxx_compiler_pic_flag="$lt_prog_compiler_pic_CXX"
|
||||||
|
glibcxx_compiler_shared_flag=
|
||||||
|
fi
|
||||||
|
|
||||||
|
@@ -21377,7 +21377,7 @@
|
||||||
|
ac_has_nanosleep=yes
|
||||||
|
ac_has_sched_yield=yes
|
||||||
|
;;
|
||||||
|
- freebsd*|netbsd*|dragonfly*|rtems*)
|
||||||
|
+ freebsd*|netbsd*|dragonfly*|rtems*|banan_os*)
|
||||||
|
ac_has_clock_monotonic=yes
|
||||||
|
ac_has_clock_realtime=yes
|
||||||
|
ac_has_nanosleep=yes
|
||||||
|
@@ -28654,7 +28654,7 @@
|
||||||
|
# This is a freestanding configuration; there is nothing to do here.
|
||||||
|
;;
|
||||||
|
|
||||||
|
- avr*-*-*)
|
||||||
|
+ avr*-*-* | *banan_os*)
|
||||||
|
$as_echo "#define HAVE_ACOSF 1" >>confdefs.h
|
||||||
|
|
||||||
|
$as_echo "#define HAVE_ASINF 1" >>confdefs.h
|
||||||
|
diff -ruN gcc-15.1.0/libstdc++-v3/crossconfig.m4 gcc-15.1.0-banan_os/libstdc++-v3/crossconfig.m4
|
||||||
|
--- gcc-15.1.0/libstdc++-v3/crossconfig.m4 2025-04-25 11:18:05.000000000 +0300
|
||||||
|
+++ gcc-15.1.0-banan_os/libstdc++-v3/crossconfig.m4 2025-06-19 11:36:53.954449540 +0300
|
||||||
|
@@ -9,7 +9,7 @@
|
||||||
|
# This is a freestanding configuration; there is nothing to do here.
|
||||||
|
;;
|
||||||
|
|
||||||
|
- avr*-*-*)
|
||||||
|
+ avr*-*-* | *banan_os*)
|
||||||
|
AC_DEFINE(HAVE_ACOSF)
|
||||||
|
AC_DEFINE(HAVE_ASINF)
|
||||||
|
AC_DEFINE(HAVE_ATAN2F)
|
Loading…
Reference in New Issue