public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/clang] riscv: Do not use cfi_label when building with clang
@ 2024-04-17 20:08 Adhemerval Zanella
  0 siblings, 0 replies; 7+ messages in thread
From: Adhemerval Zanella @ 2024-04-17 20:08 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0add13af81134d959a3d95f5c4c6ccf067332100

commit 0add13af81134d959a3d95f5c4c6ccf067332100
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Sep 28 14:17:54 2023 -0300

    riscv: Do not use cfi_label when building with clang
    
    The .cfi_label is a gas extension not supported by clang.  From a
    ziglang discussion [1], it seems that it is not really required.
    
    [1] https://github.com/ziglang/zig/issues/3340

Diff:
---
 sysdeps/generic/sysdep.h               | 6 ++++++
 sysdeps/riscv/start.S                  | 2 +-
 sysdeps/unix/sysv/linux/riscv/clone.S  | 2 +-
 sysdeps/unix/sysv/linux/riscv/clone3.S | 2 +-
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/sysdeps/generic/sysdep.h b/sysdeps/generic/sysdep.h
index c47e53d3d8..c663912b8e 100644
--- a/sysdeps/generic/sysdep.h
+++ b/sysdeps/generic/sysdep.h
@@ -55,6 +55,12 @@
 # define cfi_window_save		.cfi_window_save
 # define cfi_personality(enc, exp)	.cfi_personality enc, exp
 # define cfi_lsda(enc, exp)		.cfi_lsda enc, exp
+/* .cfi_label is a gas extension not supported by clang.  */
+# ifndef __clang__
+#  define cfi_label(label)		.cfi_label label
+# else
+#  define cfi_label(label)
+# endif
 
 #else /* ! ASSEMBLER */
 
diff --git a/sysdeps/riscv/start.S b/sysdeps/riscv/start.S
index ede186ef23..bff535be9d 100644
--- a/sysdeps/riscv/start.S
+++ b/sysdeps/riscv/start.S
@@ -45,7 +45,7 @@
 ENTRY (ENTRY_POINT)
 	/* Terminate call stack by noting ra is undefined.  Use a dummy
 	   .cfi_label to force starting the FDE.  */
-	.cfi_label .Ldummy
+	cfi_label (.Ldummy)
 	cfi_undefined (ra)
 	call  load_gp
 	mv    a5, a0  /* rtld_fini.  */
diff --git a/sysdeps/unix/sysv/linux/riscv/clone.S b/sysdeps/unix/sysv/linux/riscv/clone.S
index b9c843eb1d..f815fd6160 100644
--- a/sysdeps/unix/sysv/linux/riscv/clone.S
+++ b/sysdeps/unix/sysv/linux/riscv/clone.S
@@ -74,7 +74,7 @@ ENTRY (__thread_start)
 L (thread_start):
 	/* Terminate call stack by noting ra is undefined.  Use a dummy
 	   .cfi_label to force starting the FDE.  */
-	.cfi_label .Ldummy
+	cfi_label (.Ldummy)
 	cfi_undefined (ra)
 
 	/* Restore the arg for user's function.  */
diff --git a/sysdeps/unix/sysv/linux/riscv/clone3.S b/sysdeps/unix/sysv/linux/riscv/clone3.S
index 29264be054..6a81a56519 100644
--- a/sysdeps/unix/sysv/linux/riscv/clone3.S
+++ b/sysdeps/unix/sysv/linux/riscv/clone3.S
@@ -62,7 +62,7 @@ ENTRY(__thread_start_clone3)
 L(thread_start):
 	/* Terminate call stack by noting ra is undefined.  Use a dummy
 	   .cfi_label to force starting the FDE.  */
