Skip to content

Instantly share code, notes, and snippets.

@kallisti5
Created March 18, 2022 15:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kallisti5/7a088456bac66dbeefb849aaa7c90213 to your computer and use it in GitHub Desktop.
Save kallisti5/7a088456bac66dbeefb849aaa7c90213 to your computer and use it in GitHub Desktop.
DIFF ALL THE THINGS! Old gcc haikuports patch vs new
diff -Naur -x .git gcc-11.2.0-oldpatch/config/acx.m4 gcc-11.2.0-newpatch/config/acx.m4
--- gcc-11.2.0-oldpatch/config/acx.m4 2022-03-18 10:56:11.440842923 -0500
+++ gcc-11.2.0-newpatch/config/acx.m4 2022-03-18 10:55:00.167012448 -0500
@@ -428,30 +428,24 @@
dnl accepted by cmp on some systems.
AC_DEFUN([ACX_PROG_CMP_IGNORE_INITIAL],
[AC_CACHE_CHECK([how to compare bootstrapped objects], gcc_cv_prog_cmp_skip,
-[# comparing object files via cmp doesn't work on haiku (files will seemingly
- # always differ), so we disassemble both files and compare the results:
- if uname -o | grep -iq haiku; then
- gcc_cv_prog_cmp_skip='objdump -Dz $$f1 | tail +6 >tmp-foo1; objdump -Dz $$f2 | tail +6 >tmp-foo2; cmp tmp-foo1 tmp-foo2'
- else
- echo abfoo >t1
- echo cdfoo >t2
- gcc_cv_prog_cmp_skip='tail -c +17 $$f1 > tmp-foo1; tail -c +17 $$f2 > tmp-foo2; cmp tmp-foo1 tmp-foo2'
- if cmp t1 t2 2 2 > /dev/null 2>&1; then
- if cmp t1 t2 1 1 > /dev/null 2>&1; then
- :
- else
- gcc_cv_prog_cmp_skip='cmp $$f1 $$f2 16 16'
- fi
+[ echo abfoo >t1
+ echo cdfoo >t2
+ gcc_cv_prog_cmp_skip='tail -c +17 $$f1 > tmp-foo1; tail -c +17 $$f2 > tmp-foo2; cmp tmp-foo1 tmp-foo2'
+ if cmp t1 t2 2 2 > /dev/null 2>&1; then
+ if cmp t1 t2 1 1 > /dev/null 2>&1; then
+ :
+ else
+ gcc_cv_prog_cmp_skip='cmp $$f1 $$f2 16 16'
fi
- if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
- if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
- :
- else
- gcc_cv_prog_cmp_skip='cmp --ignore-initial=16 $$f1 $$f2'
- fi
+ fi
+ if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
+ if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
+ :
+ else
+ gcc_cv_prog_cmp_skip='cmp --ignore-initial=16 $$f1 $$f2'
fi
- rm t1 t2
fi
+ rm t1 t2
])
do_compare="$gcc_cv_prog_cmp_skip"
AC_SUBST(do_compare)
diff -Naur -x .git gcc-11.2.0-oldpatch/configure gcc-11.2.0-newpatch/configure
--- gcc-11.2.0-oldpatch/configure 2022-03-18 10:56:11.934179733 -0500
+++ gcc-11.2.0-newpatch/configure 2022-03-18 10:55:17.043795862 -0500
@@ -756,6 +756,7 @@
docdir
oldincludedir
includedir
+runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -922,6 +923,7 @@
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE}'
@@ -1174,6 +1176,15 @@
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1311,7 +1322,7 @@
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
+ libdir localedir mandir runstatedir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -1471,6 +1482,7 @@
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -5462,30 +5474,24 @@
if ${gcc_cv_prog_cmp_skip+:} false; then :
$as_echo_n "(cached) " >&6
else
- # comparing object files via cmp doesn't work on haiku (files will seemingly
- # always differ), so we disassemble both files and compare the results:
- if uname -o | grep -iq haiku; then
- gcc_cv_prog_cmp_skip='objdump -Dz $$f1 | tail +6 >tmp-foo1; objdump -Dz $$f2 | tail +6 >tmp-foo2; cmp tmp-foo1 tmp-foo2'
- else
- echo abfoo >t1
- echo cdfoo >t2
- gcc_cv_prog_cmp_skip='tail -c +17 $$f1 > tmp-foo1; tail -c +17 $$f2 > tmp-foo2; cmp tmp-foo1 tmp-foo2'
- if cmp t1 t2 2 2 > /dev/null 2>&1; then
- if cmp t1 t2 1 1 > /dev/null 2>&1; then
- :
- else
- gcc_cv_prog_cmp_skip='cmp $$f1 $$f2 16 16'
- fi
+ echo abfoo >t1
+ echo cdfoo >t2
+ gcc_cv_prog_cmp_skip='tail -c +17 $$f1 > tmp-foo1; tail -c +17 $$f2 > tmp-foo2; cmp tmp-foo1 tmp-foo2'
+ if cmp t1 t2 2 2 > /dev/null 2>&1; then
+ if cmp t1 t2 1 1 > /dev/null 2>&1; then
+ :
+ else
+ gcc_cv_prog_cmp_skip='cmp $$f1 $$f2 16 16'
fi
- if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
- if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
- :
- else
- gcc_cv_prog_cmp_skip='cmp --ignore-initial=16 $$f1 $$f2'
- fi
+ fi
+ if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
+ if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
+ :
+ else
+ gcc_cv_prog_cmp_skip='cmp --ignore-initial=16 $$f1 $$f2'
fi
- rm t1 t2
fi
+ rm t1 t2
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_prog_cmp_skip" >&5
diff -Naur -x .git gcc-11.2.0-oldpatch/gcc/config/aarch64/aarch64.h gcc-11.2.0-newpatch/gcc/config/aarch64/aarch64.h
--- gcc-11.2.0-oldpatch/gcc/config/aarch64/aarch64.h 2021-07-28 01:55:07.008283451 -0500
+++ gcc-11.2.0-newpatch/gcc/config/aarch64/aarch64.h 2022-03-18 10:55:17.057129288 -0500
@@ -1236,7 +1236,7 @@
#define MCPU_TO_MARCH_SPEC_FUNCTIONS \
{ "rewrite_mcpu", aarch64_rewrite_mcpu },
-#if defined(__aarch64__)
+#if defined(__aarch64__) && ! defined(__APPLE__)
extern const char *host_detect_local_cpu (int argc, const char **argv);
#define HAVE_LOCAL_CPU_DETECT
# define EXTRA_SPEC_FUNCTIONS \
diff -Naur -x .git gcc-11.2.0-oldpatch/gcc/config/aarch64/aarch64-haiku.h gcc-11.2.0-newpatch/gcc/config/aarch64/aarch64-haiku.h
--- gcc-11.2.0-oldpatch/gcc/config/aarch64/aarch64-haiku.h 1969-12-31 18:00:00.000000000 -0600
+++ gcc-11.2.0-newpatch/gcc/config/aarch64/aarch64-haiku.h 2022-03-18 10:55:17.057129288 -0500
@@ -0,0 +1,73 @@
+/* Machine description for AArch64 architecture.
+ Copyright (C) 2009-2018 Free Software Foundation, Inc.
+ Contributed by ARM Ltd.
+ Updated for Haiku by Jaroslaw Pelczar <jarek@jpelczar.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/>. */
+
+#ifndef GCC_AARCH64_HAIKU_H
+#define GCC_AARCH64_HAIKU_H
+
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define ("__HAIKU__"); \
+ builtin_define ("__stdcall=__attribute__((__stdcall__))"); \
+ builtin_define ("__cdecl=__attribute__((__cdecl__))"); \
+ builtin_define ("__STDC_ISO_10646__=201103L"); \
+ builtin_assert ("system=haiku"); \
+ } \
+ while (0)
+
+#if TARGET_BIG_ENDIAN_DEFAULT
+#define TARGET_LINKER_EMULATION "aarch64haikub"
+#else
+#define TARGET_LINKER_EMULATION "aarch64haiku"
+#endif
+
+#if TARGET_FIX_ERR_A53_835769_DEFAULT
+#define CA53_ERR_835769_SPEC \
+ " %{!mno-fix-cortex-a53-835769:--fix-cortex-a53-835769}"
+#else
+#define CA53_ERR_835769_SPEC \
+ " %{mfix-cortex-a53-835769:--fix-cortex-a53-835769}"
+#endif
+
+#if TARGET_FIX_ERR_A53_843419_DEFAULT
+#define CA53_ERR_843419_SPEC \
+ " %{!mno-fix-cortex-a53-843419:--fix-cortex-a53-843419}"
+#else
+#define CA53_ERR_843419_SPEC \
+ " %{mfix-cortex-a53-843419:--fix-cortex-a53-843419}"
+#endif
+
+
+/* Uninitialized common symbols in non-PIE executables, even with
+ strong definitions in dependent shared libraries, will resolve
+ to COPY relocated symbol in the executable. See PR65780. */
+#undef TARGET_BINDS_LOCAL_P
+#define TARGET_BINDS_LOCAL_P default_binds_local_p_2
+
+/* Define this to be nonzero if static stack checking is supported. */
+#define STACK_CHECK_STATIC_BUILTIN 1
+
+
+#undef LINK_SPEC
+#define LINK_SPEC "-m " TARGET_LINKER_EMULATION " %{!r:-shared} %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}}\
+ %{mbig-endian:-EB} %{mlittle-endian:-EL} " CA53_ERR_835769_SPEC " " CA53_ERR_843419_SPEC " -X"
+
+#endif /* GCC_AARCH64_HAIKU_H */
diff -Naur -x .git gcc-11.2.0-oldpatch/gcc/config/aarch64/t-aarch64-haiku gcc-11.2.0-newpatch/gcc/config/aarch64/t-aarch64-haiku
--- gcc-11.2.0-oldpatch/gcc/config/aarch64/t-aarch64-haiku 1969-12-31 18:00:00.000000000 -0600
+++ gcc-11.2.0-newpatch/gcc/config/aarch64/t-aarch64-haiku 2022-03-18 10:55:17.057129288 -0500
@@ -0,0 +1,21 @@
+# Machine description for AArch64 architecture.
+# Copyright (C) 2016-2018 Free Software Foundation, Inc.
+#
+# 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/>.
+
+LIB1ASMSRC = aarch64/lib1funcs.asm
+LIB1ASMFUNCS = _aarch64_sync_cache_range
diff -Naur -x .git gcc-11.2.0-oldpatch/gcc/config/arm/haiku.h gcc-11.2.0-newpatch/gcc/config/arm/haiku.h
--- gcc-11.2.0-oldpatch/gcc/config/arm/haiku.h 2022-03-18 10:56:11.447509636 -0500
+++ gcc-11.2.0-newpatch/gcc/config/arm/haiku.h 2022-03-18 10:55:17.057129288 -0500
@@ -45,7 +45,6 @@
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
/* Now we define the strings used to build the spec file. */
-/* interestingly, bpabi defines __GXX_TYPEINFO_EQUALITY_INLINE=0 too as we do. */
#undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() \
@@ -58,12 +57,6 @@
builtin_define ("__cdecl=__attribute__((__cdecl__))"); \
builtin_define ("__STDC_ISO_10646__=201103L"); \
builtin_assert ("system=haiku"); \
- /* Haiku apparently doesn't support merging of symbols across shared \
- object boundaries. Hence we need to explicitly specify that \
- type_infos are not merged, so that they get compared by name \
- instead of by pointer. */ \
- builtin_define ("__GXX_MERGED_TYPEINFO_NAMES=0"); \
- /*builtin_define ("__GXX_TYPEINFO_EQUALITY_INLINE=0"); done in bpabi: */\
TARGET_BPABI_CPP_BUILTINS(); \
} \
while (0)
@@ -75,6 +68,6 @@
/* If ELF is the default format, we should not use /lib/elf. */
#undef LINK_SPEC
-#define LINK_SPEC "%{!o*:-o %b} -m armelf %{!r:-shared} %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}}\
+#define LINK_SPEC "-m armelf_haiku %{!r:-shared} %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}}\
%{mbig-endian:-EB} %{mlittle-endian:-EL} -X"
diff -Naur -x .git gcc-11.2.0-oldpatch/gcc/config/haiku-stdint.h gcc-11.2.0-newpatch/gcc/config/haiku-stdint.h
--- gcc-11.2.0-oldpatch/gcc/config/haiku-stdint.h 2022-03-18 10:56:11.447509636 -0500
+++ gcc-11.2.0-newpatch/gcc/config/haiku-stdint.h 2022-03-18 10:55:17.057129288 -0500
@@ -1,5 +1,5 @@
/* Definitions for <stdint.h> types on Haiku.
- Copyright (C) 2014 Paweł Dziepak.
+ Copyright (C) 2014 Free Software Foundation, Inc.
This file is part of GCC.
diff -Naur -x .git gcc-11.2.0-oldpatch/gcc/config/host-darwin.c gcc-11.2.0-newpatch/gcc/config/host-darwin.c
--- gcc-11.2.0-oldpatch/gcc/config/host-darwin.c 2021-07-28 01:55:07.060284175 -0500
+++ gcc-11.2.0-newpatch/gcc/config/host-darwin.c 2022-03-18 10:55:17.057129288 -0500
@@ -79,3 +79,5 @@
return ret;
}
+
+const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER;
diff -Naur -x .git gcc-11.2.0-oldpatch/gcc/config/m68k/haiku.h gcc-11.2.0-newpatch/gcc/config/m68k/haiku.h
--- gcc-11.2.0-oldpatch/gcc/config/m68k/haiku.h 2022-03-18 10:56:11.447509636 -0500
+++ gcc-11.2.0-newpatch/gcc/config/m68k/haiku.h 2022-03-18 10:55:17.057129288 -0500
@@ -108,7 +108,7 @@
#undef LINK_SPEC
/*#define LINK_SPEC "%{!o*:-o %b} -m elf_m68k_haiku -shared -no-undefined %{nostart:-e 0}"*/
-#define LINK_SPEC "%{!o*:-o %b} -m m68kelf %{!r:-shared} -no-undefined %{nostart:-e 0}"
+#define LINK_SPEC "-m m68kelf %{!r:-shared} %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}}"
/* XXX: not sure for the rest there... */
@@ -243,7 +243,7 @@
#undef FINALIZE_TRAMPOLINE
#define FINALIZE_TRAMPOLINE(TRAMP) \
emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__clear_cache"), \
- LCT_NORMAL, VOIDmode, 2, TRAMP, Pmode, \
+ LCT_NORMAL, VOIDmode, TRAMP, Pmode, \
plus_constant (Pmode, TRAMP, TRAMPOLINE_SIZE), \
Pmode);
diff -Naur -x .git gcc-11.2.0-oldpatch/gcc/config/mips/haiku.h gcc-11.2.0-newpatch/gcc/config/mips/haiku.h
--- gcc-11.2.0-oldpatch/gcc/config/mips/haiku.h 2022-03-18 10:56:11.447509636 -0500
+++ gcc-11.2.0-newpatch/gcc/config/mips/haiku.h 2022-03-18 10:55:17.057129288 -0500
@@ -40,5 +40,5 @@
while (0)
#undef LINK_SPEC
-#define LINK_SPEC "%{!o*:-o %b} -m elf_mipsel_haiku %{!r:-shared} %{nostart:-e 0}"
+#define LINK_SPEC "-m elf_mipsel_haiku %{!r:-shared} %{nostart:-e 0}"
diff -Naur -x .git gcc-11.2.0-oldpatch/gcc/config/riscv/haiku.h gcc-11.2.0-newpatch/gcc/config/riscv/haiku.h
--- gcc-11.2.0-oldpatch/gcc/config/riscv/haiku.h 1969-12-31 18:00:00.000000000 -0600
+++ gcc-11.2.0-newpatch/gcc/config/riscv/haiku.h 2022-03-18 10:55:17.060462645 -0500
@@ -0,0 +1,57 @@
+/* Definitions for RISC-V Haiku systems with ELF format.
+ Copyright (C) 1998-2017 Free Software Foundation, Inc.
+
+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/>. */
+
+#undef TARGET_OS_CPP_BUILTINS
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define ("__HAIKU__"); \
+ if (POINTER_SIZE == 64) \
+ builtin_define ("__riscv64__"); \
+ else \
+ builtin_define ("__riscv32__"); \
+ builtin_define ("__RISCV__"); \
+ builtin_define ("__riscv__"); \
+ builtin_define ("__stdcall=__attribute__((__stdcall__))"); \
+ builtin_define ("__cdecl=__attribute__((__cdecl__))"); \
+ builtin_define ("__STDC_ISO_10646__=201103L"); \
+ builtin_assert ("system=haiku"); \
+ } \
+ while (0)
+
+#define MUSL_ABI_SUFFIX \
+ "%{mabi=ilp32:-sf}" \
+ "%{mabi=ilp32f:-sp}" \
+ "%{mabi=ilp32d:}" \
+ "%{mabi=lp64:-sf}" \
+ "%{mabi=lp64f:-sp}" \
+ "%{mabi=lp64d:}" \
+
+#undef LIB_SPEC
+// Linux adds -latomic because RISC-V only has word-sized atomics
+// Not sure if we really need it though.
+#define LIB_SPEC " -lroot "
+
+// riscv.h defines /lib and friends which breaks the sysroot
+#undef STARTFILE_PREFIX_SPEC
+
+#define ICACHE_FLUSH_FUNC "__riscv_flush_icache"
+
+#undef LINK_SPEC
+#define LINK_SPEC "-melf" XLEN_SPEC "lriscv %{!r:-shared} %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}} -X"
diff -Naur -x .git gcc-11.2.0-oldpatch/gcc/config/riscv/t-haiku gcc-11.2.0-newpatch/gcc/config/riscv/t-haiku
--- gcc-11.2.0-oldpatch/gcc/config/riscv/t-haiku 1969-12-31 18:00:00.000000000 -0600
+++ gcc-11.2.0-newpatch/gcc/config/riscv/t-haiku 2022-03-18 10:55:17.060462645 -0500
@@ -0,0 +1,4 @@
+# Disable for now, only RV64 on Haiku for the moment
+# Only XLEN and ABI affect multilib dir names, e.g. /lib32/ilp32d/
+#MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib64,$(MULTILIB_DIRNAMES)))
+#MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES))
diff -Naur -x .git gcc-11.2.0-oldpatch/gcc/config/rs6000/haiku.h gcc-11.2.0-newpatch/gcc/config/rs6000/haiku.h
--- gcc-11.2.0-oldpatch/gcc/config/rs6000/haiku.h 2022-03-18 10:56:11.447509636 -0500
+++ gcc-11.2.0-newpatch/gcc/config/rs6000/haiku.h 2022-03-18 10:55:17.060462645 -0500
@@ -53,4 +53,4 @@
/* If ELF is the default format, we should not use /lib/elf. */
#undef LINK_SPEC
-#define LINK_SPEC "%{!o*:-o %b} -m elf32ppchaiku %{!r:-shared} %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}}"
+#define LINK_SPEC "-m elf32ppchaiku %{!r:-shared} %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}}"
diff -Naur -x .git gcc-11.2.0-oldpatch/gcc/config/sparc/haiku.h gcc-11.2.0-newpatch/gcc/config/sparc/haiku.h
--- gcc-11.2.0-oldpatch/gcc/config/sparc/haiku.h 1969-12-31 18:00:00.000000000 -0600
+++ gcc-11.2.0-newpatch/gcc/config/sparc/haiku.h 2022-03-18 10:55:17.060462645 -0500
@@ -0,0 +1,93 @@
+/* Definitions of target machine for GCC, for ELF on Haiku/sparc64.
+ Copyright (C) 2002-2017 Free Software Foundation, Inc.
+ Contributed by Matthew Green (mrg@eterna.com.au).
+
+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/>. */
+
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define ("__HAIKU__"); \
+ if (TARGET_ARCH64) \
+ { \
+ builtin_define ("__sparc64__"); \
+ builtin_define ("__sparc_v9__"); \
+ builtin_define ("__sparcv9"); \
+ } \
+ else \
+ builtin_define ("__sparc"); \
+ builtin_define ("__sparc__"); \
+ } \
+ while (0)
+
+/* Provide a LINK_SPEC appropriate for Haiku. Here we provide support
+ for the special GCC options -static and -shared, which allow us to
+ link things in one of these three modes by applying the appropriate
+ combinations of options at link-time. */
+
+#undef LINK_SPEC
+#define LINK_SPEC "-m elf64_sparc %{!r:-shared} %{nostart:-e 0} \
+ %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}}"
+/* SIZE_TYPE and PTRDIFF_TYPE are wrong from sparc/sparc.h. */
+#undef SIZE_TYPE
+#define SIZE_TYPE "long unsigned int"
+
+#undef PTRDIFF_TYPE
+#define PTRDIFF_TYPE "long int"
+
+/* This is the char to use for continuation (in case we need to turn
+ continuation back on). */
+#undef DBX_CONTIN_CHAR
+#define DBX_CONTIN_CHAR '?'
+
+#undef LOCAL_LABEL_PREFIX
+#define LOCAL_LABEL_PREFIX "."
+
+/* This is how to store into the string LABEL
+ the symbol_ref name of an internal numbered label where
+ PREFIX is the class of label and NUM is the number within the class.
+ This is suitable for output with `assemble_name'. */
+
+#undef ASM_GENERATE_INTERNAL_LABEL
+#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
+ sprintf ((LABEL), "*.L%s%ld", (PREFIX), (long)(NUM))
+
+#undef USER_LABEL_PREFIX
+#define USER_LABEL_PREFIX ""
+
+#undef ASM_SPEC
+#define ASM_SPEC "%{" FPIE_OR_FPIC_SPEC ":-K PIC} \
+%(asm_cpu) %(asm_arch) %(asm_relax)"
+
+#define HAVE_ENABLE_EXECUTE_STACK
+
+#undef TARGET_DEFAULT
+#define TARGET_DEFAULT \
+ (MASK_V9 + MASK_PTR64 + MASK_64BIT /* + MASK_HARD_QUAD */ \
+ + MASK_STACK_BIAS + MASK_APP_REGS + MASK_FPU + MASK_LONG_DOUBLE_128)
+
+#undef SPARC_DEFAULT_CMODEL
+#define SPARC_DEFAULT_CMODEL CM_MEDANY
+
+/* Build a compiler that supports -m32 and -m64? */
+
+#undef LONG_DOUBLE_TYPE_SIZE
+#define LONG_DOUBLE_TYPE_SIZE 128
+
+/* We use GNU ld so undefine this so that attribute((init_priority)) works. */
+#undef CTORS_SECTION_ASM_OP
+#undef DTORS_SECTION_ASM_OP
diff -Naur -x .git gcc-11.2.0-oldpatch/gcc/config/sparc/t-haiku gcc-11.2.0-newpatch/gcc/config/sparc/t-haiku
--- gcc-11.2.0-oldpatch/gcc/config/sparc/t-haiku 1969-12-31 18:00:00.000000000 -0600
+++ gcc-11.2.0-newpatch/gcc/config/sparc/t-haiku 2022-03-18 10:55:17.060462645 -0500
@@ -0,0 +1,5 @@
+# Disable multilib for now, as we don't intend to support SPARC32.
+#MULTILIB_OPTIONS = m32/m64
+#MULTILIB_DIRNAMES = 32 64
+#MULTILIB_MATCHES =
+
diff -Naur -x .git gcc-11.2.0-oldpatch/gcc/config.gcc gcc-11.2.0-newpatch/gcc/config.gcc
--- gcc-11.2.0-oldpatch/gcc/config.gcc 2022-03-18 10:56:12.060847293 -0500
+++ gcc-11.2.0-newpatch/gcc/config.gcc 2022-03-18 10:55:17.053795932 -0500
@@ -180,7 +180,7 @@
# the --with-sysroot configure option or the
# --sysroot command line option is used this
# will be relative to the sysroot.
-# target_type_format_char
+# target_type_format_char
# The default character to be used for formatting
# the attribute in a
# .type symbol_name, ${t_t_f_c}<property>
@@ -1148,6 +1148,12 @@
tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-netbsd"
extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
;;
+aarch64*-*-haiku*)
+ gcc_cv_initfini_array=yes
+ tm_file="${tm_file} dbxelf.h elfos.h haiku.h haiku-stdint.h"
+ tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-haiku.h"
+ tmake_file="${tmake_file} t-haiku aarch64/t-aarch64 aarch64/t-aarch64-haiku"
+ ;;
aarch64*-*-linux*)
tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h"
tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-errata.h aarch64/aarch64-linux.h"
@@ -2452,7 +2458,7 @@
default_m68k_cpu=68020
default_cf_cpu=5206
tmake_file="${tmake_file} m68k/t-m68kbare m68k/t-crtstuff t-haiku" #??
- tm_file="${tm_file} dbxelf.h elfos.h haiku.h m68k/haiku.h"
+ tm_file="${tm_file} dbxelf.h elfos.h haiku.h m68k/haiku.h haiku-stdint.h"
tm_defines="${tm_defines} MOTOROLA=1"
;;
mcore-*-elf)
@@ -2506,6 +2512,13 @@
cxx_target_objs="${cxx_target_objs} microblaze-c.o"
tmake_file="${tmake_file} microblaze/t-microblaze"
;;
+riscv*-*-haiku*)
+ gcc_cv_initfini_array=yes
+ tm_file="elfos.h haiku.h ${tm_file} riscv/haiku.h haiku-stdint.h"
+ tmake_file="${tmake_file} t-haiku riscv/t-riscv riscv/t-haiku"
+ gnu_ld=yes
+ gas=yes
+ ;;
riscv*-*-linux*)
tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} riscv/linux.h"
case "x${enable_multilib}" in
@@ -2594,7 +2607,7 @@
;;
mipsel-*-haiku*)
target_cpu_default="MASK_ABICALLS"
- tm_file="elfos.h ${tm_file} haiku.h mips/haiku.h"
+ tm_file="elfos.h ${tm_file} haiku.h mips/haiku.h haiku-stdint.h"
tmake_file="${tmake_file} mips/t-elf t-haiku"
;;
mips*-*-linux*) # Linux MIPS, either endian.
@@ -3024,7 +3037,7 @@
;;
powerpc-*-haiku*)
tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppcos rs6000/t-ppccomm t-haiku"
- tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h haiku.h rs6000/haiku.h"
+ tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h haiku.h rs6000/haiku.h haiku-stdint.h"
extra_options="${extra_options} rs6000/sysv4.opt"
;;
powerpc-*-rtems*)
@@ -3479,6 +3492,11 @@
extra_options="${extra_options}"
tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems-64"
;;
+sparc64-*-haiku*)
+ tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp64-elf.h haiku.h sparc/haiku.h haiku-stdint.h"
+ extra_options="${extra_options}"
+ tmake_file="${tmake_file} t-haiku sparc/t-sparc sparc/t-haiku"
+ ;;
sparc64-*-linux*)
tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/default64.h sparc/linux64.h sparc/tso.h"
extra_options="${extra_options} sparc/long-double-switch.opt"
diff -Naur -x .git gcc-11.2.0-oldpatch/gcc/config.host gcc-11.2.0-newpatch/gcc/config.host
--- gcc-11.2.0-oldpatch/gcc/config.host 2022-03-18 10:56:11.444176279 -0500
+++ gcc-11.2.0-newpatch/gcc/config.host 2022-03-18 10:55:17.057129288 -0500
@@ -99,7 +99,7 @@
esac
case ${host} in
- aarch64*-*-freebsd* | aarch64*-*-linux* | aarch64*-*-fuchsia*)
+ aarch64*-*-freebsd* | aarch64*-*-linux* | aarch64*-*-fuchsia* | aarch64*-*-haiku*)
case ${target} in
aarch64*-*-*)
host_extra_gcc_objs="driver-aarch64.o"
@@ -134,10 +134,10 @@
esac
;;
mips*-*-linux* \
- | mips*-*-haiku* )
+ | mips*-*-haiku*)
case ${target} in
mips*-*-linux* \
- | mips*-*-haiku* )
+ | mips*-*-haiku*)
host_extra_gcc_objs="driver-native.o"
host_xmake_file="${host_xmake_file} mips/x-native"
;;
diff -Naur -x .git gcc-11.2.0-oldpatch/gcc/configure gcc-11.2.0-newpatch/gcc/configure
--- gcc-11.2.0-oldpatch/gcc/configure 2022-03-18 10:56:11.940846446 -0500
+++ gcc-11.2.0-newpatch/gcc/configure 2022-03-18 10:55:17.060462645 -0500
@@ -957,7 +957,6 @@
enable_coverage
enable_gather_detailed_mem_stats
enable_valgrind_annotations
-with_hybrid_secondary
with_stabs
enable_multilib
enable_multiarch
@@ -7575,7 +7574,6 @@
fi
-
# With stabs
# Check whether --with-stabs was given.
@@ -9718,7 +9716,6 @@
;;
esac
-
# These libraries may be used by collect2.
# We may need a special search path to get them linked.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for collect2 libraries" >&5
@@ -16515,6 +16512,8 @@
haiku*)
# PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ lt_prog_compiler_static=
;;
hpux*)
@@ -19140,7 +19139,7 @@
lt_cv_dlopen_libs=
case $host_os in
- beos* | haiku* )
+ beos*)
lt_cv_dlopen="load_add_on"
lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes
@@ -21338,6 +21337,7 @@
;;
esac
;;
+
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
@@ -21359,6 +21359,8 @@
;;
haiku*)
# PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ lt_prog_compiler_static_CXX=
;;
interix[3-9]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
diff -Naur -x .git gcc-11.2.0-oldpatch/gcc/configure.ac gcc-11.2.0-newpatch/gcc/configure.ac
--- gcc-11.2.0-oldpatch/gcc/configure.ac 2022-03-18 10:56:11.447509636 -0500
+++ gcc-11.2.0-newpatch/gcc/configure.ac 2022-03-18 10:55:17.070462714 -0500
@@ -1304,7 +1304,6 @@
# UNSORTED
# --------
-
# Configure -lm usage for host tools that need it
build_math_library="-lm"
case $build in
diff -Naur -x .git gcc-11.2.0-oldpatch/gcc/Makefile.in gcc-11.2.0-newpatch/gcc/Makefile.in
--- gcc-11.2.0-oldpatch/gcc/Makefile.in 2022-03-18 10:56:11.534176913 -0500
+++ gcc-11.2.0-newpatch/gcc/Makefile.in 2022-03-18 10:55:17.050462575 -0500
@@ -2293,7 +2293,7 @@
-DCONFIGURE_SPECS="\"@CONFIGURE_SPECS@\"" \
-DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
-DNATIVE_SYSTEM_HEADER_DIR=\"$(NATIVE_SYSTEM_HEADER_DIR)\"
-
+
ifneq ($(HYBRID_SECONDARY),)
DRIVER_DEFINES += -DHYBRID_SECONDARY="\"$(HYBRID_SECONDARY)\""
endif
diff -Naur -x .git gcc-11.2.0-oldpatch/include/filenames.h gcc-11.2.0-newpatch/include/filenames.h
--- gcc-11.2.0-oldpatch/include/filenames.h 2022-03-18 10:56:11.450842992 -0500
+++ gcc-11.2.0-newpatch/include/filenames.h 2022-03-18 10:55:17.073796071 -0500
@@ -37,9 +37,11 @@
# ifndef HAVE_DOS_BASED_FILE_SYSTEM
# define HAVE_DOS_BASED_FILE_SYSTEM 1
# endif
+/*
# ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM
# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1
# endif
+*/
# define HAS_DRIVE_SPEC(f) HAS_DOS_DRIVE_SPEC (f)
# define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c)
# define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f)
diff -Naur -x .git gcc-11.2.0-oldpatch/libcody/configure gcc-11.2.0-newpatch/libcody/configure
--- gcc-11.2.0-oldpatch/libcody/configure 2021-07-28 01:55:08.712307227 -0500
+++ gcc-11.2.0-newpatch/libcody/configure 2022-03-18 10:55:17.080462784 -0500
@@ -2496,7 +2496,7 @@
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#if __cplusplus != 201103
+#if __cplusplus < 201103
#error "C++11 is required"
#endif
diff -Naur -x .git gcc-11.2.0-oldpatch/libgcc/config/aarch64/haiku-unwind.h gcc-11.2.0-newpatch/libgcc/config/aarch64/haiku-unwind.h
--- gcc-11.2.0-oldpatch/libgcc/config/aarch64/haiku-unwind.h 1969-12-31 18:00:00.000000000 -0600
+++ gcc-11.2.0-newpatch/libgcc/config/aarch64/haiku-unwind.h 2022-03-18 10:55:17.083796140 -0500
@@ -0,0 +1,51 @@
+/* DWARF2 EH unwinding support for FreeBSD/ARM64 (aarch64).
+ Copyright (C) 2017-2018 Free Software Foundation, Inc.
+ Contributed by John Marino <gnugcc@marino.st>
+
+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.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+<http://www.gnu.org/licenses/>. */
+
+/* Identify a signal frame, and set the frame state data appropriately.
+ See unwind-dw2.c for the structs. */
+
+/* Always include AArch64 unwinder header file. */
+#include "config/aarch64/aarch64-unwind.h"
+
+#include <sys/types.h>
+#include <signal.h>
+#include <unistd.h>
+#include <signal.h>
+
+#define REG_NAME(reg) mc_gpregs.gp_## reg
+#define XREG(num) mc_gpregs.gp_x[num]
+#define DARC __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__
+
+#define MD_FALLBACK_FRAME_STATE_FOR aarch64_haiku_fallback_frame_state
+
+static _Unwind_Reason_Code
+aarch64_haiku_fallback_frame_state
+(struct _Unwind_Context *context, _Unwind_FrameState *fs)
+{
+ // For now just signal end of stack. Once the Haiku implementation
+ // for AArch64 is more mature we can consider writing something similar
+ // to Linux or FreeBSD support.
+ return _URC_END_OF_STACK;
+}
diff -Naur -x .git gcc-11.2.0-oldpatch/libgcc/config.host gcc-11.2.0-newpatch/libgcc/config.host
--- gcc-11.2.0-oldpatch/libgcc/config.host 2022-03-18 10:56:11.834179028 -0500
+++ gcc-11.2.0-newpatch/libgcc/config.host 2022-03-18 10:55:17.083796140 -0500
@@ -103,7 +103,7 @@
;;
avr-*-*)
cpu_type=avr
- ;;
+ ;;
bfin*-*)
cpu_type=bfin
;;
@@ -390,6 +390,11 @@
tmake_file="${tmake_file} ${cpu_type}/t-lse t-slibgcc-libgcc"
tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp"
;;
+aarch64*-*-haiku*)
+ tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
+ tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp"
+ md_unwind_header=aarch64/haiku-unwind.h
+ ;;
aarch64*-*-linux*)
extra_parts="$extra_parts crtfastmath.o"
md_unwind_header=aarch64/linux-unwind.h
@@ -939,7 +944,7 @@
lm32-*-uclinux*)
extra_parts="$extra_parts crtbegin.o crtendS.o crtbeginT.o"
tmake_file="lm32/t-lm32 lm32/t-uclinux t-libgcc-pic t-softfp-sfdf t-softfp"
- ;;
+ ;;
m32r-*-elf*)
tmake_file="$tmake_file m32r/t-m32r t-fdpbit"
extra_parts="$extra_parts crtinit.o crtfini.o"
@@ -1461,6 +1466,8 @@
fi
md_unwind_header=sparc/linux-unwind.h
;;
+sparc64-*-haiku*)
+ ;;
sparc64-*-netbsd*)
;;
tic6x-*-uclinux)
diff -Naur -x .git gcc-11.2.0-oldpatch/libgcc/Makefile.in gcc-11.2.0-newpatch/libgcc/Makefile.in
--- gcc-11.2.0-oldpatch/libgcc/Makefile.in 2022-03-18 10:56:11.450842992 -0500
+++ gcc-11.2.0-newpatch/libgcc/Makefile.in 2022-03-18 10:55:01.920357882 -0500
@@ -402,16 +402,10 @@
endif
endif
-ifneq ($(enable_shared),yes)
-# Maintain the same visibility as older GCC for now. Needed on Haiku
-# because the static library is included in libroot.so.
-vis_hide =
-else
# For -fvisibility=hidden. We need both a -fvisibility=hidden on
# the command line, and a #define to prevent libgcc2.h etc from
# overriding that with #pragmas.
vis_hide = @vis_hide@
-endif
ifneq (,$(vis_hide))
diff -Naur -x .git gcc-11.2.0-oldpatch/libstdc++-v3/acinclude.m4 gcc-11.2.0-newpatch/libstdc++-v3/acinclude.m4
--- gcc-11.2.0-oldpatch/libstdc++-v3/acinclude.m4 2022-03-18 10:56:11.760845178 -0500
+++ gcc-11.2.0-newpatch/libstdc++-v3/acinclude.m4 2022-03-18 10:55:01.950358089 -0500
@@ -4579,9 +4579,6 @@
solaris*)
enable_libstdcxx_filesystem_ts=yes
;;
- haiku*)
- enable_libstdcxx_filesystem_ts=yes
- ;;
mingw*)
enable_libstdcxx_filesystem_ts=yes
;;
diff -Naur -x .git gcc-11.2.0-oldpatch/libstdc++-v3/config/os/haiku/ctype_base.h gcc-11.2.0-newpatch/libstdc++-v3/config/os/haiku/ctype_base.h
--- gcc-11.2.0-oldpatch/libstdc++-v3/config/os/haiku/ctype_base.h 2022-03-18 10:56:11.454176350 -0500
+++ gcc-11.2.0-newpatch/libstdc++-v3/config/os/haiku/ctype_base.h 2022-03-18 10:55:17.093796210 -0500
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 1997-2015 Free Software Foundation, Inc.
+// Copyright (C) 1997-2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -53,7 +53,7 @@
static const mask punct = 1 << 9;
static const mask alnum = (1 << 2) | (1 << 3); // alpha|digit
#if __cplusplus >= 201103L
- static const mask blank = 1 << 10;
+ static const mask blank = 1 << 10;
#endif
};
diff -Naur -x .git gcc-11.2.0-oldpatch/libstdc++-v3/configure gcc-11.2.0-newpatch/libstdc++-v3/configure
--- gcc-11.2.0-oldpatch/libstdc++-v3/configure 2022-03-18 10:56:11.964179944 -0500
+++ gcc-11.2.0-newpatch/libstdc++-v3/configure 2022-03-18 10:55:17.093796210 -0500
@@ -11836,7 +11836,7 @@
lt_cv_dlopen_libs=
case $host_os in
- beos* | haiku* )
+ beos* | haiku*)
lt_cv_dlopen="load_add_on"
lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes
@@ -14055,6 +14055,7 @@
;;
esac
;;
+
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
@@ -47519,11 +47520,6 @@
;;
- *-fuchsia*)
- SECTION_FLAGS='-ffunction-sections -fdata-sections'
-
- ;;
-
*-haiku*)
for ac_header in nan.h ieeefp.h endian.h sys/isa_defs.h \
machine/endian.h machine/param.h sys/machine.h sys/types.h \
@@ -47607,6 +47603,11 @@
;;
+ *-fuchsia*)
+ SECTION_FLAGS='-ffunction-sections -fdata-sections'
+
+ ;;
+
*-hpux*)
SECTION_FLAGS='-ffunction-sections -fdata-sections'
@@ -75979,9 +75980,6 @@
solaris*)
enable_libstdcxx_filesystem_ts=yes
;;
- haiku*)
- enable_libstdcxx_filesystem_ts=yes
- ;;
mingw*)
enable_libstdcxx_filesystem_ts=yes
;;
diff -Naur -x .git gcc-11.2.0-oldpatch/libstdc++-v3/configure.host gcc-11.2.0-newpatch/libstdc++-v3/configure.host
--- gcc-11.2.0-oldpatch/libstdc++-v3/configure.host 2022-03-18 10:56:11.454176350 -0500
+++ gcc-11.2.0-newpatch/libstdc++-v3/configure.host 2022-03-18 10:55:17.113796347 -0500
@@ -357,7 +357,7 @@
;;
esac
;;
- arm*-*-freebsd*)
+ arm*-*-freebsd* | arm*-*-haiku*)
port_specific_symbol_files="\$(srcdir)/../config/os/gnu-linux/arm-eabi-extra.ver"
;;
powerpc*-*-darwin*)
diff -Naur -x .git gcc-11.2.0-oldpatch/libstdc++-v3/crossconfig.m4 gcc-11.2.0-newpatch/libstdc++-v3/crossconfig.m4
--- gcc-11.2.0-oldpatch/libstdc++-v3/crossconfig.m4 2022-03-18 10:56:11.454176350 -0500
+++ gcc-11.2.0-newpatch/libstdc++-v3/crossconfig.m4 2022-03-18 10:55:17.113796347 -0500
@@ -90,7 +90,7 @@
*-freebsd*)
SECTION_FLAGS='-ffunction-sections -fdata-sections'
- AC_SUBST(SECTION_FLAGS)
+ AC_SUBST(SECTION_FLAGS)
GLIBCXX_CHECK_LINKER_FEATURES
AC_DEFINE(HAVE_SETENV)
AC_DEFINE(HAVE_FINITEF)
@@ -136,11 +136,6 @@
AC_CHECK_FUNCS(uselocale)
;;
- *-fuchsia*)
- SECTION_FLAGS='-ffunction-sections -fdata-sections'
- AC_SUBST(SECTION_FLAGS)
- ;;
-
*-haiku*)
AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
machine/endian.h machine/param.h sys/machine.h sys/types.h \
@@ -181,6 +176,11 @@
AC_DEFINE(HAVE_TLS)
;;
+ *-fuchsia*)
+ SECTION_FLAGS='-ffunction-sections -fdata-sections'
+ AC_SUBST(SECTION_FLAGS)
+ ;;
+
*-hpux*)
SECTION_FLAGS='-ffunction-sections -fdata-sections'
AC_SUBST(SECTION_FLAGS)
@@ -268,7 +268,7 @@
;;
*-qnx6.1* | *-qnx6.2*)
SECTION_FLAGS='-ffunction-sections -fdata-sections'
- AC_SUBST(SECTION_FLAGS)
+ AC_SUBST(SECTION_FLAGS)
GLIBCXX_CHECK_LINKER_FEATURES
AC_DEFINE(HAVE_COSF)
AC_DEFINE(HAVE_COSL)
diff -Naur -x .git gcc-11.2.0-oldpatch/libstdc++-v3/src/c++17/Makefile.am gcc-11.2.0-newpatch/libstdc++-v3/src/c++17/Makefile.am
--- gcc-11.2.0-oldpatch/libstdc++-v3/src/c++17/Makefile.am 2021-07-28 01:55:09.336315933 -0500
+++ gcc-11.2.0-newpatch/libstdc++-v3/src/c++17/Makefile.am 2022-03-18 10:55:17.200463616 -0500
@@ -79,7 +79,7 @@
# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
# as the occasion calls for it.
AM_CXXFLAGS = \
- -std=gnu++17 \
+ -std=gnu++17 -nostdinc++ \
$(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \
$(XTEMPLATE_FLAGS) $(VTV_CXXFLAGS) \
$(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) \
diff -Naur -x .git gcc-11.2.0-oldpatch/libstdc++-v3/src/c++17/Makefile.in gcc-11.2.0-newpatch/libstdc++-v3/src/c++17/Makefile.in
--- gcc-11.2.0-oldpatch/libstdc++-v3/src/c++17/Makefile.in 2021-07-28 01:55:09.336315933 -0500
+++ gcc-11.2.0-newpatch/libstdc++-v3/src/c++17/Makefile.in 2022-03-18 10:55:17.200463616 -0500
@@ -455,7 +455,7 @@
# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
# as the occasion calls for it.
AM_CXXFLAGS = \
- -std=gnu++17 \
+ -std=gnu++17 -nostdinc++ \
$(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \
$(XTEMPLATE_FLAGS) $(VTV_CXXFLAGS) \
$(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) \
diff -Naur -x .git gcc-11.2.0-oldpatch/libtool.m4 gcc-11.2.0-newpatch/libtool.m4
--- gcc-11.2.0-oldpatch/libtool.m4 2022-03-18 10:56:11.454176350 -0500
+++ gcc-11.2.0-newpatch/libtool.m4 2022-03-18 10:55:17.113796347 -0500
@@ -1139,7 +1139,7 @@
# Invoke $ECHO with all args, space-separated.
func_echo_all ()
{
- $ECHO "$*"
+ $ECHO "$*"
}
case "$ECHO" in
@@ -1724,7 +1724,7 @@
lt_cv_dlopen_libs=
case $host_os in
- beos* | haiku* )
+ beos* | haiku*)
lt_cv_dlopen="load_add_on"
lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes
@@ -3601,6 +3601,7 @@
;;
esac
;;
+
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment