public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/gcc-patches:master commit in: 12.3.0/gentoo/
@ 2023-04-29  7:08 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2023-04-29  7:08 UTC (permalink / raw
  To: gentoo-commits

commit:     31cd33e8455cdedff3ce9182a67a8330e743a5fb
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 29 07:05:34 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Apr 29 07:05:34 2023 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=31cd33e8

12.3.0: add 76_all_all_PR107087_12_Wstringop-overread-libstdc++-cow-empty.patch

Actually backport the patch. I'd got confused because one of our previous
patches had been backported and I assumed it was this one. Oops.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...12_Wstringop-overread-libstdc++-cow-empty.patch | 63 ++++++++++++++++++++++
 12.3.0/gentoo/README.history                       |  3 ++
 2 files changed, 66 insertions(+)

diff --git a/12.3.0/gentoo/76_all_all_PR107087_12_Wstringop-overread-libstdc++-cow-empty.patch b/12.3.0/gentoo/76_all_all_PR107087_12_Wstringop-overread-libstdc++-cow-empty.patch
new file mode 100644
index 0000000..15241fe
--- /dev/null
+++ b/12.3.0/gentoo/76_all_all_PR107087_12_Wstringop-overread-libstdc++-cow-empty.patch
@@ -0,0 +1,63 @@
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107087
+https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=4969dcd2b7a94ce6c0d07225b21b5f3c040a4902
+
+From 4969dcd2b7a94ce6c0d07225b21b5f3c040a4902 Mon Sep 17 00:00:00 2001
+From: Jonathan Wakely <jwakely@redhat.com>
+Date: Fri, 31 Mar 2023 13:44:04 +0100
+Subject: [PATCH] libstdc++: Teach optimizer that empty COW strings are empty
+ [PR107087]
+
+The compiler doesn't know about the invariant that the _S_empty_rep()
+object is immutable and so _M_length and _M_refcount are always zero.
+This means that we get warnings about writing possibly-non-zero length
+strings into buffers that can't hold them. If we teach the compiler that
+the empty rep is always zero length, it knows it can be copied into any
+buffer.
+
+For Stage 1 we might want to also consider adding this to capacity():
+
+	if (_S_empty_rep()._M_capacity != 0)
+	  __builtin_unreachable();
+
+And this to _Rep::_M_is_leaked() and _Rep::_M_is_shared():
+
+	  if (_S_empty_rep()._M_refcount != 0)
+	    __builtin_unreachable();
+
+libstdc++-v3/ChangeLog:
+
+	PR tree-optimization/107087
+	* include/bits/cow_string.h (basic_string::size()): Add
+	optimizer hint that _S_empty_rep()._M_length is always zero.
+	(basic_string::length()): Call size().
+--- a/libstdc++-v3/include/bits/cow_string.h
++++ b/libstdc++-v3/include/bits/cow_string.h
+@@ -907,17 +907,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+ 
+     public:
+       // Capacity:
++
+       ///  Returns the number of characters in the string, not including any
+       ///  null-termination.
+       size_type
+       size() const _GLIBCXX_NOEXCEPT
+-      { return _M_rep()->_M_length; }
++      {
++#if _GLIBCXX_FULLY_DYNAMIC_STRING == 0 && __OPTIMIZE__
++	if (_S_empty_rep()._M_length != 0)
++	  __builtin_unreachable();
++#endif
++	return _M_rep()->_M_length;
++      }
+ 
+       ///  Returns the number of characters in the string, not including any
+       ///  null-termination.
+       size_type
+       length() const _GLIBCXX_NOEXCEPT
+-      { return _M_rep()->_M_length; }
++      { return size(); }
+ 
+       ///  Returns the size() of the largest possible %string.
+       size_type
+-- 
+2.31.1

diff --git a/12.3.0/gentoo/README.history b/12.3.0/gentoo/README.history
index 156935c..f65edb4 100644
--- a/12.3.0/gentoo/README.history
+++ b/12.3.0/gentoo/README.history
@@ -1,3 +1,6 @@
+2	29 Apr 2023
+	+ 76_all_all_PR107087_12_Wstringop-overread-libstdc++-cow-empty.patch
+
 1	28 Apr 2023
 
 	+ 01_all_default-fortify-source.patch


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] proj/gcc-patches:master commit in: 12.3.0/gentoo/
@ 2024-02-28  0:29 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2024-02-28  0:29 UTC (permalink / raw
  To: gentoo-commits

commit:     f373ff919da62443ca59681f219b4899e72a6f2f
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 28 00:27:00 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Feb 28 00:29:43 2024 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=f373ff91

12.3.0: add 77_all_riscv_PR106271-multilib-bootstrap.patch

Fixes prefix bootstrap for riscv.

Bug: https://gcc.gnu.org/PR106271
Bug: https://bugs.gentoo.org/890636
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../77_all_riscv_PR106271-multilib-bootstrap.patch | 36 ++++++++++++++++++++++
 12.3.0/gentoo/README.history                       |  5 +++
 2 files changed, 41 insertions(+)

diff --git a/12.3.0/gentoo/77_all_riscv_PR106271-multilib-bootstrap.patch b/12.3.0/gentoo/77_all_riscv_PR106271-multilib-bootstrap.patch
new file mode 100644
index 0000000..a333dc8
--- /dev/null
+++ b/12.3.0/gentoo/77_all_riscv_PR106271-multilib-bootstrap.patch
@@ -0,0 +1,36 @@
+https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=47f95bc4be4eb14730ab3eaaaf8f6e71fda47690
+https://gcc.gnu.org/PR106271
+https://bugs.gentoo.org/890636
+
+From 7cb2eddfcd84d6e4a1bc1b19fa7ace0927db6bbc Mon Sep 17 00:00:00 2001
+From: Raphael Moreira Zinsly <rzinsly@ventanamicro.com>
+Date: Tue, 22 Aug 2023 11:37:04 -0600
+Subject: [PATCH] RISC-V: Add multiarch support on riscv-linux-gnu
+
+This adds multiarch support to the RISC-V port so that bootstraps work with
+Debian out-of-the-box.  Without this patch the stage1 compiler is unable to
+find headers/libraries when building the stage1 runtime.
+
+This is functionally (and possibly textually) equivalent to Debian's fix for
+the same problem.
+
+gcc/
+	* config/riscv/t-linux: Add MULTIARCH_DIRNAME.
+
+(cherry picked from commit 47f95bc4be4eb14730ab3eaaaf8f6e71fda47690)
+---
+ gcc/config/riscv/t-linux | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/gcc/config/riscv/t-linux b/gcc/config/riscv/t-linux
+index 216d2776a183..a6f64f88d25c 100644
+--- a/gcc/config/riscv/t-linux
++++ b/gcc/config/riscv/t-linux
+@@ -1,3 +1,5 @@
+ # Only XLEN and ABI affect Linux multilib dir names, e.g. /lib32/ilp32d/
+ MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib64,$(MULTILIB_DIRNAMES)))
+ MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES))
++
++MULTIARCH_DIRNAME := $(call if_multiarch,$(firstword $(subst -, ,$(target)))-linux-gnu)
+-- 
+2.44.0