-	.cfi_label .Ldummy
+	cfi_label (.Ldummy)
 	cfi_undefined (ra)
 
 	/* Restore the arg for user's function and call the user's

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

* [glibc/azanella/clang] riscv: Do not use cfi_label when building with clang
@ 2024-04-02 15:54 Adhemerval Zanella
  0 siblings, 0 replies; 7+ messages in thread
From: Adhemerval Zanella @ 2024-04-02 15:54 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5c0ed4a65b92dc4b47f825c4b635ac4f403f3d13

commit 5c0ed4a65b92dc4b47f825c4b635ac4f403f3d13
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Sep 28 14:17:54 2023 -0300

    riscv: Do not use cfi_label when building with clang
    
    The .cfi_label is a gas extension not supported by clang.  From a
    ziglang discussion [1], it seems that it is not really required.
    
    [1] https://github.com/ziglang/zig/issues/3340

Diff:
---
 sysdeps/generic/sysdep.h               | 6 ++++++
 sysdeps/riscv/start.S                  | 2 +-
 sysdeps/unix/sysv/linux/riscv/clone.S  | 2 +-
 sysdeps/unix/sysv/linux/riscv/clone3.S | 2 +-
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/sysdeps/generic/sysdep.h b/sysdeps/generic/sysdep.h
index c47e53d3d8..c663912b8e 100644
--- a/sysdeps/generic/sysdep.h
+++ b/sysdeps/generic/sysdep.h
@@ -55,6 +55,12 @@
 # define cfi_window_save		.cfi_window_save
 # define cfi_personality(enc, exp)	.cfi_personality enc, exp
 # define cfi_lsda(enc, exp)		.cfi_lsda enc, exp
+/* .cfi_label is a gas extension not supported by clang.  */
+# ifndef __clang__
+#  define cfi_label(label)		.cfi_label label
+# else
+#  define cfi_label(label)
+# endif
 
 #else /* ! ASSEMBLER */
 
diff --git a/sysdeps/riscv/start.S b/sysdeps/riscv/start.S
index ede186ef23..bff535be9d 100644
--- a/sysdeps/riscv/start.S
+++ b/sysdeps/riscv/start.S
@@ -45,7 +45,7 @@
 ENTRY (ENTRY_POINT)
 	/* Terminate call stack by noting ra is undefined.  Use a dummy
 	   .cfi_label to force starting the FDE.  */
-	.cfi_label .Ldummy
+	cfi_label (.Ldummy)
 	cfi_undefined (ra)
 	call  load_gp
 	mv    a5, a0  /* rtld_fini.  */
diff --git a/sysdeps/unix/sysv/linux/riscv/clone.S b/sysdeps/unix/sysv/linux/riscv/clone.S
index b9c843eb1d..f815fd6160 100644
--- a/sysdeps/unix/sysv/linux/riscv/clone.S
+++ b/sysdeps/unix/sysv/linux/riscv/clone.S
@@ -74,7 +74,7 @@ ENTRY (__thread_start)
 L (thread_start):
 	/* Terminate call stack by noting ra is undefined.  Use a dummy
 	   .cfi_label to force starting the FDE.  */
-	.cfi_label .Ldummy
+	cfi_label (.Ldummy)
 	cfi_undefined (ra)
 
 	/* Restore the arg for user's function.  */
diff --git a/sysdeps/unix/sysv/linux/riscv/clone3.S b/sysdeps/unix/sysv/linux/riscv/clone3.S
index 29264be054..6a81a56519 100644
--- a/sysdeps/unix/sysv/linux/riscv/clone3.S
+++ b/sysdeps/unix/sysv/linux/riscv/clone3.S
@@ -62,7 +62,7 @@ ENTRY(__thread_start_clone3)
 L(thread_start):
 	/* Terminate call stack by noting ra is undefined.  Use a dummy
 	   .cfi_label to force starting the FDE.  */
