From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id CE0933858419; Thu, 21 Dec 2023 18:54:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CE0933858419 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1703184896; bh=ucD9eHYvZbMtPd74Mw4RcjmmtZpImIyq3CAIvskO37E=; h=From:To:Subject:Date:From; b=w7B7cTbxNydP6UguLl/t+FNc+MOFzR9GqW6tF0JFn5uuf41wPOi+SoSsZnlexKHQr Q3Mmdu5+/gWL9IG2R2ofB9zCpdzjXxDpY82/F3a9R8D4xIjnySgTJMGPKq2c5uyW0m 1Dg0vtRv9Uj1S+a2a9xAcRqf53Dv+DMO5oYUnUNI= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] riscv: Do not use cfi_label when building with clang X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: 88bc60cf2c72ca51b1a11a487a94b24dd086e1e8 X-Git-Newrev: c8f3b6500173b0efe083bfd3d0cbe2f90ea8de56 Message-Id: <20231221185456.CE0933858419@sourceware.org> Date: Thu, 21 Dec 2023 18:54:56 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c8f3b6500173b0efe083bfd3d0cbe2f90ea8de56 commit c8f3b6500173b0efe083bfd3d0cbe2f90ea8de56 Author: Adhemerval Zanella 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