public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Florian Weimer <fweimer@redhat.com>, libc-alpha@sourceware.org
Subject: Re: [PATCH v4 1/3] ia64: Always define IA64_USE_NEW_STUB as a flag macro
Date: Thu, 5 May 2022 14:28:40 -0300	[thread overview]
Message-ID: <53b87991-27c5-dabb-c83e-6b35f6823b0f@linaro.org> (raw)
In-Reply-To: <e1affd5497233f02d0401d7bb2227bd27ed229cb.1651762968.git.fweimer@redhat.com>



On 05/05/2022 12:06, Florian Weimer via Libc-alpha wrote:
> And keep the previous definition if it exists.  This allows
> disabling IA64_USE_NEW_STUB while keeping USE_DL_SYSINFO defined.

LGTM, thanks.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

> ---
> v4: Unchanged.
> v3: Fix “statup” typo.  Do not use libpthread and librt in conditional.
> 
>  sysdeps/unix/sysv/linux/ia64/brk.c    |  5 ++---
>  sysdeps/unix/sysv/linux/ia64/sysdep.h | 23 +++++++++++++----------
>  2 files changed, 15 insertions(+), 13 deletions(-)
> 
> diff --git a/sysdeps/unix/sysv/linux/ia64/brk.c b/sysdeps/unix/sysv/linux/ia64/brk.c
> index 65142aeae9..d2135b74fc 100644
> --- a/sysdeps/unix/sysv/linux/ia64/brk.c
> +++ b/sysdeps/unix/sysv/linux/ia64/brk.c
> @@ -16,7 +16,6 @@
>     License along with the GNU C Library; if not, see
>     <https://www.gnu.org/licenses/>.  */
>  
> -#include <dl-sysdep.h>
> -/* brk is used by statup before TCB is properly set.  */
> -#undef USE_DL_SYSINFO
> +/* brk is used by startup before TCB is properly set up.  */
> +#define IA64_USE_NEW_STUB 0
>  #include <sysdeps/unix/sysv/linux/brk.c>
> diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep.h b/sysdeps/unix/sysv/linux/ia64/sysdep.h
> index 193ecee023..14adbdf4ff 100644
> --- a/sysdeps/unix/sysv/linux/ia64/sysdep.h
> +++ b/sysdeps/unix/sysv/linux/ia64/sysdep.h
> @@ -44,12 +44,15 @@
>  #undef SYS_ify
>  #define SYS_ify(syscall_name)	__NR_##syscall_name
>  
> -#if defined USE_DL_SYSINFO \
> -	&& (IS_IN (libc) \
> -	    || IS_IN (libpthread) || IS_IN (librt))
> -# define IA64_USE_NEW_STUB
> -#else
> -# undef IA64_USE_NEW_STUB
> +#ifndef IA64_USE_NEW_STUB
> +# if defined USE_DL_SYSINFO && IS_IN (libc)
> +#  define IA64_USE_NEW_STUB 1
> +# else
> +#  define IA64_USE_NEW_STUB 0
> +# endif
> +#endif
> +#if IA64_USE_NEW_STUB && !USE_DL_SYSINFO
> +# error IA64_USE_NEW_STUB needs USE_DL_SYSINFO
>  #endif
>  
>  #ifdef __ASSEMBLER__
> @@ -101,7 +104,7 @@
>  	mov r15=num;				\
>  	break __IA64_BREAK_SYSCALL
>  
> -#ifdef IA64_USE_NEW_STUB
> +#if IA64_USE_NEW_STUB
>  # ifdef SHARED
>  #  define DO_CALL(num)				\
>  	.prologue;				\
> @@ -185,7 +188,7 @@
>     (non-negative) errno on error or the return value on success.
>   */
>  
> -#ifdef IA64_USE_NEW_STUB
> +#if IA64_USE_NEW_STUB
>  
>  # define INTERNAL_SYSCALL_NCS(name, nr, args...)			      \
>  ({									      \
> @@ -277,7 +280,7 @@
>  #define ASM_OUTARGS_5	ASM_OUTARGS_4, "=r" (_out4)
>  #define ASM_OUTARGS_6	ASM_OUTARGS_5, "=r" (_out5)
>  
> -#ifdef IA64_USE_NEW_STUB
> +#if IA64_USE_NEW_STUB
>  #define ASM_ARGS_0
>  #define ASM_ARGS_1	ASM_ARGS_0, "4" (_out0)
>  #define ASM_ARGS_2	ASM_ARGS_1, "5" (_out1)
> @@ -313,7 +316,7 @@
>    /* Branch registers.  */						\
>    "b6"
>  
> -#ifdef IA64_USE_NEW_STUB
> +#if IA64_USE_NEW_STUB
>  # define ASM_CLOBBERS_6	ASM_CLOBBERS_6_COMMON
>  #else
>  # define ASM_CLOBBERS_6	ASM_CLOBBERS_6_COMMON , "b7"
> 
> base-commit: c1b68685d438373efe64e5f076f4215723004dfb

      parent reply	other threads:[~2022-05-05 17:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-05 15:06 Florian Weimer
2022-05-05 15:07 ` [PATCH v4 2/3] Linux: Implement a useful version of _startup_fatal Florian Weimer
2022-05-05 15:28   ` Andreas Schwab
2022-05-05 15:43     ` Florian Weimer
2022-05-05 17:29   ` Adhemerval Zanella
2022-05-05 15:08 ` [PATCH v4 3/3] csu: Implement and use _dl_early_allocate during static startup Florian Weimer
2022-05-05 17:48   ` Adhemerval Zanella
2022-05-05 18:03     ` Florian Weimer
2022-05-05 18:25       ` Adhemerval Zanella
2022-05-06 10:00         ` Florian Weimer
2022-05-06 13:04           ` Adhemerval Zanella
2022-05-06 13:19   ` Adhemerval Zanella
2022-05-09 16:10     ` Florian Weimer
2022-05-09 16:52       ` Adhemerval Zanella
2022-05-09 17:08         ` Florian Weimer
2022-05-09 17:37           ` Adhemerval Zanella
2022-05-05 17:28 ` Adhemerval Zanella [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53b87991-27c5-dabb-c83e-6b35f6823b0f@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).