diff --git a/12.3.0/gentoo/README.history b/12.3.0/gentoo/README.history
index f65edb4..6699fd4 100644
--- a/12.3.0/gentoo/README.history
+++ b/12.3.0/gentoo/README.history
@@ -1,4 +1,9 @@
+3	28 Feb 2024
+
+	+ 77_all_riscv_PR106271-multilib-bootstrap.patch
+
 2	29 Apr 2023
+
 	+ 76_all_all_PR107087_12_Wstringop-overread-libstdc++-cow-empty.patch
 
 1	28 Apr 2023


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] proj/gcc-patches:master commit in: 12.3.0/gentoo/
@ 2024-09-29 18:50 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2024-09-29 18:50 UTC (permalink / raw
  To: gentoo-commits

commit:     de8b2c94406071a5b01f9045f6ba40a99f24f893
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 29 18:42:37 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Sep 29 18:42:37 2024 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=de8b2c94

12.3.0: add 78_all_PR115917-ada-lto.patch

Signed-off-by: Sam James <sam <AT> gentoo.org>

 12.3.0/gentoo/78_all_PR115917-ada-lto.patch | 52 +++++++++++++++++++++++++++++
 12.3.0/gentoo/README.history                |  4 +++
 2 files changed, 56 insertions(+)

diff --git a/12.3.0/gentoo/78_all_PR115917-ada-lto.patch b/12.3.0/gentoo/78_all_PR115917-ada-lto.patch
new file mode 100644
index 0000000..2e25ddf
--- /dev/null
+++ b/12.3.0/gentoo/78_all_PR115917-ada-lto.patch
@@ -0,0 +1,52 @@
+From dd97dff998c9fc35e36397fc647f7360e1cadf70 Mon Sep 17 00:00:00 2001
+Message-ID: <dd97dff998c9fc35e36397fc647f7360e1cadf70.1727635310.git.sam@gentoo.org>
+From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@aarsen.me>
+Date: Thu, 15 Aug 2024 19:17:41 +0200
+Subject: [PATCH] gnat: fix lto-type-mismatch between C_Version_String and
+ gnat_version_string [PR115917]
+
+gcc/ada/ChangeLog:
+
+	PR ada/115917
+	* gnatvsn.ads: Add note about the duplication of this value in
+	version.c.
+	* version.c (VER_LEN_MAX): Define to the same value as
+	Gnatvsn.Ver_Len_Max.
+	(gnat_version_string): Use VER_LEN_MAX as bound.
+
+(cherry picked from commit 9cbcf8d1de159e6113fafb5dc2feb4a7e467a302)
+---
+ gcc/ada/gnatvsn.ads | 3 ++-
+ gcc/ada/version.c   | 5 ++++-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/gcc/ada/gnatvsn.ads b/gcc/ada/gnatvsn.ads
+index 47a06b96c3cf..99d06c7e5aa4 100644
+--- a/gcc/ada/gnatvsn.ads
++++ b/gcc/ada/gnatvsn.ads
+@@ -83,7 +83,8 @@ package Gnatvsn is
+    --  space to store any possible version string value for checks. This
+    --  value should never be decreased in the future, but it would be
+    --  OK to increase it if absolutely necessary. If it is increased,
+-   --  be sure to increase GNAT.Compiler.Version.Ver_Len_Max as well.
++   --  be sure to increase GNAT.Compiler.Version.Ver_Len_Max, and to update
++   --  the VER_LEN_MAX define in version.c as well.
+ 
+    Ver_Prefix : constant String := "GNAT Version: ";
+    --  Prefix generated by binder. If it is changed, be sure to change
+diff --git a/gcc/ada/version.c b/gcc/ada/version.c
+index 5e64edd0b17d..2fa9b8c2c859 100644
+--- a/gcc/ada/version.c
++++ b/gcc/ada/version.c
+@@ -31,4 +31,7 @@
+ 
+ #include "version.h"
+ 
+-char gnat_version_string[] = version_string;
++/* Logically a reference to Gnatvsn.Ver_Len_Max.  Please keep in sync.  */
++#define VER_LEN_MAX 256
++
++char gnat_version_string[VER_LEN_MAX] = version_string;
+-- 
+2.46.2
+

diff --git a/12.3.0/gentoo/README.history b/12.3.0/gentoo/README.history
index 6699fd4..899d235 100644
--- a/12.3.0/gentoo/README.history
+++ b/12.3.0/gentoo/README.history
@@ -1,3 +1,7 @@
+4	29 Sept 2024
+
+	+ 78_all_PR115917-ada-lto.patch
+
 3	28 Feb 2024
 
 	+ 77_all_riscv_PR106271-multilib-bootstrap.patch


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] proj/gcc-patches:master commit in: 12.3.0/gentoo/
@ 2024-09-29 18:50 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2024-09-29 18:50 UTC (permalink / raw
  To: gentoo-commits

commit:     3089cfb10e4f1acd30a280b40d4190e4cbe63ad6
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 29 18:45:37 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Sep 29 18:45:37 2024 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=3089cfb1

12.3.0: drop Ada patch from here

... as we're putting it in 12.4.0 instead.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 12.3.0/gentoo/78_all_PR115917-ada-lto.patch | 52 -----------------------------
 12.3.0/gentoo/README.history                |  4 ---
 2 files changed, 56 deletions(-)

diff --git a/12.3.0/gentoo/78_all_PR115917-ada-lto.patch b/12.3.0/gentoo/78_all_PR115917-ada-lto.patch
deleted file mode 100644
index 2e25ddf..0000000
--- a/12.3.0/gentoo/78_all_PR115917-ada-lto.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From dd97dff998c9fc35e36397fc647f7360e1cadf70 Mon Sep 17 00:00:00 2001
-Message-ID: <dd97dff998c9fc35e36397fc647f7360e1cadf70.1727635310.git.sam@gentoo.org>
-From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@aarsen.me>
-Date: Thu, 15 Aug 2024 19:17:41 +0200
-Subject: [PATCH] gnat: fix lto-type-mismatch between C_Version_String and
- gnat_version_string [PR115917]
-
-gcc/ada/ChangeLog:
-
-	PR ada/115917
-	* gnatvsn.ads: Add note about the duplication of this value in
-	version.c.
-	* version.c (VER_LEN_MAX): Define to the same value as
-	Gnatvsn.Ver_Len_Max.
-	(gnat_version_string): Use VER_LEN_MAX as bound.
-
-(cherry picked from commit 9cbcf8d1de159e6113fafb5dc2feb4a7e467a302)
----
- gcc/ada/gnatvsn.ads | 3 ++-
- gcc/ada/version.c   | 5 ++++-
- 2 files changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/gcc/ada/gnatvsn.ads b/gcc/ada/gnatvsn.ads
-index 47a06b96c3cf..99d06c7e5aa4 100644
---- a/gcc/ada/gnatvsn.ads
-+++ b/gcc/ada/gnatvsn.ads
-@@ -83,7 +83,8 @@ package Gnatvsn is
-    --  space to store any possible version string value for checks. This
-    --  value should never be decreased in the future, but it would be
-    --  OK to increase it if absolutely necessary. If it is increased,
--   --  be sure to increase GNAT.Compiler.Version.Ver_Len_Max as well.
-+   --  be sure to increase GNAT.Compiler.Version.Ver_Len_Max, and to update
-+   --  the VER_LEN_MAX define in version.c as well.
- 
-    Ver_Prefix : constant String := "GNAT Version: ";
-    --  Prefix generated by binder. If it is changed, be sure to change
-diff --git a/gcc/ada/version.c b/gcc/ada/version.c
-index 5e64edd0b17d..2fa9b8c2c859 100644
---- a/gcc/ada/version.c
-+++ b/gcc/ada/version.c
-@@ -31,4 +31,7 @@
- 
- #include "version.h"
- 
--char gnat_version_string[] = version_string;
-+/* Logically a reference to Gnatvsn.Ver_Len_Max.  Please keep in sync.  */
-+#define VER_LEN_MAX 256
-+
-+char gnat_version_string[VER_LEN_MAX] = version_string;
--- 
-2.46.2
-

diff --git a/12.3.0/gentoo/README.history b/12.3.0/gentoo/README.history
index 899d235..6699fd4 100644
--- a/12.3.0/gentoo/README.history
+++ b/12.3.0/gentoo/README.history
@@ -1,7 +1,3 @@
-4	29 Sept 2024
-
-	+ 78_all_PR115917-ada-lto.patch
-
 3	28 Feb 2024
 
 	+ 77_all_riscv_PR106271-multilib-bootstrap.patch


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-09-29 18:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-29  7:08 [gentoo-commits] proj/gcc-patches:master commit in: 12.3.0/gentoo/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2024-02-28  0:29 Sam James
2024-09-29 18:50 Sam James
2024-09-29 18:50 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox