Skip to contentSkip to conversation

vdso: don't require 64-bit math in standalone test

PATCH In review Jeff Mahoney 4 participants 4 messages Oct 24, 2014 – Oct 25, 2014 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vdso: don't require 64-bit math in standalone test

The use of 64-bit math on i386 causes build failures:
vdso_standalone_test_x86.c:(.text+0x101): undefined reference to __umoddi3' vdso_standalone_test_x86.c:(.text+0x12d): undefined reference to __udivdi3'

Commit adb19fb66ee (Documentation: add makefiles for more targets) is now building this by default, so it's failing the kernel build entirely.

Switching the declaration from uint64_t to time_t does the right thing and handles the x32 case automatically.

---
 Documentation/vDSO/vdso_standalone_test_x86.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/vDSO/vdso_standalone_test_x86.c +1 -1
@@ -63,7 +63,7 @@ static inline void linux_exit(int code)
 	x86_syscall3(__NR_exit, code, 0, 0);
 }
 
-void to_base10(char *lastdig, uint64_t n)
+void to_base10(char *lastdig, time_t n)
 {
 	while (n) {
 		*lastdig = (n % 10) + '0';
Signature · 2 lines
Jeff Mahoney
SUSE Labs
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Jeff Mahoney

The use of 64-bit math on i386 causes build failures:
vdso_standalone_test_x86.c:(.text+0x101): undefined reference to __umoddi3' vdso_standalone_test_x86.c:(.text+0x12d): undefined reference to __udivdi3'

Commit adb19fb66ee (Documentation: add makefiles for more targets) is now building this by default, so it's failing the kernel build entirely.

Switching the declaration from uint64_t to time_t does the right thing and handles the x32 case automatically.

reviewer Acked-by Peter Foley on v1 1/1
#2 lore raw
In reply to Jeff Mahoney
Quoted 11 lines · Jeff Mahoney

The use of 64-bit math on i386 causes build failures:
vdso_standalone_test_x86.c:(.text+0x101): undefined reference to __umoddi3' vdso_standalone_test_x86.c:(.text+0x12d): undefined reference to __udivdi3'

Commit adb19fb66ee (Documentation: add makefiles for more targets) is now building this by default, so it's failing the kernel build entirely.

Switching the declaration from uint64_t to time_t does the right thing and handles the x32 case automatically.

Jon, please pick this up. It was

Quoted 16 lines
---
 Documentation/vDSO/vdso_standalone_test_x86.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/vDSO/vdso_standalone_test_x86.c +1 -1
@@ -63,7 +63,7 @@ static inline void linux_exit(int code)
 	x86_syscall3(__NR_exit, code, 0, 0);
 }
 
-void to_base10(char *lastdig, uint64_t n)
+void to_base10(char *lastdig, time_t n)
 {
 	while (n) {
 		*lastdig = (n % 10) + '0';
Signature · 1 line
~Randy