diff options
author | Sam James <sam@gentoo.org> | 2024-09-29 20:02:51 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-09-29 20:02:51 +0100 |
commit | badbdc155d678ece9a71c2bd7c4506600aace07c (patch) | |
tree | c888d8eabd80b18b98a1bbd15e1dbff39b7f0250 | |
parent | 14.2.0: add, clone of 14.1.0 (diff) | |
download | gcc-patches-badbdc155d678ece9a71c2bd7c4506600aace07c.tar.gz gcc-patches-badbdc155d678ece9a71c2bd7c4506600aace07c.tar.bz2 gcc-patches-badbdc155d678ece9a71c2bd7c4506600aace07c.zip |
14.2.0: add 78_all_PR115917-ada-lto.patch
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | 14.2.0/gentoo/78_all_PR115917-ada-lto.patch | 52 | ||||
-rw-r--r-- | 14.2.0/gentoo/README.history | 1 |
2 files changed, 53 insertions, 0 deletions
diff --git a/14.2.0/gentoo/78_all_PR115917-ada-lto.patch b/14.2.0/gentoo/78_all_PR115917-ada-lto.patch new file mode 100644 index 0000000..f4bac9c --- /dev/null +++ b/14.2.0/gentoo/78_all_PR115917-ada-lto.patch @@ -0,0 +1,52 @@ +From b56e463bd20beca5609dee69837a6b3dfaa542e2 Mon Sep 17 00:00:00 2001 +Message-ID: <b56e463bd20beca5609dee69837a6b3dfaa542e2.1727636544.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 29238362cc04..f2082ece0965 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/14.2.0/gentoo/README.history b/14.2.0/gentoo/README.history index 8bdcb12..26b4c96 100644 --- a/14.2.0/gentoo/README.history +++ b/14.2.0/gentoo/README.history @@ -22,3 +22,4 @@ + 29_all_msgfmt-libstdc++-link.patch + 30_all_tar_libstdc++-link.patch + 77_all_m2_docs_sandbox.patch + + 78_all_PR115917-ada-lto.patch |