Skip to content

Commit

Permalink
Fix build for glibc with latest master-epic patch set...
Browse files Browse the repository at this point in the history
  • Loading branch information
johnny-mnemonic committed Jan 13, 2025
1 parent f0b0f13 commit 0d4338a
Show file tree
Hide file tree
Showing 25 changed files with 224 additions and 48 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 899ac72331309c2893f0ed363e939b126b456f3b Mon Sep 17 00:00:00 2001
From ab56ff99f0d5dd645ac8d3be0f44c603243f524e Mon Sep 17 00:00:00 2001
From: Johnny Mnemonic <jm@machine-hall.org>
Date: Wed, 10 Jan 2024 21:08:26 +0100
Subject: [PATCH 01/21] Revert "Remove ia64-linux-gnu"
Subject: [PATCH 01/25] Revert "Remove ia64-linux-gnu"

This reverts commit 460860f457e2a889785c506e8c77d4a7dff24d3e.
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 32199638de967f876d4764deda355ad9a066fc75 Mon Sep 17 00:00:00 2001
From 452129f312399c50f595396afe4a4b1d96c09919 Mon Sep 17 00:00:00 2001
From: Johnny Mnemonic <jm@machine-hall.org>
Date: Thu, 23 May 2024 16:35:52 +0200
Subject: [PATCH 02/21] Replay "Refer to C23 in place of C2X in glibc" also for
Subject: [PATCH 02/25] Replay "Refer to C23 in place of C2X in glibc" also for
ia64

See 42cc619dfbc44e263239c2de870bae11ad65810a for reference.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 21f9031940b5c169b5a49c5edc6d598f9850f489 Mon Sep 17 00:00:00 2001
From 21ece4daa49c7fa6d2a64b3b236bc9c374ee0a64 Mon Sep 17 00:00:00 2001
From: Johnny Mnemonic <jm@machine-hall.org>
Date: Sun, 23 Jun 2024 21:31:55 +0200
Subject: [PATCH 03/21] Replay "Implement C23 log2p1" also for ia64
Subject: [PATCH 03/25] Replay "Implement C23 log2p1" also for ia64

See 79c52daf4740b00bef43e4f5a4281b3480459b38 for reference.
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From cd85940716ba02384703a15269df0c1a339be92f Mon Sep 17 00:00:00 2001
From cdc6eba2c98a032e046a75f908e533549123a18a Mon Sep 17 00:00:00 2001
From: Johnny Mnemonic <jm@machine-hall.org>
Date: Thu, 27 Jun 2024 10:22:11 +0200
Subject: [PATCH 04/21] Replay "Implement C23 logp1" also for ia64
Subject: [PATCH 04/25] Replay "Implement C23 logp1" also for ia64

See bb014f50c4a0c8d8db1ba5af55c104e430b5533d for reference.
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From d1f2c8502c3466aeb7f5a822a44178ca84d28f37 Mon Sep 17 00:00:00 2001
From d3e35afebe155bf5256ad3620a4ae60d541b3df3 Mon Sep 17 00:00:00 2001
From: Johnny Mnemonic <jm@machine-hall.org>
Date: Sun, 23 Jun 2024 21:34:06 +0200
Subject: [PATCH 05/21] Replay "Implement C23 log10p1" also for ia64
Subject: [PATCH 05/25] Replay "Implement C23 log10p1" also for ia64

See 55eb99e9a9d840ba452b128be14d6529c2dde039 for reference.
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 5dd7f9feb3fe20d01533f83c753d018241bfc93f Mon Sep 17 00:00:00 2001
From b8ccb08d0cb82066d93beccc436ff8ec62f6304b Mon Sep 17 00:00:00 2001
From: Johnny Mnemonic <jm@machine-hall.org>
Date: Sun, 23 Jun 2024 21:36:17 +0200
Subject: [PATCH 06/21] Replay "Implement C23 exp2m1, exp10m1" also for ia64
Subject: [PATCH 06/25] Replay "Implement C23 exp2m1, exp10m1" also for ia64

See 7ec903e028271d029818378fd60ddaf6b76b89ac for reference.
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 68342f417cf950d02660c7f62785885b213a5df1 Mon Sep 17 00:00:00 2001
From d752060466315978d9aa551d92f11e0383d9d77b Mon Sep 17 00:00:00 2001
From: Johnny Mnemonic <jm@machine-hall.org>
Date: Tue, 9 Jul 2024 22:42:12 +0200
Subject: [PATCH 07/21] Fix ia64 build after
Subject: [PATCH 07/25] Fix ia64 build after
7ec903e028271d029818378fd60ddaf6b76b89ac

Fixes #2.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 1f5ff7ab58a87ad293b6c68cafc4a10c7325c231 Mon Sep 17 00:00:00 2001
From 62f24be1b1c5606277fce9932762e76909bb75d5 Mon Sep 17 00:00:00 2001
From: Johnny Mnemonic <jm@machine-hall.org>
Date: Mon, 2 Sep 2024 22:50:09 +0200
Subject: [PATCH 08/21] Revert "elf: Make dl-fptr and dl-symaddr hppa specific"
Subject: [PATCH 08/25] Revert "elf: Make dl-fptr and dl-symaddr hppa specific"

This reverts commit 745c3cc10f2d5173a25e3bd4d022d304f4ac9a47.
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 7d400ee748ac89ddd4003ba63d14861397af70a8 Mon Sep 17 00:00:00 2001
From 0761c87be1a07e6bc9efa056eb884ee000cdfb43 Mon Sep 17 00:00:00 2001
From: Johnny Mnemonic <jm@machine-hall.org>
Date: Thu, 3 Oct 2024 19:34:09 +0200
Subject: [PATCH 09/21] ia64: Qualify 'u' and 'bits' with '__' prefix
Subject: [PATCH 09/25] ia64: Qualify 'u' and 'bits' with '__' prefix

---
sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h | 4 ++--
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 83d948ec131bc0667f95b478722a3414e9ed0d2a Mon Sep 17 00:00:00 2001
From d3ca68b46d2bc4cdb8759b064e964bb9d90bbc73 Mon Sep 17 00:00:00 2001
From: Johnny Mnemonic <jm@machine-hall.org>
Date: Thu, 5 Dec 2024 21:32:16 +0100
Subject: [PATCH 10/21] Replay "Implement C23 cospi" also for ia64
Subject: [PATCH 10/25] Replay "Implement C23 cospi" also for ia64

See 0ae0af68d8fa3bf6cbe1e4f1de5929ff71de67b3 for reference.
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From da5162a71032295f8350f91e2d8aceb3824e6a81 Mon Sep 17 00:00:00 2001
From c9a4142d9e542c9edb8389014ce09d789da8eed1 Mon Sep 17 00:00:00 2001
From: Johnny Mnemonic <jm@machine-hall.org>
Date: Thu, 5 Dec 2024 21:34:16 +0100
Subject: [PATCH 11/21] Replay "Implement C23 sinpi" also for ia64
Subject: [PATCH 11/25] Replay "Implement C23 sinpi" also for ia64

See 776938e8b8dcf2b59998979e91cc0f9db7d771a8 for reference.
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 6024c2e29baf0de1333826548f87bf438767b179 Mon Sep 17 00:00:00 2001
From 84064e84388454491f5f262664cc4e1da37a17a5 Mon Sep 17 00:00:00 2001
From: Johnny Mnemonic <jm@machine-hall.org>
Date: Thu, 5 Dec 2024 23:38:20 +0100
Subject: [PATCH 12/21] Fix build after
Subject: [PATCH 12/25] Fix build after
0ae0af68d8fa3bf6cbe1e4f1de5929ff71de67b3

Fixes #3.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 3f5402eabd9626b4b3a08f88ee06ff0f06f4900d Mon Sep 17 00:00:00 2001
From e5c026e0bd1a74f2a8ca551591be64e353ac460b Mon Sep 17 00:00:00 2001
From: Johnny Mnemonic <jm@machine-hall.org>
Date: Wed, 11 Dec 2024 22:57:18 +0100
Subject: [PATCH 13/21] Replay "Implement C23 tanpi" also for ia64
Subject: [PATCH 13/25] Replay "Implement C23 tanpi" also for ia64

See f9e90e4b4ce71f88470c8c8b0a16c21088294be4 for reference.
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 2532141be6694f18e520fec1231329e94fbd40e0 Mon Sep 17 00:00:00 2001
From 18234901e05d265662d533109c706f65c684035f Mon Sep 17 00:00:00 2001
From: Johnny Mnemonic <jm@machine-hall.org>
Date: Wed, 11 Dec 2024 22:59:10 +0100
Subject: [PATCH 14/21] Replay "Implement C23 acospi" also for ia64
Subject: [PATCH 14/25] Replay "Implement C23 acospi" also for ia64

See 28d102d15c6af7f80cb1077e098e020476d26d00 for reference.
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From dc36fec600b1192bb59dc4808c2b15b520bee71f Mon Sep 17 00:00:00 2001
From 98cb0043d9c3ac95410caa64524cc1c697f72d03 Mon Sep 17 00:00:00 2001
From: Johnny Mnemonic <jm@machine-hall.org>
Date: Wed, 11 Dec 2024 23:23:30 +0100
Subject: [PATCH 15/21] Fix build after
Subject: [PATCH 15/25] Fix build after
28d102d15c6af7f80cb1077e098e020476d26d00

Fixes #4.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From ed8d78b64205bdedd9dc5e4337e0ad815fc2eebf Mon Sep 17 00:00:00 2001
From e94e4535a4de952947ea58fbb6f143adfc5a9fcc Mon Sep 17 00:00:00 2001
From: Johnny Mnemonic <jm@machine-hall.org>
Date: Wed, 11 Dec 2024 23:00:42 +0100
Subject: [PATCH 16/21] Replay "Implement C23 asinpi" also for ia64
Subject: [PATCH 16/25] Replay "Implement C23 asinpi" also for ia64

See f962932206eca2cfed0a26e72220ad3465bf9e65 for reference.
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From ea7a54372fa53dd0e82eefa57903a5e4577e8a95 Mon Sep 17 00:00:00 2001
From 67316c921e774ea54e04307fa48fb43225d1e5f2 Mon Sep 17 00:00:00 2001
From: Johnny Mnemonic <jm@machine-hall.org>
Date: Wed, 11 Dec 2024 23:24:26 +0100
Subject: [PATCH 17/21] Fix build after
Subject: [PATCH 17/25] Fix build after
f962932206eca2cfed0a26e72220ad3465bf9e65

Fixes #5.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 78f160c359f768eb1d0857401ec3661c7f86042f Mon Sep 17 00:00:00 2001
From 0157a9aa5fc7ada8b032f0d56af8eb4a8ade9272 Mon Sep 17 00:00:00 2001
From: Johnny Mnemonic <jm@machine-hall.org>
Date: Thu, 12 Dec 2024 00:52:00 +0100
Subject: [PATCH 18/21] Replay "Implement C23 atanpi" also for ia64
Subject: [PATCH 18/25] Replay "Implement C23 atanpi" also for ia64

See ffe79c446ced76d7c1a77804ff2cc32eccbc7c7e for reference.
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 909601a35b8a20cc3f1fdbc6d381563dce170ef0 Mon Sep 17 00:00:00 2001
From 57769584d672eef9d0b53598dea028ba6912a1bc Mon Sep 17 00:00:00 2001
From: Johnny Mnemonic <jm@machine-hall.org>
Date: Thu, 12 Dec 2024 01:21:35 +0100
Subject: [PATCH 19/21] Fix build after
Subject: [PATCH 19/25] Fix build after
ffe79c446ced76d7c1a77804ff2cc32eccbc7c7e

Fixes #6.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 4b5c3b3de53b138cc509d58d47148917013fead4 Mon Sep 17 00:00:00 2001
From e037b3aff157f100a03eb733333203f64f962487 Mon Sep 17 00:00:00 2001
From: Johnny Mnemonic <jm@machine-hall.org>
Date: Sat, 28 Dec 2024 00:21:46 +0100
Subject: [PATCH 20/21] Partially revert "elf: Remove the GET_ADDR_ARGS and
Subject: [PATCH 20/25] Partially revert "elf: Remove the GET_ADDR_ARGS and
related macros [...]"

This partially reverts commit 5e249192cac7354af02a7347a0d8c984e0c88ed3.
Expand All @@ -12,10 +12,10 @@ Fixes #7 for now.
1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/elf/dl-tls.c b/elf/dl-tls.c
index c2d17265fb..eb21f1521b 100644
index 45ea0588c3..425850efb5 100644
--- a/elf/dl-tls.c
+++ b/elf/dl-tls.c
@@ -695,6 +695,23 @@ rtld_hidden_def (_dl_deallocate_tls)
@@ -767,6 +767,23 @@ rtld_hidden_def (_dl_deallocate_tls)


#ifdef SHARED
Expand All @@ -39,23 +39,23 @@ index c2d17265fb..eb21f1521b 100644

/* Allocate one DTV entry. */
static struct dtv_pointer
@@ -890,6 +907,7 @@ _dl_update_slotinfo (unsigned long int req_modid, size_t new_gen)
@@ -962,6 +979,7 @@ _dl_update_slotinfo (unsigned long int req_modid, size_t new_gen)
return the_map;
}

+# ifndef DONT_USE_TLS_INDEX
/* Adjust the TLS variable pointer using the TLS descriptor offset and
the ABI-specific offset. */
static inline void *
@@ -978,6 +996,7 @@ update_get_addr (tls_index *ti, size_t gen)
@@ -1050,6 +1068,7 @@ update_get_addr (tls_index *ti, size_t gen)

