gcc-8.3: apply libstdcxx-filesystem-ts patch from 7.3

This commit is contained in:
kikadf
2019-06-21 14:18:58 +02:00
committed by Jerome Duval
parent 5a0e783858
commit b5df226545
2 changed files with 295 additions and 178 deletions

View File

@@ -5,7 +5,7 @@ HOMEPAGE="https://gcc.gnu.org/"
COPYRIGHT="1988-2019 Free Software Foundation, Inc." COPYRIGHT="1988-2019 Free Software Foundation, Inc."
LICENSE="GNU GPL v3 LICENSE="GNU GPL v3
GNU LGPL v3" GNU LGPL v3"
REVISION="4" REVISION="5"
gccVersion="${portVersion%%_*}" gccVersion="${portVersion%%_*}"
SOURCE_URI="https://ftpmirror.gnu.org/gcc/gcc-$gccVersion/gcc-$gccVersion.tar.xz SOURCE_URI="https://ftpmirror.gnu.org/gcc/gcc-$gccVersion/gcc-$gccVersion.tar.xz
https://ftp.gnu.org/gnu/gcc/gcc-$gccVersion/gcc-$gccVersion.tar.xz" https://ftp.gnu.org/gnu/gcc/gcc-$gccVersion/gcc-$gccVersion.tar.xz"
@@ -103,17 +103,18 @@ required by Haiku's build system when building Haiku."
PROVIDES_syslibs_devel=" PROVIDES_syslibs_devel="
gcc${secondaryArchSuffix}_syslibs_devel = $portVersion compat >= 7 gcc${secondaryArchSuffix}_syslibs_devel = $portVersion compat >= 7
devel:libatomic$secondaryArchSuffix = $libatomicLibVersion compat >= $libatomicSoVersion devel:libatomic$secondaryArchSuffix = $libatomicLibVersion compat >= $libatomicSoVersion
devel:libgcc_kernel$secondaryArchSuffix = $libgccLibVersion compat >= $libgccSoVersion
devel:libgcc$secondaryArchSuffix = $libgccLibVersion compat >= $libgccSoVersion devel:libgcc$secondaryArchSuffix = $libgccLibVersion compat >= $libgccSoVersion
devel:libgcc_eh_kernel$secondaryArchSuffix = $libgccLibVersion compat >= $libgccSoVersion
devel:libgcc_eh$secondaryArchSuffix = $libgccLibVersion compat >= $libgccSoVersion devel:libgcc_eh$secondaryArchSuffix = $libgccLibVersion compat >= $libgccSoVersion
devel:libgcc_eh_kernel$secondaryArchSuffix = $libgccLibVersion compat >= $libgccSoVersion
devel:libgcc_kernel$secondaryArchSuffix = $libgccLibVersion compat >= $libgccSoVersion
devel:libgcc_s$secondaryArchSuffix = $libgccLibVersion compat >= $libgccSoVersion
devel:libgfortran$secondaryArchSuffix = $libgfortranLibVersion compat >= $libgfortranSoVersion devel:libgfortran$secondaryArchSuffix = $libgfortranLibVersion compat >= $libgfortranSoVersion
devel:libgomp$secondaryArchSuffix = $libgompLibVersion compat >= $libgompSoVersion devel:libgomp$secondaryArchSuffix = $libgompLibVersion compat >= $libgompSoVersion
devel:libquadmath$secondaryArchSuffix = $libquadmathLibVersion compat >= $libquadmathSoVersion devel:libquadmath$secondaryArchSuffix = $libquadmathLibVersion compat >= $libquadmathSoVersion
devel:libssp$secondaryArchSuffix = $libsspLibVersion compat >= $libsspSoVersion devel:libssp$secondaryArchSuffix = $libsspLibVersion compat >= $libsspSoVersion
devel:libssp_nonshared$secondaryArchSuffix = $libsspLibVersion devel:libssp_nonshared$secondaryArchSuffix = $libsspLibVersion
devel:libstdc++$secondaryArchSuffix = $libstdcxxLibVersion compat >= $libstdcxxSoVersion devel:libstdc++$secondaryArchSuffix = $libstdcxxLibVersion compat >= $libstdcxxSoVersion
devel:libstdc++fs$secondaryArchSuffix = $portVersion compat >= 5 devel:libstdc++fs$secondaryArchSuffix = $portVersion compat >= 7
devel:libsupc++$secondaryArchSuffix = $portVersion compat >= 7 devel:libsupc++$secondaryArchSuffix = $portVersion compat >= 7
devel:libsupc++_kernel$secondaryArchSuffix = $portVersion compat >= 7 devel:libsupc++_kernel$secondaryArchSuffix = $portVersion compat >= 7
" "
@@ -326,7 +327,8 @@ INSTALL()
$gccLibDir/libstdc++.so.$libstdcxxSoVersion \ $gccLibDir/libstdc++.so.$libstdcxxSoVersion \
$gccLibDir/libstdc++.so.$libstdcxxLibVersion \ $gccLibDir/libstdc++.so.$libstdcxxLibVersion \
$libDir/ $libDir/
rm $gccLibDir/libstdc++*.a rm $gccLibDir/libstdc++.a
cp $gccLibDir/libstdc++fs.a $developLibDir
# libsupc++ # libsupc++
libstdcxxDir=$objectsDir/$effectiveTargetMachineTriple/libstdc++-v3 libstdcxxDir=$objectsDir/$effectiveTargetMachineTriple/libstdc++-v3
@@ -444,6 +446,7 @@ INSTALL()
$developLibDir/libgcc_eh.a \ $developLibDir/libgcc_eh.a \
$developLibDir/libgcc_eh-kernel.a \ $developLibDir/libgcc_eh-kernel.a \
$developLibDir/libssp_nonshared.a \ $developLibDir/libssp_nonshared.a \
$developLibDir/libstdc++fs.a \
$developLibDir/libsupc++.a \ $developLibDir/libsupc++.a \
$developLibDir/libsupc++-kernel.a \ $developLibDir/libsupc++-kernel.a \
$relativeIncludeDir $relativeIncludeDir