-	.cfi_label .Ldummy
+	cfi_label (.Ldummy)
 	cfi_undefined (ra)
 
 	/* Restore the arg for user's function and call the user's

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

* [glibc/azanella/clang] riscv: Do not use cfi_label when building with clang
@ 2024-02-09 17:32 Adhemerval Zanella
  0 siblings, 0 replies; 7+ messages in thread
From: Adhemerval Zanella @ 2024-02-09 17:32 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=bb27632e8ccbdbbf51bfc4670703fb53cd06e1bc

commit bb27632e8ccbdbbf51bfc4670703fb53cd06e1bc
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Sep 28 14:17:54 2023 -0300

    riscv: Do not use cfi_label when building with clang
    
    The .cfi_label is a gas extension not supported by clang.  From a
    ziglang discussion [1], it seems that it is not really required.
    
    [1] https://github.com/ziglang/zig/issues/3340

Diff:
---
 sysdeps/generic/sysdep.h               | 6 ++++++
 sysdeps/riscv/start.S                  | 2 +-
 sysdeps/unix/sysv/linux/riscv/clone.S  | 2 +-
 sysdeps/unix/sysv/linux/riscv/clone3.S | 2 +-
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/sysdeps/generic/sysdep.h b/sysdeps/generic/sysdep.h
index c47e53d3d8..c663912b8e 100644
--- a/sysdeps/generic/sysdep.h
+++ b/sysdeps/generic/sysdep.h
@@ -55,6 +55,12 @@
 # define cfi_window_save		.cfi_window_save
 # define cfi_personality(enc, exp)	.cfi_personality enc, exp
 # define cfi_lsda(enc, exp)		.cfi_lsda enc, exp
+/* .cfi_label is a gas extension not supported by clang.  */
+# ifndef __clang__
+#  define cfi_label(label)		.cfi_label label
+# else
+#  define cfi_label(label)
+# endif
 
 #else /* ! ASSEMBLER */
 
diff --git a/sysdeps/riscv/start.S b/sysdeps/riscv/start.S
index ede186ef23..bff535be9d 100644
--- a/sysdeps/riscv/start.S
+++ b/sysdeps/riscv/start.S
@@ -45,7 +45,7 @@
 ENTRY (ENTRY_POINT)
 	/* Terminate call stack by noting ra is undefined.  Use a dummy
 	   .cfi_label to force starting the FDE.  */
-	.cfi_label .Ldummy
+	cfi_label (.Ldummy)
 	cfi_undefined (ra)
 	call  load_gp
 	mv    a5, a0  /* rtld_fini.  */
diff --git a/sysdeps/unix/sysv/linux/riscv/clone.S b/sysdeps/unix/sysv/linux/riscv/clone.S
index b9c843eb1d..f815fd6160 100644
--- a/sysdeps/unix/sysv/linux/riscv/clone.S
+++ b/sysdeps/unix/sysv/linux/riscv/clone.S
@@ -74,7 +74,7 @@ ENTRY (__thread_start)
 L (thread_start):
 	/* Terminate call stack by noting ra is undefined.  Use a dummy
 	   .cfi_label to force starting the FDE.  */
-	.cfi_label .Ldummy
+	cfi_label (.Ldummy)
 	cfi_undefined (ra)
 
 	/* Restore the arg for user's function.  */
diff --git a/sysdeps/unix/sysv/linux/riscv/clone3.S b/sysdeps/unix/sysv/linux/riscv/clone3.S
index 29264be054..6a81a56519 100644
--- a/sysdeps/unix/sysv/linux/riscv/clone3.S
+++ b/sysdeps/unix/sysv/linux/riscv/clone3.S
@@ -62,7 +62,7 @@ ENTRY(__thread_start_clone3)
 L(thread_start):
 	/* Terminate call stack by noting ra is undefined.  Use a dummy
 	   .cfi_label to force starting the FDE.  */
