-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
278 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
patches/0001-Disable-libfunc-support-for-hppa-unknown-netbsd.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From 615edd6d30f1e43107b639d13661be148e197471 Mon Sep 17 00:00:00 2001 | ||
From: Kartatz <[email protected]> | ||
Date: Tue, 7 May 2024 23:43:09 +0200 | ||
Subject: [PATCH] Disable libfunc support for hppa-unknown-netbsd | ||
|
||
For some reason, it does not work for that target. The following error is printed when attempting to link a specific object file of the libgcc: | ||
|
||
/tmp/ccigQ6Ux.s: Assembler messages: | ||
/tmp/ccigQ6Ux.s:80: Error: Unknown opcode: `stws|stw %r23,-16(%sp)' | ||
/tmp/ccigQ6Ux.s:83: Error: Invalid operands | ||
|
||
I do not know if this is a GCC bug or it just happens that our target does not support this feature. | ||
--- | ||
diff --git a/libgcc/config/pa/t-netbsd b/libgcc/config/pa/t-netbsd | ||
index 13943940a..8b99068ce 100644 | ||
--- a/libgcc/config/pa/t-netbsd | ||
+++ b/libgcc/config/pa/t-netbsd | ||
@@ -7,4 +7,3 @@ LIB1ASMFUNCS = _divI _divU _remI _remU _div_const _mulI _dyncall | ||
HOST_LIBGCC2_CFLAGS += -DELF=1 -DLINUX=1 | ||
|
||
LIB2ADD = $(srcdir)/config/pa/fptr.c | ||
-LIB2ADD_ST = $(srcdir)/config/pa/sync-libfuncs.c | ||
-- | ||
2.36.6 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
From 7b9532197fcca48b4b931c70166882aabe765975 Mon Sep 17 00:00:00 2001 | ||
From: Kartatz <[email protected]> | ||
Date: Wed, 8 May 2024 21:43:08 +0200 | ||
Subject: [PATCH] Fix issues with fenv | ||
|
||
--- | ||
diff --git a/libstdc++-v3/include/c_compatibility/fenv.h b/libstdc++-v3/include/c_compatibility/fenv.h | ||
index 6800814bc..f2d400991 100644 | ||
--- a/libstdc++-v3/include/c_compatibility/fenv.h | ||
+++ b/libstdc++-v3/include/c_compatibility/fenv.h | ||
@@ -32,13 +32,13 @@ | ||
#pragma GCC system_header | ||
|
||
#include <bits/c++config.h> | ||
-#if _GLIBCXX_HAVE_FENV_H | ||
+#if !defined(__vax__) && _GLIBCXX_HAVE_FENV_H | ||
# include_next <fenv.h> | ||
#endif | ||
|
||
#if __cplusplus >= 201103L | ||
|
||
-#if _GLIBCXX_USE_C99_FENV | ||
+#if !defined(__vax__) && _GLIBCXX_USE_C99_FENV | ||
|
||
#undef feclearexcept | ||
#undef fegetexceptflag | ||
diff --git a/libstdc++-v3/include/c_global/cfenv b/libstdc++-v3/include/c_global/cfenv | ||
index fd32daa8d..22d97f047 100644 | ||
--- a/libstdc++-v3/include/c_global/cfenv | ||
+++ b/libstdc++-v3/include/c_global/cfenv | ||
@@ -37,11 +37,11 @@ | ||
|
||
#include <bits/c++config.h> | ||
|
||
-#if _GLIBCXX_HAVE_FENV_H | ||
+#if !defined(__vax__) && _GLIBCXX_HAVE_FENV_H | ||
# include <fenv.h> | ||
#endif | ||
|
||
-#ifdef _GLIBCXX_USE_C99_FENV | ||
+#if !defined(__vax__) && defined(_GLIBCXX_USE_C99_FENV) | ||
|
||
#undef feclearexcept | ||
#undef fegetexceptflag | ||
diff --git a/libstdc++-v3/src/c++17/floating_to_chars.cc b/libstdc++-v3/src/c++17/floating_to_chars.cc | ||
index 2c9da977c..1b066b0c7 100644 | ||
--- a/libstdc++-v3/src/c++17/floating_to_chars.cc | ||
+++ b/libstdc++-v3/src/c++17/floating_to_chars.cc | ||
@@ -1048,7 +1048,7 @@ namespace | ||
{ | ||
int len; | ||
|
||
-#if _GLIBCXX_USE_C99_FENV_TR1 && defined(FE_TONEAREST) | ||
+#if !defined(__sh__) && _GLIBCXX_USE_C99_FENV_TR1 && defined(FE_TONEAREST) | ||
const int saved_rounding_mode = fegetround(); | ||
if (saved_rounding_mode != FE_TONEAREST) | ||
fesetround(FE_TONEAREST); // We want round-to-nearest behavior. | ||
@@ -1082,7 +1082,7 @@ namespace | ||
#endif | ||
len = sprintf(buffer, format_string, args..., value); | ||
|
||
-#if _GLIBCXX_USE_C99_FENV_TR1 && defined(FE_TONEAREST) | ||
+#if !defined(__sh__) && _GLIBCXX_USE_C99_FENV_TR1 && defined(FE_TONEAREST) | ||
if (saved_rounding_mode != FE_TONEAREST) | ||
fesetround(saved_rounding_mode); | ||
#endif | ||
-- | ||
2.36.6 | ||
|
Oops, something went wrong.