View File

@@ -1,4 +1,4 @@
From 5aaa98e8cfcbf1a1a103556ab6e6906229d5f7de Mon Sep 17 00:00:00 2001 From 9ed355050e6efbb3f355c75614bbd3fad5875373 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= <jerome.duval@gmail.com> From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= <jerome.duval@gmail.com>
Date: Sun, 19 Jul 2015 18:55:34 +0200 Date: Sun, 19 Jul 2015 18:55:34 +0200
Subject: Haiku patch Subject: Haiku patch
@@ -2403,14 +2403,148 @@ index 24d13f3..94d96d9 100644
2.21.0 2.21.0
From d062f95f39cb99f5b226b9602c0fae54ce23e2e5 Mon Sep 17 00:00:00 2001 From db7fda79169a0c34eccfb4e59494f909fb4f1682 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= <jerome.duval@gmail.com>
Date: Mon, 27 Jul 2015 16:32:32 +0200
Subject: Haiku: disable -fno-PIE as this fails on x86_64.
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index f42df7e..74d3ef4 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -266,7 +266,7 @@ NO_PIE_CFLAGS = @NO_PIE_CFLAGS@
NO_PIE_FLAG = @NO_PIE_FLAG@
# We don't want to compile the compilers with -fPIE, it make PCH fail.
-COMPILER += $(NO_PIE_CFLAGS)
+#COMPILER += $(NO_PIE_CFLAGS)
# Link with -no-pie since we compile the compiler with -fno-PIE.
LINKER += $(NO_PIE_FLAG)
@@ -785,9 +785,9 @@ NO_PIE_CFLAGS_FOR_BUILD = @NO_PIE_CFLAGS_FOR_BUILD@
NO_PIE_FLAG_FOR_BUILD = @NO_PIE_FLAG_FOR_BUILD@
BUILD_CFLAGS= @BUILD_CFLAGS@ -DGENERATOR_FILE
BUILD_CXXFLAGS = @BUILD_CXXFLAGS@ -DGENERATOR_FILE
-BUILD_NO_PIE_CFLAGS = @BUILD_NO_PIE_CFLAGS@
-BUILD_CFLAGS += $(BUILD_NO_PIE_CFLAGS)
-BUILD_CXXFLAGS += $(BUILD_NO_PIE_CFLAGS)
+#BUILD_NO_PIE_CFLAGS = @BUILD_NO_PIE_CFLAGS@
+#BUILD_CFLAGS += $(BUILD_NO_PIE_CFLAGS)
+#BUILD_CXXFLAGS += $(BUILD_NO_PIE_CFLAGS)
# Native compiler that we use. This may be C++ some day.
COMPILER_FOR_BUILD = $(CXX_FOR_BUILD)
--
2.21.0
From 1a310e23661d1ca4eebcda4bbe7355f608d56015 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Thu, 5 May 2016 09:03:06 +0000
Subject: fix for libstdc++/69506
diff --git a/libstdc++-v3/config/os/haiku/os_defines.h b/libstdc++-v3/config/os/haiku/os_defines.h
index 4674f7b..02c8693 100644
--- a/libstdc++-v3/config/os/haiku/os_defines.h
+++ b/libstdc++-v3/config/os/haiku/os_defines.h
@@ -42,4 +42,7 @@
#define _GLIBCXX_USE_CLOCK_REALTIME 1
#endif
+// See libstdc++/69506
+#define _GLIBCXX_USE_WEAK_REF 0
+
#endif
--
2.21.0
From eec59d0c39df43d09e4e90346d5568229b2fc453 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Thu, 5 May 2016 15:52:08 +0000
Subject: rename x86_elf_aligned_common.
diff --git a/gcc/config/i386/haiku64.h b/gcc/config/i386/haiku64.h
index 76ba48e..e2fa55a 100644
--- a/gcc/config/i386/haiku64.h
+++ b/gcc/config/i386/haiku64.h
@@ -112,9 +112,9 @@ Boston, MA 02111-1307, USA. */
#define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} \
%{Wa,*:%*} %{" SPEC_32 ":--32} %{" SPEC_64 ":--64}"
-#undef ASM_OUTPUT_ALIGNED_COMMON
-#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
- x86_elf_aligned_common (FILE, NAME, SIZE, ALIGN);
+#undef ASM_OUTPUT_ALIGNED_DECL_COMMON
+#define ASM_OUTPUT_ALIGNED_DECL_COMMON(FILE, DECL, NAME, SIZE, ALIGN) \
+ x86_elf_aligned_decl_common (FILE, DECL, NAME, SIZE, ALIGN);
/* i386 System V Release 4 uses DWARF debugging info.
--
2.21.0
From f749815a6f04c090366533e42273f6572ea9d94d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Wed, 2 May 2018 08:37:20 +0200
Subject: Enable libstdcxx_filesystem_ts for Haiku
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 4f37b6a..7d8fd79 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -4299,6 +4299,9 @@ AC_DEFUN([GLIBCXX_ENABLE_FILESYSTEM_TS], [
solaris*)
enable_libstdcxx_filesystem_ts=yes
;;
+ haiku*)
+ enable_libstdcxx_filesystem_ts=yes
+ ;;
*)
enable_libstdcxx_filesystem_ts=no
;;
--
2.21.0
From d067b5a492216daa2d6888017a865cb0fbf6982f Mon Sep 17 00:00:00 2001
From: Jessica Hamilton <jessica.l.hamilton@gmail.com>
Date: Fri, 12 Jul 2019 18:17:00 +0000
Subject: gcc: fix build configuration for libgcc.
* libgcc_s.so now depends on libgcc.a for __cpu_model and friends,
which is needed for gfortran to produce working binaries.
diff --git a/libgcc/config.host b/libgcc/config.host
index 26d080a..bdc2b1c 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -240,7 +240,7 @@ case ${host} in
# machine-specific sections may refine and add to this
# configuration.
tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-haiku t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver"
- tmake_file="$tmake_file t-slibgcc-nolc-override"
+ tmake_file="$tmake_file t-slibgcc-libgcc t-slibgcc-nolc-override"
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
;;
*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
--
2.21.0
From 8358539b6cfa67c39a79c027011bf5af3ef5ee96 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com> From: Jerome Duval <jerome.duval@gmail.com>
Date: Fri, 12 May 2017 23:49:00 +0200 Date: Fri, 12 May 2017 23:49:00 +0200
Subject: Haiku: regenerate configure. Subject: Haiku: regenerate configure.
diff --git a/configure b/configure diff --git a/configure b/configure
index 0601395..052505c 100755 index 0601395..6b5406d 100755
--- a/configure --- a/configure
+++ b/configure +++ b/configure
@@ -3053,6 +3053,9 @@ case "${host}" in @@ -3053,6 +3053,9 @@ case "${host}" in
@@ -2508,8 +2642,17 @@ index 0601395..052505c 100755
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_prog_cmp_skip" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_prog_cmp_skip" >&5
@@ -6652,7 +6670,7 @@ fi
# Check whether --with-gcc-major-version-only was given.
if test "${with_gcc_major_version_only+set}" = set; then :
withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
- get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+ get_gcc_base_ver="sed -e 's/^\([0-9]*\).*/\1/'"
fi
fi
diff --git a/gcc/configure b/gcc/configure diff --git a/gcc/configure b/gcc/configure
index 6121e16..65d4c8e 100755 index 6121e16..a809740 100755
--- a/gcc/configure --- a/gcc/configure
+++ b/gcc/configure +++ b/gcc/configure
@@ -750,6 +750,7 @@ LDEXP_LIB @@ -750,6 +750,7 @@ LDEXP_LIB
@@ -2620,6 +2763,24 @@ index 6121e16..65d4c8e 100755
lt_cv_dlopen="load_add_on" lt_cv_dlopen="load_add_on"
lt_cv_dlopen_libs= lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes lt_cv_dlopen_self=yes
@@ -18448,7 +18474,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 18451 "configure"
+#line 18477 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -18554,7 +18580,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 18557 "configure"
+#line 18583 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -20368,7 +20394,6 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } @@ -20368,7 +20394,6 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
;; ;;
esac esac
@@ -2650,7 +2811,7 @@ index 6121e16..65d4c8e 100755
hpux9* | hpux10* | hpux11*) hpux9* | hpux10* | hpux11*)
diff --git a/libatomic/configure b/libatomic/configure diff --git a/libatomic/configure b/libatomic/configure
index b902e2c..6850904 100755 index b902e2c..37044e8 100755
--- a/libatomic/configure --- a/libatomic/configure
+++ b/libatomic/configure +++ b/libatomic/configure
@@ -8211,8 +8211,6 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } @@ -8211,8 +8211,6 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
@@ -2683,47 +2844,25 @@ index b902e2c..6850904 100755
lt_cv_dlopen="load_add_on" lt_cv_dlopen="load_add_on"
lt_cv_dlopen_libs= lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes lt_cv_dlopen_self=yes
@@ -12408,6 +12407,7 @@ _ACEOF @@ -11120,7 +11119,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11123 "configure"
+#line 11122 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11226,7 +11225,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11229 "configure"
+#line 11228 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
+ @@ -14609,7 +14608,6 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __atomic_load/store for size 2" >&5
$as_echo_n "checking for __atomic_load/store for size 2... " >&6; }
if test "${libat_cv_have_at_ldst_2+set}" = set; then :
@@ -12476,6 +12476,7 @@ _ACEOF
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __atomic_load/store for size 4" >&5
$as_echo_n "checking for __atomic_load/store for size 4... " >&6; }
if test "${libat_cv_have_at_ldst_4+set}" = set; then :
@@ -12544,6 +12545,7 @@ _ACEOF
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __atomic_load/store for size 8" >&5
$as_echo_n "checking for __atomic_load/store for size 8... " >&6; }
if test "${libat_cv_have_at_ldst_8+set}" = set; then :
@@ -12612,6 +12614,7 @@ _ACEOF
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __atomic_load/store for size 16" >&5
$as_echo_n "checking for __atomic_load/store for size 16... " >&6; }
if test "${libat_cv_have_at_ldst_16+set}" = set; then :
@@ -12681,6 +12684,7 @@ _ACEOF
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __atomic_test_and_set for size 1" >&5
$as_echo_n "checking for __atomic_test_and_set for size 1... " >&6; }
if test "${libat_cv_have_at_tas_1+set}" = set; then :
@@ -14609,7 +14613,6 @@ _ACEOF
case " $config_path " in case " $config_path " in
*" posix "*) *" posix "*)
XPCFLAGS="" XPCFLAGS=""
@@ -2731,7 +2870,7 @@ index b902e2c..6850904 100755
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <pthread.h> #include <pthread.h>
@@ -14622,14 +14625,30 @@ pthread_t t; pthread_create(&t,NULL,g,NULL); @@ -14622,14 +14620,30 @@ pthread_t t; pthread_create(&t,NULL,g,NULL);
return 0; return 0;
} }
_ACEOF _ACEOF
@@ -2764,7 +2903,7 @@ index b902e2c..6850904 100755
int int
main () main ()
{ {
@@ -14646,6 +14665,9 @@ fi @@ -14646,6 +14660,9 @@ fi
rm -f core conftest.err conftest.$ac_objext \ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext conftest$ac_exeext conftest.$ac_ext
fi fi
@@ -2775,7 +2914,7 @@ index b902e2c..6850904 100755
conftest$ac_exeext conftest.$ac_ext conftest$ac_exeext conftest.$ac_ext
CFLAGS="$save_CFLAGS $XPCFLAGS" CFLAGS="$save_CFLAGS $XPCFLAGS"
diff --git a/libgomp/configure b/libgomp/configure diff --git a/libgomp/configure b/libgomp/configure
index ced7606..72b692b 100755 index ced7606..10c98d0 100755
--- a/libgomp/configure --- a/libgomp/configure
+++ b/libgomp/configure +++ b/libgomp/configure
@@ -8248,8 +8248,6 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } @@ -8248,8 +8248,6 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
@@ -2808,6 +2947,24 @@ index ced7606..72b692b 100755
lt_cv_dlopen="load_add_on" lt_cv_dlopen="load_add_on"
lt_cv_dlopen_libs= lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes lt_cv_dlopen_self=yes
@@ -11157,7 +11156,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11160 "configure"
+#line 11159 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11263,7 +11262,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11266 "configure"
+#line 11265 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12123,8 +12122,6 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } @@ -12123,8 +12122,6 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
haiku*) haiku*)
@@ -2883,7 +3040,7 @@ index ced7606..72b692b 100755
conftest$ac_exeext conftest.$ac_ext conftest$ac_exeext conftest.$ac_ext
esac esac
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 5535bfa..55841bf 100755 index 5535bfa..aa15c92 100755
--- a/libstdc++-v3/configure --- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure +++ b/libstdc++-v3/configure
@@ -8672,8 +8672,6 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } @@ -8672,8 +8672,6 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
@@ -2916,6 +3073,24 @@ index 5535bfa..55841bf 100755
lt_cv_dlopen="load_add_on" lt_cv_dlopen="load_add_on"
lt_cv_dlopen_libs= lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes lt_cv_dlopen_self=yes
@@ -11608,7 +11607,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11611 "configure"
+#line 11610 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11714,7 +11713,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11717 "configure"
+#line 11716 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13534,7 +13533,6 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } @@ -13534,7 +13533,6 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
;; ;;
esac esac
@@ -2945,6 +3120,69 @@ index 5535bfa..55841bf 100755
;; ;;
hpux9* | hpux10* | hpux11*) hpux9* | hpux10* | hpux11*)
@@ -15400,7 +15397,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; }
# Fake what AC_TRY_COMPILE does.
cat > conftest.$ac_ext << EOF
-#line 15403 "configure"
+#line 15400 "configure"
int main()
{
typedef bool atomic_type;
@@ -15435,7 +15432,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; }
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15438 "configure"
+#line 15435 "configure"
int main()
{
typedef short atomic_type;
@@ -15470,7 +15467,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; }
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15473 "configure"
+#line 15470 "configure"
int main()
{
// NB: _Atomic_word not necessarily int.
@@ -15506,7 +15503,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; }
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15509 "configure"
+#line 15506 "configure"
int main()
{
typedef long long atomic_type;
@@ -15587,7 +15584,7 @@ $as_echo "$as_me: WARNING: Performance of certain classes will degrade as a resu
# unnecessary for this test.
cat > conftest.$ac_ext << EOF
-#line 15590 "configure"
+#line 15587 "configure"
int main()
{
_Decimal32 d1;
@@ -15629,7 +15626,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
# unnecessary for this test.
cat > conftest.$ac_ext << EOF
-#line 15632 "configure"
+#line 15629 "configure"
template<typename T1, typename T2>
struct same
{ typedef T2 type; };
@@ -15663,7 +15660,7 @@ $as_echo "$enable_int128" >&6; }
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15666 "configure"
+#line 15663 "configure"
template<typename T1, typename T2>
struct same
{ typedef T2 type; };
@@ -53369,6 +53366,89 @@ done @@ -53369,6 +53366,89 @@ done
;; ;;
@@ -3035,106 +3273,7 @@ index 5535bfa..55841bf 100755
*-hpux*) *-hpux*)
SECTION_FLAGS='-ffunction-sections -fdata-sections' SECTION_FLAGS='-ffunction-sections -fdata-sections'
-- @@ -80061,6 +80141,9 @@ $as_echo_n "checking whether to build Filesystem TS support... " >&6; }
2.21.0
From e5c30fc11a9b9510fe8d6ddfdedaaadf5f3fd722 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= <jerome.duval@gmail.com>
Date: Mon, 27 Jul 2015 16:32:32 +0200
Subject: Haiku: disable -fno-PIE as this fails on x86_64.
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index f42df7e..74d3ef4 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -266,7 +266,7 @@ NO_PIE_CFLAGS = @NO_PIE_CFLAGS@
NO_PIE_FLAG = @NO_PIE_FLAG@
# We don't want to compile the compilers with -fPIE, it make PCH fail.
-COMPILER += $(NO_PIE_CFLAGS)
+#COMPILER += $(NO_PIE_CFLAGS)
# Link with -no-pie since we compile the compiler with -fno-PIE.
LINKER += $(NO_PIE_FLAG)
@@ -785,9 +785,9 @@ NO_PIE_CFLAGS_FOR_BUILD = @NO_PIE_CFLAGS_FOR_BUILD@
NO_PIE_FLAG_FOR_BUILD = @NO_PIE_FLAG_FOR_BUILD@
BUILD_CFLAGS= @BUILD_CFLAGS@ -DGENERATOR_FILE
BUILD_CXXFLAGS = @BUILD_CXXFLAGS@ -DGENERATOR_FILE
-BUILD_NO_PIE_CFLAGS = @BUILD_NO_PIE_CFLAGS@
-BUILD_CFLAGS += $(BUILD_NO_PIE_CFLAGS)
-BUILD_CXXFLAGS += $(BUILD_NO_PIE_CFLAGS)
+#BUILD_NO_PIE_CFLAGS = @BUILD_NO_PIE_CFLAGS@
+#BUILD_CFLAGS += $(BUILD_NO_PIE_CFLAGS)
+#BUILD_CXXFLAGS += $(BUILD_NO_PIE_CFLAGS)
# Native compiler that we use. This may be C++ some day.
COMPILER_FOR_BUILD = $(CXX_FOR_BUILD)
--
2.21.0
From 0472e8257f7a8b3d04366287564f1f0f1fe392da Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Thu, 5 May 2016 09:03:06 +0000
Subject: fix for libstdc++/69506
diff --git a/libstdc++-v3/config/os/haiku/os_defines.h b/libstdc++-v3/config/os/haiku/os_defines.h
index 4674f7b..02c8693 100644
--- a/libstdc++-v3/config/os/haiku/os_defines.h
+++ b/libstdc++-v3/config/os/haiku/os_defines.h
@@ -42,4 +42,7 @@
#define _GLIBCXX_USE_CLOCK_REALTIME 1
#endif
+// See libstdc++/69506
+#define _GLIBCXX_USE_WEAK_REF 0
+
#endif
--
2.21.0
From e073b7b2b69d3eb308bfe3af0afc01cafb15216a Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Thu, 5 May 2016 15:52:08 +0000
Subject: rename x86_elf_aligned_common.
diff --git a/gcc/config/i386/haiku64.h b/gcc/config/i386/haiku64.h
index 76ba48e..e2fa55a 100644
--- a/gcc/config/i386/haiku64.h
+++ b/gcc/config/i386/haiku64.h
@@ -112,9 +112,9 @@ Boston, MA 02111-1307, USA. */
#define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} \
%{Wa,*:%*} %{" SPEC_32 ":--32} %{" SPEC_64 ":--64}"
-#undef ASM_OUTPUT_ALIGNED_COMMON
-#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
- x86_elf_aligned_common (FILE, NAME, SIZE, ALIGN);
+#undef ASM_OUTPUT_ALIGNED_DECL_COMMON
+#define ASM_OUTPUT_ALIGNED_DECL_COMMON(FILE, DECL, NAME, SIZE, ALIGN) \
+ x86_elf_aligned_decl_common (FILE, DECL, NAME, SIZE, ALIGN);
/* i386 System V Release 4 uses DWARF debugging info.
--
2.21.0
From 1ad6e003adaa4f1225bab7a8e68b9a073df56d0e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Wed, 2 May 2018 08:37:20 +0200
Subject: Enable libstdcxx_filesystem_ts for Haiku
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 4f37b6a..7d8fd79 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -4299,6 +4299,9 @@ AC_DEFUN([GLIBCXX_ENABLE_FILESYSTEM_TS], [
solaris*) solaris*)
enable_libstdcxx_filesystem_ts=yes enable_libstdcxx_filesystem_ts=yes
;; ;;
@@ -3147,28 +3286,3 @@ index 4f37b6a..7d8fd79 100644
-- --
2.21.0 2.21.0
From c49bba8701264ef5287bf4262b8056a3fbbac411 Mon Sep 17 00:00:00 2001
From: Jessica Hamilton <jessica.l.hamilton@gmail.com>
Date: Fri, 12 Jul 2019 18:17:00 +0000
Subject: gcc: fix build configuration for libgcc.
* libgcc_s.so now depends on libgcc.a for __cpu_model and friends,
which is needed for gfortran to produce working binaries.
diff --git a/libgcc/config.host b/libgcc/config.host
index 26d080a..bdc2b1c 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -240,7 +240,7 @@ case ${host} in
# machine-specific sections may refine and add to this
# configuration.
tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-haiku t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver"
- tmake_file="$tmake_file t-slibgcc-nolc-override"
+ tmake_file="$tmake_file t-slibgcc-libgcc t-slibgcc-nolc-override"
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
;;
*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
--
2.21.0