[PATCH 3/9] ARM: vdso: Directly include the generic vDSO implementations

From: Thomas Weißschuh

Date: Fri Dec 04 2026 - 02:30:58 EST


The inclusion of the generic vDSO implementation through compiler
arguments is complicated and non-obvious.

Directly include the .c files instead.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
---
arch/arm/vdso/Makefile | 4 ----
arch/arm/vdso/vgettimeofday.c | 2 ++
2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/vdso/Makefile b/arch/arm/vdso/Makefile
index cf8cd39ab804..c1dc650672bf 100644
--- a/arch/arm/vdso/Makefile
+++ b/arch/arm/vdso/Makefile
@@ -27,11 +27,7 @@ CFLAGS_REMOVE_vdso.o = -pg

# Force -O2 to avoid libgcc dependencies
CFLAGS_REMOVE_vgettimeofday.o = -pg -Os $(RANDSTRUCT_CFLAGS) $(KSTACK_ERASE_CFLAGS) $(GCC_PLUGINS_CFLAGS)
-ifeq ($(c-gettimeofday-y),)
CFLAGS_vgettimeofday.o = -O2
-else
-CFLAGS_vgettimeofday.o = -O2 -include $(c-gettimeofday-y)
-endif

# Force dependency
$(obj)/vdso.o : $(obj)/vdso.so
diff --git a/arch/arm/vdso/vgettimeofday.c b/arch/arm/vdso/vgettimeofday.c
index 3eebeddbfd18..610f09301f39 100644
--- a/arch/arm/vdso/vgettimeofday.c
+++ b/arch/arm/vdso/vgettimeofday.c
@@ -10,6 +10,8 @@
#include <asm/unwind.h>
#include <vdso/gettime.h>

+#include "../../../lib/vdso/gettimeofday.c"
+
#ifdef CONFIG_COMPAT_32BIT_TIME
int __vdso_clock_gettime(clockid_t clock,
struct old_timespec32 *ts)

--
2.56.1