return tls_get_addr_adjust (p, ti);
}
+# endif /* DONT_USE_TLS_INDEX */

/* For all machines that have a non-macro version of __tls_get_addr, we
want to use rtld_hidden_proto/rtld_hidden_def in order to call the
@@ -985,13 +1004,14 @@ update_get_addr (tls_index *ti, size_t gen)
@@ -1057,13 +1076,14 @@ update_get_addr (tls_index *ti, size_t gen)
in ld.so for __tls_get_addr. */

#ifndef __tls_get_addr
Expand All @@ -71,7 +71,7 @@ index c2d17265fb..eb21f1521b 100644
void *
__tls_get_addr (tls_index *ti)
{
@@ -1029,6 +1049,10 @@ __tls_get_addr (tls_index *ti)
@@ -1101,6 +1121,10 @@ __tls_get_addr (tls_index *ti)

return tls_get_addr_adjust (p, ti);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From 6cccf5b0725de2b005ac25dcc0addaaf8ac35c8a Mon Sep 17 00:00:00 2001
From: Johnny Mnemonic <jm@machine-hall.org>
Date: Sun, 12 Jan 2025 21:01:26 +0100
Subject: [PATCH 21/25] Replay "elf: Introduce generic <dl-tls.h>" in part also
for ia64

See ceae7e2770302b04a9f9321b66dc8978c9747bd1 for reference.
---
sysdeps/ia64/dl-tls.h | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/sysdeps/ia64/dl-tls.h b/sysdeps/ia64/dl-tls.h
index b366e7f8c7..5e766614ec 100644
--- a/sysdeps/ia64/dl-tls.h
+++ b/sysdeps/ia64/dl-tls.h
@@ -27,4 +27,8 @@
/* We have no tls_index type. */
#define DONT_USE_TLS_INDEX 1

+/* Dynamic thread vector pointers point to the start of each
+ TLS block. */
+#define TLS_DTV_OFFSET 0
+
extern void *__tls_get_addr (size_t m, size_t offset);
--
2.25.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From af37f38dbc7072e1d9bc64ab2ba6bf42ef45aecf Mon Sep 17 00:00:00 2001
From: Johnny Mnemonic <jm@machine-hall.org>
Date: Sun, 12 Jan 2025 21:02:55 +0100
Subject: [PATCH 22/25] Replay "elf: Always define TLS_TP_OFFSET" also for ia64

See d1da011118ad8e35002034128458355a2de570ef for reference.
---
sysdeps/ia64/dl-tls.h | 3 +++
1 file changed, 3 insertions(+)

diff --git a/sysdeps/ia64/dl-tls.h b/sysdeps/ia64/dl-tls.h
index 5e766614ec..bdfef5228e 100644
--- a/sysdeps/ia64/dl-tls.h
+++ b/sysdeps/ia64/dl-tls.h
@@ -31,4 +31,7 @@
TLS block. */
#define TLS_DTV_OFFSET 0

+/* Static TLS offsets are relative to the unadjusted thread pointer. */
+#define TLS_TP_OFFSET 0
+
extern void *__tls_get_addr (size_t m, size_t offset);
--
2.25.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
From 6169806a57e23da0a1e24f53abc7e4853d6b16f2 Mon Sep 17 00:00:00 2001
From: Johnny Mnemonic <jm@machine-hall.org>
Date: Sun, 12 Jan 2025 21:04:24 +0100
Subject: [PATCH 23/25] Replay "Add missing include guards to <dl-tls.h>" also
for ia64

See 4a9a8a50981e2a3e0a04ef4c7ad7c26807c18161 for reference.
---
sysdeps/ia64/dl-tls.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/sysdeps/ia64/dl-tls.h b/sysdeps/ia64/dl-tls.h
index bdfef5228e..c7af27698c 100644
--- a/sysdeps/ia64/dl-tls.h
+++ b/sysdeps/ia64/dl-tls.h
@@ -1,5 +1,5 @@
/* Thread-local storage handling in the ELF dynamic linker. IA-64 version.
- Copyright (C) 2002-2024 Free Software Foundation, Inc.
+ Copyright (C) 2002-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.

The GNU C Library is free software; you can redistribute it and/or
@@ -16,6 +16,8 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */

+#ifndef _DL_TLS_H
+#define _DL_TLS_H

/* On IA-64 the __tls_get_addr function take the module ID and the
offset as parameters. */
@@ -35,3 +37,5 @@
#define TLS_TP_OFFSET 0

extern void *__tls_get_addr (size_t m, size_t offset);
+
+#endif /* _DL_TLS_H */
--
2.25.1

Loading

0 comments on commit 0d4338a

Please sign in to comment.