-	.cfi_label .Ldummy
+	cfi_label (.Ldummy)
 	cfi_undefined (ra)
 
 	/* Restore the arg for user's function and call the user's

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

* [glibc/azanella/clang] riscv: Do not use cfi_label when building with clang
@ 2024-02-07 14:08 Adhemerval Zanella
  0 siblings, 0 replies; 7+ messages in thread
From: Adhemerval Zanella @ 2024-02-07 14:08 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d858fff7d1e52ba1bd320882aa3cd55b793c238b

commit d858fff7d1e52ba1bd320882aa3cd55b793c238b
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Sep 28 14:17:54 2023 -0300

    riscv: Do not use cfi_label when building with clang
    
    The .cfi_label is a gas extension not supported by clang.  From a
    ziglang discussion [1], it seems that it is not really required.
    
    [1] https://github.com/ziglang/zig/issues/3340

Diff:
---
 sysdeps/generic/sysdep.h               | 6 ++++++
 sysdeps/riscv/start.S                  | 2 +-
 sysdeps/unix/sysv/linux/riscv/clone.S  | 2 +-
 sysdeps/unix/sysv/linux/riscv/clone3.S | 2 +-
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/sysdeps/generic/sysdep.h b/sysdeps/generic/sysdep.h
index c47e53d3d8..c663912b8e 100644
--- a/sysdeps/generic/sysdep.h
+++ b/sysdeps/generic/sysdep.h
@@ -55,6 +55,12 @@
 # define cfi_window_save		.cfi_window_save
 # define cfi_personality(enc, exp)	.cfi_personality enc, exp
 # define cfi_lsda(enc, exp)		.cfi_lsda enc, exp
+/* .cfi_label is a gas extension not supported by clang.  */
+# ifndef __clang__
+#  define cfi_label(label)		.cfi_label label
+# else
+#  define cfi_label(label)
+# endif
 
 #else /* ! ASSEMBLER */
 
diff --git a/sysdeps/riscv/start.S b/sysdeps/riscv/start.S
index ede186ef23..bff535be9d 100644
--- a/sysdeps/riscv/start.S
+++ b/sysdeps/riscv/start.S
@@ -45,7 +45,7 @@
 ENTRY (ENTRY_POINT)
 	/* Terminate call stack by noting ra is undefined.  Use a dummy
 	   .cfi_label to force starting the FDE.  */
-	.cfi_label .Ldummy
+	cfi_label (.Ldummy)
 	cfi_undefined (ra)
 	call  load_gp
 	mv    a5, a0  /* rtld_fini.  */
diff --git a/sysdeps/unix/sysv/linux/riscv/clone.S b/sysdeps/unix/sysv/linux/riscv/clone.S
index b9c843eb1d..f815fd6160 100644
--- a/sysdeps/unix/sysv/linux/riscv/clone.S
+++ b/sysdeps/unix/sysv/linux/riscv/clone.S
@@ -74,7 +74,7 @@ ENTRY (__thread_start)
 L (thread_start):
 	/* Terminate call stack by noting ra is undefined.  Use a dummy
 	   .cfi_label to force starting the FDE.  */
-	.cfi_label .Ldummy
+	cfi_label (.Ldummy)
 	cfi_undefined (ra)
 
 	/* Restore the arg for user's function.  */
diff --git a/sysdeps/unix/sysv/linux/riscv/clone3.S b/sysdeps/unix/sysv/linux/riscv/clone3.S
index 29264be054..6a81a56519 100644
--- a/sysdeps/unix/sysv/linux/riscv/clone3.S
+++ b/sysdeps/unix/sysv/linux/riscv/clone3.S
@@ -62,7 +62,7 @@ ENTRY(__thread_start_clone3)
 L(thread_start):
 	/* Terminate call stack by noting ra is undefined.  Use a dummy
 	   .cfi_label to force starting the FDE.  */
-	.cfi_label .Ldummy
+	cfi_label (.Ldummy)
 	cfi_undefined (ra)
 
 	/* Restore the arg for user's function and call the user's

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

* [glibc/azanella/clang] riscv: Do not use cfi_label when building with clang
@ 2024-01-29 17:58 Adhemerval Zanella
  0 siblings, 0 replies; 7+ messages in thread
From: Adhemerval Zanella @ 2024-01-29 17:58 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f2c1c4e8cc6b7652f0c8711328b18c0430da983b

commit f2c1c4e8cc6b7652f0c8711328b18c0430da983b
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Sep 28 14:17:54 2023 -0300

    riscv: Do not use cfi_label when building with clang
    
    The .cfi_label is a gas extension not supported by clang.  From a
    ziglang discussion [1], it seems that it is not really required.
    
    [1] https://github.com/ziglang/zig/issues/3340

Diff:
---
 sysdeps/generic/sysdep.h               | 6 ++++++
 sysdeps/riscv/start.S                  | 2 +-
 sysdeps/unix/sysv/linux/riscv/clone.S  | 2 +-
 sysdeps/unix/sysv/linux/riscv/clone3.S | 2 +-
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/sysdeps/generic/sysdep.h b/sysdeps/generic/sysdep.h
index c47e53d3d8..c663912b8e 100644
--- a/sysdeps/generic/sysdep.h
+++ b/sysdeps/generic/sysdep.h
@@ -55,6 +55,12 @@
 # define cfi_window_save		.cfi_window_save
 # define cfi_personality(enc, exp)	.cfi_personality enc, exp
 # define cfi_lsda(enc, exp)		.cfi_lsda enc, exp
+/* .cfi_label is a gas extension not supported by clang.  */
+# ifndef __clang__
+#  define cfi_label(label)		.cfi_label label
+# else
+#  define cfi_label(label)
+# endif
 
 #else /* ! ASSEMBLER */
 
diff --git a/sysdeps/riscv/start.S b/sysdeps/riscv/start.S
index ede186ef23..bff535be9d 100644
--- a/sysdeps/riscv/start.S
+++ b/sysdeps/riscv/start.S
@@ -45,7 +45,7 @@
 ENTRY (ENTRY_POINT)
 	/* Terminate call stack by noting ra is undefined.  Use a dummy
 	   .cfi_label to force starting the FDE.  */
-	.cfi_label .Ldummy
+	cfi_label (.Ldummy)
 	cfi_undefined (ra)
 	call  load_gp
 	mv    a5, a0  /* rtld_fini.  */
diff --git a/sysdeps/unix/sysv/linux/riscv/clone.S b/sysdeps/unix/sysv/linux/riscv/clone.S
index b9c843eb1d..f815fd6160 100644
--- a/sysdeps/unix/sysv/linux/riscv/clone.S
+++ b/sysdeps/unix/sysv/linux/riscv/clone.S
@@ -74,7 +74,7 @@ ENTRY (__thread_start)
 L (thread_start):
 	/* Terminate call stack by noting ra is undefined.  Use a dummy
 	   .cfi_label to force starting the FDE.  */
-	.cfi_label .Ldummy
+	cfi_label (.Ldummy)
 	cfi_undefined (ra)
 
 	/* Restore the arg for user's function.  */
diff --git a/sysdeps/unix/sysv/linux/riscv/clone3.S b/sysdeps/unix/sysv/linux/riscv/clone3.S
index 29264be054..6a81a56519 100644
--- a/sysdeps/unix/sysv/linux/riscv/clone3.S
+++ b/sysdeps/unix/sysv/linux/riscv/clone3.S
@@ -62,7 +62,7 @@ ENTRY(__thread_start_clone3)
 L(thread_start):
 	/* Terminate call stack by noting ra is undefined.  Use a dummy
 	   .cfi_label to force starting the FDE.  */
-	.cfi_label .Ldummy
+	cfi_label (.Ldummy)
 	cfi_undefined (ra)
 
 	/* Restore the arg for user's function and call the user's

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

* [glibc/azanella/clang] riscv: Do not use cfi_label when building with clang
@ 2023-12-21 18:54 Adhemerval Zanella
  0 siblings, 0 replies; 7+ messages in thread
From: Adhemerval Zanella @ 2023-12-21 18:54 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c8f3b6500173b0efe083bfd3d0cbe2f90ea8de56

commit c8f3b6500173b0efe083bfd3d0cbe2f90ea8de56
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Sep 28 14:17:54 2023 -0300

    riscv: Do not use cfi_label when building with clang
    
    The .cfi_label is a gas extension not supported by clang.  From a
    ziglang discussion [1], it seems that it is not really required.
    
    [1] https://github.com/ziglang/zig/issues/3340

Diff:
---
 sysdeps/generic/sysdep.h               | 6 ++++++
 sysdeps/riscv/start.S                  | 2 +-
 sysdeps/unix/sysv/linux/riscv/clone.S  | 2 +-
 sysdeps/unix/sysv/linux/riscv/clone3.S | 2 +-
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/sysdeps/generic/sysdep.h b/sysdeps/generic/sysdep.h
index e77be376f7..66a5e8912f 100644
--- a/sysdeps/generic/sysdep.h
+++ b/sysdeps/generic/sysdep.h
@@ -55,6 +55,12 @@
 # define cfi_window_save		.cfi_window_save
 # define cfi_personality(enc, exp)	.cfi_personality enc, exp
 # define cfi_lsda(enc, exp)		.cfi_lsda enc, exp
+/* .cfi_label is a gas extension not supported by clang.  */
+# ifndef __clang__
+#  define cfi_label(label)		.cfi_label label
+# else
+#  define cfi_label(label)
+# endif
 
 #else /* ! ASSEMBLER */
 
diff --git a/sysdeps/riscv/start.S b/sysdeps/riscv/start.S
index 6dfe65273f..8370311486 100644
--- a/sysdeps/riscv/start.S
+++ b/sysdeps/riscv/start.S
@@ -45,7 +45,7 @@
 ENTRY (ENTRY_POINT)
 	/* Terminate call stack by noting ra is undefined.  Use a dummy
 	   .cfi_label to force starting the FDE.  */
-	.cfi_label .Ldummy
+	cfi_label (.Ldummy)
 	cfi_undefined (ra)
 	call  load_gp
 	mv    a5, a0  /* rtld_fini.  */
diff --git a/sysdeps/unix/sysv/linux/riscv/clone.S b/sysdeps/unix/sysv/linux/riscv/clone.S
index 22ddea4dcd..d7ca014760 100644
--- a/sysdeps/unix/sysv/linux/riscv/clone.S
+++ b/sysdeps/unix/sysv/linux/riscv/clone.S
@@ -74,7 +74,7 @@ ENTRY (__thread_start)
 L (thread_start):
 	/* Terminate call stack by noting ra is undefined.  Use a dummy
 	   .cfi_label to force starting the FDE.  */
-	.cfi_label .Ldummy
+	cfi_label (.Ldummy)
 	cfi_undefined (ra)
 
 	/* Restore the arg for user's function.  */
diff --git a/sysdeps/unix/sysv/linux/riscv/clone3.S b/sysdeps/unix/sysv/linux/riscv/clone3.S
index 0ed9fd0745..90ecac4797 100644
--- a/sysdeps/unix/sysv/linux/riscv/clone3.S
+++ b/sysdeps/unix/sysv/linux/riscv/clone3.S
@@ -62,7 +62,7 @@ ENTRY(__thread_start_clone3)
 L(thread_start):
 	/* Terminate call stack by noting ra is undefined.  Use a dummy
 	   .cfi_label to force starting the FDE.  */
-	.cfi_label .Ldummy
+	cfi_label (.Ldummy)
 	cfi_undefined (ra)
 
 	/* Restore the arg for user's function and call the user's

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

* [glibc/azanella/clang] riscv: Do not use cfi_label when building with clang
@ 2023-09-28 17:53 Adhemerval Zanella
  0 siblings, 0 replies; 7+ messages in thread
From: Adhemerval Zanella @ 2023-09-28 17:53 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a0477f55f4ec8ac3fa538a7f2fe257fdd2a60733

commit a0477f55f4ec8ac3fa538a7f2fe257fdd2a60733
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Sep 28 14:17:54 2023 -0300

    riscv: Do not use cfi_label when building with clang
    
    The .cfi_label is a gas extension not supported by clang.  From a
    ziglang discussion [1], it seems that it is not really required.
    
    [1] https://github.com/ziglang/zig/issues/3340

Diff:
---
 sysdeps/generic/sysdep.h               | 6 ++++++
 sysdeps/riscv/start.S                  | 2 +-
 sysdeps/unix/sysv/linux/riscv/clone.S  | 2 +-
 sysdeps/unix/sysv/linux/riscv/clone3.S | 2 +-
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/sysdeps/generic/sysdep.h b/sysdeps/generic/sysdep.h
index e77be376f7..66a5e8912f 100644
--- a/sysdeps/generic/sysdep.h
+++ b/sysdeps/generic/sysdep.h
@@ -55,6 +55,12 @@
 # define cfi_window_save		.cfi_window_save
 # define cfi_personality(enc, exp)	.cfi_personality enc, exp
 # define cfi_lsda(enc, exp)		.cfi_lsda enc, exp
+/* .cfi_label is a gas extension not supported by clang.  */
+# ifndef __clang__
+#  define cfi_label(label)		.cfi_label label
+# else
+#  define cfi_label(label)
+# endif
 
 #else /* ! ASSEMBLER */
 
diff --git a/sysdeps/riscv/start.S b/sysdeps/riscv/start.S
index 6dfe65273f..8370311486 100644
--- a/sysdeps/riscv/start.S
+++ b/sysdeps/riscv/start.S
@@ -45,7 +45,7 @@
 ENTRY (ENTRY_POINT)
 	/* Terminate call stack by noting ra is undefined.  Use a dummy
 	   .cfi_label to force starting the FDE.  */
-	.cfi_label .Ldummy
+	cfi_label (.Ldummy)
 	cfi_undefined (ra)
 	call  load_gp
 	mv    a5, a0  /* rtld_fini.  */
diff --git a/sysdeps/unix/sysv/linux/riscv/clone.S b/sysdeps/unix/sysv/linux/riscv/clone.S
index 22ddea4dcd..d7ca014760 100644
--- a/sysdeps/unix/sysv/linux/riscv/clone.S
+++ b/sysdeps/unix/sysv/linux/riscv/clone.S
@@ -74,7 +74,7 @@ ENTRY (__thread_start)
 L (thread_start):
 	/* Terminate call stack by noting ra is undefined.  Use a dummy
 	   .cfi_label to force starting the FDE.  */
-	.cfi_label .Ldummy
+	cfi_label (.Ldummy)
 	cfi_undefined (ra)
 
 	/* Restore the arg for user's function.  */
diff --git a/sysdeps/unix/sysv/linux/riscv/clone3.S b/sysdeps/unix/sysv/linux/riscv/clone3.S
index 0ed9fd0745..90ecac4797 100644
--- a/sysdeps/unix/sysv/linux/riscv/clone3.S
+++ b/sysdeps/unix/sysv/linux/riscv/clone3.S
@@ -62,7 +62,7 @@ ENTRY(__thread_start_clone3)
 L(thread_start):
 	/* Terminate call stack by noting ra is undefined.  Use a dummy
 	   .cfi_label to force starting the FDE.  */
-	.cfi_label .Ldummy
+	cfi_label (.Ldummy)
 	cfi_undefined (ra)
 
 	/* Restore the arg for user's function and call the user's

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

end of thread, other threads:[~2024-04-17 20:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-17 20:08 [glibc/azanella/clang] riscv: Do not use cfi_label when building with clang Adhemerval Zanella
  -- strict thread matches above, loose matches on Subject: below --
2024-04-02 15:54 Adhemerval Zanella
2024-02-09 17:32 Adhemerval Zanella
2024-02-07 14:08 Adhemerval Zanella
2024-01-29 17:58 Adhemerval Zanella
2023-12-21 18:54 Adhemerval Zanella
2023-09-28 17:53 Adhemerval Zanella

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).