[PATCH v4] Enable VDSO on x86_64 statically linked programs.
Florian Weimer
fweimer@redhat.com
Mon Nov 12 13:01:00 GMT 2018
* 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
More information about the Libc-alpha
mailing list