2024-08-27 17:36:09 +03:00
|
|
|
diff -ruN gcc-12.2.0/config.sub gcc-12.2.0-banan_os/config.sub
|
|
|
|
--- gcc-12.2.0/config.sub 2022-08-19 11:09:52.128656687 +0300
|
2024-09-05 12:54:22 +03:00
|
|
|
+++ gcc-12.2.0-banan_os/config.sub 2024-09-03 23:09:34.347772496 +0300
|
2024-08-27 17:36:09 +03:00
|
|
|
@@ -1749,7 +1749,7 @@
|
2023-04-06 00:02:13 +03:00
|
|
|
| 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*)
|
2024-08-27 17:36:09 +03:00
|
|
|
diff -ruN gcc-12.2.0/fixincludes/mkfixinc.sh gcc-12.2.0-banan_os/fixincludes/mkfixinc.sh
|
|
|
|
--- gcc-12.2.0/fixincludes/mkfixinc.sh 2022-08-19 11:09:52.160657095 +0300
|
2024-09-05 12:54:22 +03:00
|
|
|
+++ gcc-12.2.0-banan_os/fixincludes/mkfixinc.sh 2024-09-03 23:09:34.461106020 +0300
|
2024-08-27 17:36:09 +03:00
|
|
|
@@ -11,6 +11,7 @@
|
2023-04-06 00:02:13 +03:00
|
|
|
|
|
|
|
# Check for special fix rules for particular targets
|
|
|
|
case $machine in
|
|
|
|
+ *-banan_os* | \
|
|
|
|
i?86-*-cygwin* | \
|
|
|
|
i?86-*-mingw32* | \
|
|
|
|
x86_64-*-mingw32* | \
|
2024-08-27 17:36:09 +03:00
|
|
|
diff -ruN gcc-12.2.0/gcc/config/banan_os.h gcc-12.2.0-banan_os/gcc/config/banan_os.h
|
|
|
|
--- gcc-12.2.0/gcc/config/banan_os.h 1970-01-01 02:00:00.000000000 +0200
|
2024-09-05 12:54:22 +03:00
|
|
|
+++ gcc-12.2.0-banan_os/gcc/config/banan_os.h 2024-09-03 23:09:34.461106020 +0300
|
2024-08-27 17:36:09 +03:00
|
|
|
@@ -0,0 +1,35 @@
|
2023-10-30 11:02:57 +02:00
|
|
|
+/* Useful if you wish to make target-specific GCC changes. */
|
|
|
|
+#undef TARGET_BANAN_OS
|
|
|
|
+#define TARGET_BANAN_OS 1
|
2024-08-27 17:36:09 +03:00
|
|
|
+
|
2023-10-30 11:02:57 +02:00
|
|
|
+/* Default arguments you want when running your
|
|
|
|
+ *-banan_os-gcc toolchain */
|
|
|
|
+#undef LIB_SPEC
|
|
|
|
+#define LIB_SPEC "-lc" /* link against C standard library */
|
2024-08-27 17:36:09 +03:00
|
|
|
+
|
2023-10-30 11:02:57 +02:00
|
|
|
+/* Files that are linked before user code.
|
|
|
|
+ The %s tells GCC to look for these files in the library directory. */
|
|
|
|
+#undef STARTFILE_SPEC
|
2024-09-05 12:54:22 +03:00
|
|
|
+#define STARTFILE_SPEC "%{!shared:crt0.o%s} crti.o%s %{shared|static-pie|!no-pie:crtbeginS.o%s; :crtbegin.o%s}"
|
2024-08-27 17:36:09 +03:00
|
|
|
+
|
2023-10-30 11:02:57 +02:00
|
|
|
+/* Files that are linked after user code. */
|
|
|
|
+#undef ENDFILE_SPEC
|
2024-09-05 12:54:22 +03:00
|
|
|
+#define ENDFILE_SPEC "%{shared|static-pie|!no-pie:crtendS.o%s; :crtend.o%s} crtn.o%s"
|
2024-08-27 17:36:09 +03:00
|
|
|
+
|
|
|
|
+#undef LINK_SPEC
|
|
|
|
+#define LINK_SPEC "%{shared:-shared} %{static:-static} %{!shared: %{!static: %{rdynamic:-export-dynamic}}}"
|
|
|
|
+
|
2023-10-30 11:02:57 +02:00
|
|
|
+/* We don't have separate math library so don't link it. */
|
2024-08-27 17:36:09 +03:00
|
|
|
+#undef MATH_LIBRARY
|
2023-10-30 11:02:57 +02:00
|
|
|
+#define MATH_LIBRARY ""
|
2024-08-27 17:36:09 +03:00
|
|
|
+
|
2023-10-30 11:02:57 +02:00
|
|
|
+/* 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);
|
2024-08-27 17:36:09 +03:00
|
|
|
diff -ruN gcc-12.2.0/gcc/config.gcc gcc-12.2.0-banan_os/gcc/config.gcc
|
|
|
|
--- gcc-12.2.0/gcc/config.gcc 2022-08-19 11:09:52.552662114 +0300
|
2024-09-05 12:54:22 +03:00
|
|
|
+++ gcc-12.2.0-banan_os/gcc/config.gcc 2024-09-03 23:09:34.461106020 +0300
|
|
|
|
@@ -673,6 +673,13 @@
|
2024-08-27 17:36:09 +03:00
|
|
|
|
|
|
|
# Common parts for widely ported systems.
|
|
|
|
case ${target} in
|
|
|
|
+*-*-banan_os*)
|
|
|
|
+ gas=yes
|
|
|
|
+ gnu_ld=yes
|
|
|
|
+ default_use_cxa_atexit=yes
|
|
|
|
+ use_gcc_stdint=provide
|
2024-09-05 12:54:22 +03:00
|
|
|
+ tmake_file="t-slibgcc"
|
2024-08-27 17:36:09 +03:00
|
|
|
+ ;;
|
|
|
|
*-*-darwin*)
|
|
|
|
tmake_file="t-darwin "
|
|
|
|
tm_file="${tm_file} darwin.h"
|
|
|
|
@@ -1870,6 +1876,12 @@
|
|
|
|
dwarf2=no
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
+i[34567]86-*-banan_os*)
|
|
|
|
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.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 dbxelf.h elfos.h glibc-stdint.h i386/i386elf.h i386/x86-64.h banan_os.h"
|
|
|
|
+ ;;
|
|
|
|
i[34567]86-*-darwin1[89]* | i[34567]86-*-darwin2*)
|
|
|
|
echo "Error: 32bit target is not supported after Darwin17" 1>&2
|
|
|
|
;;
|
|
|
|
diff -ruN gcc-12.2.0/libgcc/config.host gcc-12.2.0-banan_os/libgcc/config.host
|
|
|
|
--- gcc-12.2.0/libgcc/config.host 2022-08-19 11:09:54.664689148 +0300
|
2024-09-05 12:54:22 +03:00
|
|
|
+++ gcc-12.2.0-banan_os/libgcc/config.host 2024-09-03 23:09:34.474439376 +0300
|
2024-08-27 17:36:09 +03:00
|
|
|
@@ -698,6 +698,14 @@
|
2023-10-30 11:02:57 +02:00
|
|
|
hppa*-*-netbsd*)
|
|
|
|
tmake_file="$tmake_file pa/t-netbsd"
|
|
|
|
;;
|
|
|
|
+i[34567]86-*-banan_os*)
|
2024-09-05 12:54:22 +03:00
|
|
|
+ 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"
|
2023-10-30 11:02:57 +02:00
|
|
|
+ ;;
|
|
|
|
+x86_64-*-banan_os*)
|
2024-09-05 12:54:22 +03:00
|
|
|
+ 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"
|
2023-10-30 11:02:57 +02:00
|
|
|
+ ;;
|
|
|
|
i[34567]86-*-darwin*)
|
|
|
|
tmake_file="$tmake_file i386/t-crtpc t-crtfm i386/t-msabi"
|
|
|
|
tm_file="$tm_file i386/darwin-lib.h"
|
2024-09-05 12:54:22 +03:00
|
|
|
diff -ruN gcc-12.2.0/libgcc/config/t-slibgcc gcc-12.2.0-banan_os/libgcc/config/t-slibgcc
|
|
|
|
--- gcc-12.2.0/libgcc/config/t-slibgcc 2022-08-19 11:09:54.724689916 +0300
|
|
|
|
+++ gcc-12.2.0-banan_os/libgcc/config/t-slibgcc 2024-09-04 23:06:14.275389818 +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)
|
2024-08-27 17:36:09 +03:00
|
|
|
diff -ruN gcc-12.2.0/libstdc++-v3/acinclude.m4 gcc-12.2.0-banan_os/libstdc++-v3/acinclude.m4
|
|
|
|
--- gcc-12.2.0/libstdc++-v3/acinclude.m4 2022-08-19 11:09:55.380698313 +0300
|
2024-09-05 12:54:22 +03:00
|
|
|
+++ gcc-12.2.0-banan_os/libstdc++-v3/acinclude.m4 2024-09-03 23:09:34.477772715 +0300
|
2024-08-27 17:36:09 +03:00
|
|
|
@@ -1380,7 +1380,7 @@
|
|
|
|
ac_has_nanosleep=yes
|
|
|
|
ac_has_sched_yield=yes
|
|
|
|
;;
|
|
|
|
- openbsd*)
|
|
|
|
+ openbsd*|banan_os*)
|
|
|
|
ac_has_clock_monotonic=yes
|
|
|
|
ac_has_clock_realtime=yes
|
|
|
|
ac_has_nanosleep=yes
|
|
|
|
diff -ruN gcc-12.2.0/libstdc++-v3/configure gcc-12.2.0-banan_os/libstdc++-v3/configure
|
|
|
|
--- gcc-12.2.0/libstdc++-v3/configure 2022-08-19 11:09:55.416698774 +0300
|
2024-09-05 12:54:22 +03:00
|
|
|
+++ gcc-12.2.0-banan_os/libstdc++-v3/configure 2024-09-03 23:09:34.487772732 +0300
|
2024-08-27 17:36:09 +03:00
|
|
|
@@ -11904,6 +11904,11 @@
|
|
|
|
lt_cv_dlopen_self=yes
|
2023-04-06 00:02:13 +03:00
|
|
|
;;
|
|
|
|
|
2024-08-27 17:36:09 +03:00
|
|
|
+ banan_os*)
|
|
|
|
+ lt_cv_dlopen="dlopen"
|
|
|
|
+ lt_cv_dlopen_libs=
|
|
|
|
+ ;;
|
2023-04-06 00:02:13 +03:00
|
|
|
+
|
2024-08-27 17:36:09 +03:00
|
|
|
mingw* | pw32* | cegcc*)
|
|
|
|
lt_cv_dlopen="LoadLibrary"
|
|
|
|
lt_cv_dlopen_libs=
|
2024-09-05 12:54:22 +03:00
|
|
|
@@ -15603,8 +15608,8 @@
|
|
|
|
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
|
|
|
|
|
2024-08-27 17:36:09 +03:00
|
|
|
@@ -20575,7 +20580,7 @@
|
|
|
|
ac_has_nanosleep=yes
|
|
|
|
ac_has_sched_yield=yes
|
|
|
|
;;
|
|
|
|
- openbsd*)
|
|
|
|
+ openbsd*|banan_os*)
|
|
|
|
ac_has_clock_monotonic=yes
|
|
|
|
ac_has_clock_realtime=yes
|
|
|
|
ac_has_nanosleep=yes
|
|
|
|
@@ -29245,7 +29250,7 @@
|
|
|
|
# This is a freestanding configuration; there is nothing to do here.
|
2023-04-06 00:02:13 +03:00
|
|
|
;;
|
|
|
|
|
2024-08-27 17:36:09 +03:00
|
|
|
- avr*-*-*)
|
|
|
|
+ avr*-*-* | *banan_os* )
|
|
|
|
$as_echo "#define HAVE_ACOSF 1" >>confdefs.h
|
|
|
|
|
|
|
|
$as_echo "#define HAVE_ASINF 1" >>confdefs.h
|
|
|
|
diff -ruN gcc-12.2.0/libstdc++-v3/crossconfig.m4 gcc-12.2.0-banan_os/libstdc++-v3/crossconfig.m4
|
|
|
|
--- gcc-12.2.0/libstdc++-v3/crossconfig.m4 2022-08-19 11:09:55.420698825 +0300
|
2024-09-05 12:54:22 +03:00
|
|
|
+++ gcc-12.2.0-banan_os/libstdc++-v3/crossconfig.m4 2024-09-03 23:09:34.531106138 +0300
|
2024-08-27 17:36:09 +03:00
|
|
|
@@ -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)
|