libsoup3: update to 3.6.0; fix GTK2/3 app startup
[oi-userland.git] / components / developer / gcc-12 / patches / 0032-13185-zassert-deflib-does-not-work-for-64-bit-object.patch
blob4b618413a978a5ef8e53742663d31801ad43b023
1 From a0a66f8ce2520681709702871eb7ded77be6a1e8 Mon Sep 17 00:00:00 2001
2 From: Andy Fiddaman <omnios@citrus-it.co.uk>
3 Date: Mon, 11 Jan 2021 14:09:40 +0000
4 Subject: 13185 -zassert-deflib does not work for 64-bit objects
6 ---
7 gcc/gcc.cc | 33 ++++++++++++++++++++++++++-------
8 1 file changed, 26 insertions(+), 7 deletions(-)
10 diff --git a/gcc/gcc.cc b/gcc/gcc.cc
11 index fbcc9d03314..ec524111a20 100644
12 --- a/gcc/gcc.cc
13 +++ b/gcc/gcc.cc
14 @@ -7931,15 +7931,34 @@ is_directory (const char *path1, bool linker)
15 *cp = '\0';
17 /* Exclude directories that the linker is known to search. */
18 - if (linker
19 - && IS_DIR_SEPARATOR (path[0])
20 - && ((cp - path == 6
21 - && filename_ncmp (path + 1, "lib", 3) == 0)
22 - || (cp - path == 10
23 + if (linker && IS_DIR_SEPARATOR (path[0])) {
24 + size_t len = cp - path;
26 + if (len >= 6 && filename_ncmp (path + 1, "lib", 3) == 0) {
27 + if (len == 6)
28 + return 0;
29 + if (multilib_os_dir != NULL
30 + && len == 6 + strlen(multilib_os_dir) + 1
31 + && filename_ncmp(path + 5, multilib_os_dir,
32 + strlen(multilib_os_dir)) == 0) {
33 + return 0;
34 + }
35 + }
37 + if (len >= 10
38 && filename_ncmp (path + 1, "usr", 3) == 0
39 && IS_DIR_SEPARATOR (path[4])
40 - && filename_ncmp (path + 5, "lib", 3) == 0)))
41 - return 0;
42 + && filename_ncmp (path + 5, "lib", 3) == 0) {
43 + if (len == 10)
44 + return 0;
45 + if (multilib_os_dir != NULL
46 + && len == 10 + strlen(multilib_os_dir) + 1
47 + && filename_ncmp(path + 9, multilib_os_dir,
48 + strlen(multilib_os_dir)) == 0) {
49 + return 0;
50 + }
51 + }
52 + }
54 return (stat (path, &st) >= 0 && S_ISDIR (st.st_mode));