public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-11425] Objective-C, NeXT, v2: Correct a regression in code-gen.
@ 2024-05-10 7:54 Iain D Sandoe
0 siblings, 0 replies; only message in thread
From: Iain D Sandoe @ 2024-05-10 7:54 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:48400d6c95c836d43532bb00a3a57f3c458e0778
commit r11-11425-g48400d6c95c836d43532bb00a3a57f3c458e0778
Author: Iain Sandoe <iain@sandoe.co.uk>
Date: Tue Apr 30 15:11:56 2024 +0100
Objective-C, NeXT, v2: Correct a regression in code-gen.
There have been several changes in the ABI of Objective-C which
depend on the OS version targetted. In this case Protocols and
LabelProtocols should be made weak/hidden/extern from macOS 10.7
however there was a mistake in the code causing this to occur
from macOS 10.6. Fixed thus.
gcc/objc/ChangeLog:
* objc-next-runtime-abi-02.c (WEAK_PROTOCOLS_AFTER): New.
(next_runtime_abi_02_protocol_decl): Use WEAK_PROTOCOLS_AFTER
to determine this ABI change.
(build_v2_protocol_list_address_table): Likewise.
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
(cherry picked from commit 9b5c0be59d0f94df0517820f00b4520b5abddd8c)
Diff:
---
gcc/objc/objc-next-runtime-abi-02.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gcc/objc/objc-next-runtime-abi-02.c b/gcc/objc/objc-next-runtime-abi-02.c
index cb22a773fcb2..2f79f99c7319 100644
--- a/gcc/objc/objc-next-runtime-abi-02.c
+++ b/gcc/objc/objc-next-runtime-abi-02.c
@@ -70,6 +70,7 @@ along with GCC; see the file COPYING3. If not see
#define TAG_MSGSENDSUPER_STRET "objc_msgSendSuper2_stret"
#define USE_FIXUP_BEFORE 100600
+#define WEAK_PROTOCOLS_AFTER 100700
#define TAG_FIXUP "_fixup"
@@ -1031,7 +1032,7 @@ next_runtime_abi_02_protocol_decl (tree p)
/* static struct _objc_protocol _OBJC_Protocol_<mumble>; */
snprintf (buf, BUFSIZE, "_OBJC_Protocol_%s",
IDENTIFIER_POINTER (PROTOCOL_NAME (p)));
- if (flag_next_runtime >= USE_FIXUP_BEFORE)
+ if (flag_next_runtime >= WEAK_PROTOCOLS_AFTER)
{
decl = create_hidden_decl (objc_v2_protocol_template, buf);
DECL_WEAK (decl) = true;
@@ -2317,7 +2318,7 @@ build_v2_protocol_list_address_table (void)
gcc_assert (ref->id && TREE_CODE (ref->id) == PROTOCOL_INTERFACE_TYPE);
snprintf (buf, BUFSIZE, "_OBJC_LabelProtocol_%s",
IDENTIFIER_POINTER (PROTOCOL_NAME (ref->id)));
- if (flag_next_runtime >= USE_FIXUP_BEFORE)
+ if (flag_next_runtime >= WEAK_PROTOCOLS_AFTER)
{
decl = create_hidden_decl (objc_protocol_type, buf, /*is def=*/true);
DECL_WEAK (decl) = true;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-05-10 7:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-10 7:54 [gcc r11-11425] Objective-C, NeXT, v2: Correct a regression in code-gen Iain D Sandoe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).