2014-10-24 18:49:04

by Jeff Mahoney

[permalink] [raw]
Subject: [PATCH] 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.

Signed-off-by: Jeff Mahoney <[email protected]>
---
Documentation/vDSO/vdso_standalone_test_x86.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/Documentation/vDSO/vdso_standalone_test_x86.c
+++ b/Documentation/vDSO/vdso_standalone_test_x86.c
@@ -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';

--
Jeff Mahoney
SUSE Labs


2014-10-24 18:57:00

by Peter Foley

[permalink] [raw]
Subject: Re: [PATCH] vdso: don't require 64-bit math in standalone test

On Fri, Oct 24, 2014 at 2:48 PM, Jeff Mahoney <[email protected]> wrote:
> 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.
>
> Signed-off-by: Jeff Mahoney <[email protected]>

Acked-by: Peter Foley <[email protected]>

2014-10-24 19:13:06

by Randy Dunlap

[permalink] [raw]
Subject: Re: [PATCH] vdso: don't require 64-bit math in standalone test

On 10/24/14 11:48, Jeff Mahoney wrote:
> 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.
>
> Signed-off-by: Jeff Mahoney <[email protected]>

Jon, please pick this up. It was
Acked-by: Peter Foley <[email protected]>

> ---
> Documentation/vDSO/vdso_standalone_test_x86.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/Documentation/vDSO/vdso_standalone_test_x86.c
> +++ b/Documentation/vDSO/vdso_standalone_test_x86.c
> @@ -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';
>


--
~Randy

2014-10-25 19:12:49

by Jonathan Corbet

[permalink] [raw]
Subject: Re: [PATCH] vdso: don't require 64-bit math in standalone test

On Fri, 24 Oct 2014 12:12:58 -0700
Randy Dunlap <[email protected]> wrote:

> Jon, please pick this up. It was
> Acked-by: Peter Foley <[email protected]>

Done.

jon