Re: [PATCH v2 2/8] lib: vdso: Build 32 bit specific functions in the right context
From: Thomas Gleixner
Date: Mon Jan 13 2020 - 17:28:44 EST
Vincenzo Frascino <vincenzo.frascino@xxxxxxx> writes:
> clock_gettime32 and clock_getres_time32 should be compiled only with a
> 32 bit vdso library.
>
> Exclude these symbols when BUILD_VDSO32 is not defined.
This breaks the ARM build with:
arch/arm/vdso/vgettimeofday.c: In function â__vdso_clock_gettimeâ:
arch/arm/vdso/vgettimeofday.c:15:9: error: implicit declaration of function â__cvdso_clock_gettime32â; did you mean â__cvdso_clock_gettimeâ? [-Werror=implicit-function-declaration]
return __cvdso_clock_gettime32(clock, ts);
^~~~~~~~~~~~~~~~~~~~~~~
__cvdso_clock_gettime
arch/arm/vdso/vgettimeofday.c: In function â__vdso_clock_getresâ:
arch/arm/vdso/vgettimeofday.c:33:9: error: implicit declaration of function â__cvdso_clock_getres_time32â; did you mean â__cvdso_clock_getres_commonâ? [-Werror=implicit-function-declaration]
return __cvdso_clock_getres_time32(clock_id, res);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
__cvdso_clock_getres_common
cc1: some warnings being treated as errors
The patch below 'fixes' at least the build. Can someone please confirm
the correctness?
Thanks,
tglx
8<----------------
--- a/arch/arm/vdso/Makefile
+++ b/arch/arm/vdso/Makefile
@@ -14,7 +14,7 @@ targets := $(obj-vdso) vdso.so vdso.so.d
obj-vdso := $(addprefix $(obj)/, $(obj-vdso))
ccflags-y := -fPIC -fno-common -fno-builtin -fno-stack-protector
-ccflags-y += -DDISABLE_BRANCH_PROFILING
+ccflags-y += -DDISABLE_BRANCH_PROFILING -DBUILD_VDSO32
ldflags-$(CONFIG_CPU_ENDIAN_BE8) := --be8
ldflags-y := -Bsymbolic --no-undefined -soname=linux-vdso.so.1 \