This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 06/12] Remove PREPARE_VERSION and PREPARE_VERSION_KNOW
Adhemerval Zanella <adhemerval.zanella@linaro.org> writes:
> This patch removes the PREPARE_VERSION and PREPARE_VERSION_KNOW macro
> and uses a static inline function instead, get_vdso_symbol. Also,
> each architecture that supports vDSO must define the Linux version
> and hash for symbol resolution (VDSO_NAME and VDSO_HASH macro
> respectively).
>
> It also organizes the HAVE_*_VSYSCALL for mips, powerpc, and s390 to set
> them on a common header.
>
> The idea is to require less code to configure and enable vDSO support for
> newer ports. No semantic changes are expected.
>
> Checked with a build against all affected architectures.
I found a few whitespace errors while applying your patches.
LGTM after fixing them.
> diff --git a/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c b/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c
> index c8d7790d8a..6b92e2807b 100644
> --- a/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c
> +++ b/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c
> @@ -57,9 +57,9 @@ __gettimeofday_syscall (struct timeval *tv, struct timezone *tz)
> return INLINE_SYSCALL (gettimeofday, 2, tv, tz);
> }
>
> -# define INIT_ARCH() \
> - PREPARE_VERSION (linux2615, "LINUX_2.6.15", 123718565); \
> - void *vdso_gettimeofday = _dl_vdso_vsym ("__kernel_gettimeofday", &linux2615);
> +# define INIT_ARCH() \
> + void *vdso_gettimeofday = get_vdso_symbol ("__kernel_gettimeofday")
> +
Trailing whitespaces here.
> diff --git a/sysdeps/unix/sysv/linux/powerpc/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/sysdep.h
> new file mode 100644
> index 0000000000..5b411d0e8e
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/powerpc/sysdep.h
> @@ -0,0 +1,26 @@
> +/* Syscall definitions, Linux PowerPC generic version.
> + Copyright (C) 2019 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
> + modify it under the terms of the GNU Lesser General Public
> + License as published by the Free Software Foundation; either
> + version 2.1 of the License, or (at your option) any later version.
> +
> + The GNU C Library is distributed in the hope that it will be useful,
> + but WITHOUT ANY WARRANTY; without even the implied warranty of
> + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + Lesser General Public License for more details.
> +
> + You should have received a copy of the GNU Lesser General Public
> + License along with the GNU C Library; if not, see
> + <http://www.gnu.org/licenses/>. */
> +
> +#define VDSO_NAME "LINUX_2.6.15"
> +#define VDSO_HASH 123718565
> +
> +/* List of system calls which are supported as vsyscalls. */
> +#define HAVE_CLOCK_GETRES_VSYSCALL 1
> +#define HAVE_CLOCK_GETTIME_VSYSCALL 1
> +#define HAVE_GETCPU_VSYSCALL 1
> +
Extra line at EOF.
> diff --git a/sysdeps/unix/sysv/linux/s390/sysdep.h b/sysdeps/unix/sysv/linux/s390/sysdep.h
> new file mode 100644
> index 0000000000..eefbd8f007
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/s390/sysdep.h
> @@ -0,0 +1,27 @@
> +/* Syscall definitions, Linux PowerPC generic version.
> + Copyright (C) 2000-2019 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
> + modify it under the terms of the GNU Lesser General Public
> + License as published by the Free Software Foundation; either
> + version 2.1 of the License, or (at your option) any later version.
> +
> + The GNU C Library is distributed in the hope that it will be useful,
> + but WITHOUT ANY WARRANTY; without even the implied warranty of
> + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + Lesser General Public License for more details.
> +
> + You should have received a copy of the GNU Lesser General Public
> + License along with the GNU C Library; if not, see
> + <http://www.gnu.org/licenses/>. */
> +
> +#define VDSO_NAME "LINUX_2_6_29"
> +#define VDSO_HASH 123718585
> +
> +/* List of system calls which are supported as vsyscalls. */
> +#define HAVE_CLOCK_GETRES_VSYSCALL 1
> +#define HAVE_CLOCK_GETTIME_VSYSCALL 1
> +#define HAVE_GETTIMEOFDAY_VSYSCALL 1
> +#define HAVE_GETCPU_VSYSCALL 1
> +
Extra line here too.
I wouldn't be surprised if I forgot other whitespace errors and I suggest to
rebase your patchset using 'git rebase --whitespace=error-all'.
--
Tulio Magno