This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v4] Enable VDSO on x86_64 statically linked programs.
- From: Florian Weimer <fweimer at redhat dot com>
- To: Rafael Avila de Espindola <rafael at espindo dot la>
- Cc: libc-alpha at sourceware dot org, "H.J. Lu" <hjl dot tools at gmail dot com>, Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- Date: Mon, 12 Nov 2018 14:00:12 +0100
- Subject: Re: [PATCH v4] Enable VDSO on x86_64 statically linked programs.
- References: <RGVOvESiWL9rORzqdlMj8F4Z-GPqaLH_b-oN-2Sd9BnVpVwllUDIcl9l0SLea0upmTEAWddbNsnqSWferS9awDUGk6N9yiFkQJCMAQd-5C8=@espindo.la>
* Rafael Avila de Espindola:
> diff --git a/Makeconfig b/Makeconfig
> index fbcf69e7c2..61712dc35e 100644
> --- a/Makeconfig
> +++ b/Makeconfig
> @@ -999,7 +999,7 @@ ifeq (yes,$(build-shared))
> # Under --enable-shared, we will build a shared library of PIC objects.
> # The PIC object files are named foo.os.
> object-suffixes += .os
> -CPPFLAGS-.os = -DPIC -DSHARED
> +CPPFLAGS-.os = -DPIC -DSHARED -DUSE_VSYSCALL
> CFLAGS-.os = $(filter %frame-pointer,$(+cflags)) $(pic-ccflag)
> libtype.os := lib%_pic.a
> # This can be changed by a sysdep makefile
This doesn't seem to be the right place to define the macro. We also
prefer macros that are always defined and which change there value
between 0 and 1.
USE_VSYSCALL seems to be a Linux thing and thus should go into
sysdeps/unix/sysv/linux.
It may be clearer to define
#define USE_VSYSCALL (defined (SHARED) || ALWAYS_USE_VSYSCALL)
and then default ALWAYS_USE_VSYSCALL to 0 and override that to 1 for
x86_64.
Thanks,
Florian