diff mbox series

alpha: Use generic gettimeofday implementation

Message ID 20200210215556.22513-1-adhemerval.zanella@linaro.org
State Accepted
Commit c9532194205aa2d044acdff7af98816b793c1491
Headers show
Series alpha: Use generic gettimeofday implementation | expand

Commit Message

Adhemerval Zanella Feb. 10, 2020, 9:55 p.m. UTC
It makes alpha no longer reports information about a system-wide
time zone and moves the version logic on the alpha implementation.

Checked on a build and check-abi for alpha-linux-gnu.
---
 sysdeps/unix/sysv/linux/alpha/gettimeofday.c | 9 ++++++++-
 sysdeps/unix/sysv/linux/alpha/syscalls.list  | 1 -
 time/gettimeofday.c                          | 6 ------
 3 files changed, 8 insertions(+), 8 deletions(-)

-- 
2.17.1

Comments

Lukasz Majewski Feb. 10, 2020, 11:34 p.m. UTC | #1
On Mon, 10 Feb 2020 18:55:56 -0300
Adhemerval Zanella <adhemerval.zanella@linaro.org> wrote:

> It makes alpha no longer reports information about a system-wide

> time zone and moves the version logic on the alpha implementation.

> 

> Checked on a build and check-abi for alpha-linux-gnu.

> ---

>  sysdeps/unix/sysv/linux/alpha/gettimeofday.c | 9 ++++++++-

>  sysdeps/unix/sysv/linux/alpha/syscalls.list  | 1 -

>  time/gettimeofday.c                          | 6 ------

>  3 files changed, 8 insertions(+), 8 deletions(-)

> 

> diff --git a/sysdeps/unix/sysv/linux/alpha/gettimeofday.c

> b/sysdeps/unix/sysv/linux/alpha/gettimeofday.c index

> 6bb8dfa877..7ad3c6a412 100644 ---

> a/sysdeps/unix/sysv/linux/alpha/gettimeofday.c +++

> b/sysdeps/unix/sysv/linux/alpha/gettimeofday.c @@ -18,5 +18,12 @@

>  


Reviewed-by: Lukasz Majewski <lukma@denx.de>


>  /* We can use the generic implementation, but we have to override its

>     default symbol version.  */

> -#define VERSION_gettimeofday GLIBC_2.1

> +#undef weak_alias

> +#define weak_alias(a,b)

> +#undef strong_alias

> +#define strong_alias(a, b)

>  #include <time/gettimeofday.c>

> +

> +_weak_alias (___gettimeofday, __wgettimeofday);

> +default_symbol_version (___gettimeofday, __gettimeofday, GLIBC_2.1);

> +default_symbol_version (__wgettimeofday,   gettimeofday, GLIBC_2.1);

> diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list

> b/sysdeps/unix/sysv/linux/alpha/syscalls.list index

> caf45ea359..c7cbe886ea 100644 ---

> a/sysdeps/unix/sysv/linux/alpha/syscalls.list +++

> b/sysdeps/unix/sysv/linux/alpha/syscalls.list @@ -23,7 +23,6 @@

> pciconfig_write	EXTRA	pciconfig_write	5

> pciconfig_write pciconfig_iobase EXTRA	pciconfig_iobase

> 3	__pciconfig_iobase pciconfig_iobase # timeval64 entry points

> (see osf_*.c for GLIBC_2.0 timeval32 equivalents)

> -gettimeofday	-	gettimeofday	i:pP

> __GI___gettimeofday gettimeofday@@GLIBC_2.1 __gettimeofday@@GLIBC_2.1

> getitimer	-	getitimer	i:ip

> __getitimer	getitimer@@GLIBC_2.1 setitimer	-

> setitimer	i:ipP	__setitimer	setitimer@@GLIBC_2.1

> utimes		-	utimes		i:sp

> __utimes	utimes@@GLIBC_2.1 diff --git a/time/gettimeofday.c

> b/time/gettimeofday.c index 5ea15e581f..07c6e10d12 100644 ---

> a/time/gettimeofday.c +++ b/time/gettimeofday.c @@ -36,11 +36,5 @@

> ___gettimeofday (struct timeval *restrict tv, void *restrict tz)

> return 0; } 

> -#ifdef VERSION_gettimeofday

> -weak_alias (___gettimeofday, __wgettimeofday);

> -default_symbol_version (___gettimeofday, __gettimeofday,

> VERSION_gettimeofday); -default_symbol_version (__wgettimeofday,

> gettimeofday, VERSION_gettimeofday); -#else

>  strong_alias (___gettimeofday, __gettimeofday)

>  weak_alias (___gettimeofday, gettimeofday)

> -#endif





Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
Joseph Myers Feb. 12, 2020, 11:30 p.m. UTC | #2
This appears to have lost the gettimeofday symbol from static libc - I see 
an undefined reference linking nptl/tst-cond8-static.

https://sourceware.org/ml/libc-testresults/2020-q1/msg00194.html

-- 
Joseph S. Myers
joseph@codesourcery.com
diff mbox series

Patch

diff --git a/sysdeps/unix/sysv/linux/alpha/gettimeofday.c b/sysdeps/unix/sysv/linux/alpha/gettimeofday.c
index 6bb8dfa877..7ad3c6a412 100644
--- a/sysdeps/unix/sysv/linux/alpha/gettimeofday.c
+++ b/sysdeps/unix/sysv/linux/alpha/gettimeofday.c
@@ -18,5 +18,12 @@ 
 
 /* We can use the generic implementation, but we have to override its
    default symbol version.  */
-#define VERSION_gettimeofday GLIBC_2.1
+#undef weak_alias
+#define weak_alias(a,b)
+#undef strong_alias
+#define strong_alias(a, b)
 #include <time/gettimeofday.c>
+
+_weak_alias (___gettimeofday, __wgettimeofday);
+default_symbol_version (___gettimeofday, __gettimeofday, GLIBC_2.1);
+default_symbol_version (__wgettimeofday,   gettimeofday, GLIBC_2.1);
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index caf45ea359..c7cbe886ea 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -23,7 +23,6 @@  pciconfig_write	EXTRA	pciconfig_write	5	pciconfig_write
 pciconfig_iobase EXTRA	pciconfig_iobase 3	__pciconfig_iobase pciconfig_iobase
 
 # timeval64 entry points (see osf_*.c for GLIBC_2.0 timeval32 equivalents)
-gettimeofday	-	gettimeofday	i:pP	__GI___gettimeofday gettimeofday@@GLIBC_2.1 __gettimeofday@@GLIBC_2.1
 getitimer	-	getitimer	i:ip	__getitimer	getitimer@@GLIBC_2.1
 setitimer	-	setitimer	i:ipP	__setitimer	setitimer@@GLIBC_2.1
 utimes		-	utimes		i:sp	__utimes	utimes@@GLIBC_2.1
diff --git a/time/gettimeofday.c b/time/gettimeofday.c
index 5ea15e581f..07c6e10d12 100644
--- a/time/gettimeofday.c
+++ b/time/gettimeofday.c
@@ -36,11 +36,5 @@  ___gettimeofday (struct timeval *restrict tv, void *restrict tz)
   return 0;
 }
 
-#ifdef VERSION_gettimeofday
-weak_alias (___gettimeofday, __wgettimeofday);
-default_symbol_version (___gettimeofday, __gettimeofday, VERSION_gettimeofday);
-default_symbol_version (__wgettimeofday,   gettimeofday, VERSION_gettimeofday);
-#else
 strong_alias (___gettimeofday, __gettimeofday)
 weak_alias (___gettimeofday, gettimeofday)
-#endif