diff mbox series

[04/12] sparc: Enable VDSO for static linking

Message ID 20190614152908.8101-4-adhemerval.zanella@linaro.org
State New
Headers show
Series [01/12] m68k: Remove vDSO support | expand

Commit Message

Adhemerval Zanella June 14, 2019, 3:29 p.m. UTC
Checked on sparc64-linux-gnu and sparcv9-linux-gnu.

	[BZ #19767]
	* sysdeps/unix/sysv/linux/sparc/init-first.c: Remove #ifdef SHARED.
	* sysdeps/unix/sysv/linux/sparc/libc-vdso.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sysdep.h (ALWAYS_USE_VSYSCALL):
	Define.
---
 sysdeps/unix/sysv/linux/sparc/init-first.c | 8 +++-----
 sysdeps/unix/sysv/linux/sparc/libc-vdso.h  | 6 +-----
 sysdeps/unix/sysv/linux/sparc/sysdep.h     | 3 +++
 3 files changed, 7 insertions(+), 10 deletions(-)

-- 
2.17.1

Comments

Adhemerval Zanella Aug. 2, 2019, 12:34 p.m. UTC | #1
Ping.

On 14/06/2019 12:29, Adhemerval Zanella wrote:
> Checked on sparc64-linux-gnu and sparcv9-linux-gnu.

> 

> 	[BZ #19767]

> 	* sysdeps/unix/sysv/linux/sparc/init-first.c: Remove #ifdef SHARED.

> 	* sysdeps/unix/sysv/linux/sparc/libc-vdso.h: Likewise.

> 	* sysdeps/unix/sysv/linux/sparc/sysdep.h (ALWAYS_USE_VSYSCALL):

> 	Define.

> ---

>  sysdeps/unix/sysv/linux/sparc/init-first.c | 8 +++-----

>  sysdeps/unix/sysv/linux/sparc/libc-vdso.h  | 6 +-----

>  sysdeps/unix/sysv/linux/sparc/sysdep.h     | 3 +++

>  3 files changed, 7 insertions(+), 10 deletions(-)

> 

> diff --git a/sysdeps/unix/sysv/linux/sparc/init-first.c b/sysdeps/unix/sysv/linux/sparc/init-first.c

> index de83321713..643d6c7c88 100644

> --- a/sysdeps/unix/sysv/linux/sparc/init-first.c

> +++ b/sysdeps/unix/sysv/linux/sparc/init-first.c

> @@ -17,9 +17,8 @@

>     License along with the GNU C Library; if not, see

>     <http://www.gnu.org/licenses/>.  */

>  

> -#ifdef SHARED

> -# include <dl-vdso.h>

> -# include <libc-vdso.h>

> +#include <dl-vdso.h>

> +#include <libc-vdso.h>

>  

>  long int (*VDSO_SYMBOL (gettimeofday)) (struct timeval *, void *)

>      attribute_hidden;

> @@ -40,7 +39,6 @@ _libc_vdso_platform_setup (void)

>    VDSO_SYMBOL (clock_gettime) = p;

>  }

>  

> -# define VDSO_SETUP _libc_vdso_platform_setup

> -#endif

> +#define VDSO_SETUP _libc_vdso_platform_setup

>  

>  #include <csu/init-first.c>

> diff --git a/sysdeps/unix/sysv/linux/sparc/libc-vdso.h b/sysdeps/unix/sysv/linux/sparc/libc-vdso.h

> index 4009b00a28..d20afcdf04 100644

> --- a/sysdeps/unix/sysv/linux/sparc/libc-vdso.h

> +++ b/sysdeps/unix/sysv/linux/sparc/libc-vdso.h

> @@ -20,14 +20,10 @@

>  #ifndef _LIBC_VDSO_H

>  #define _LIBC_VDSO_H

>  

> -#ifdef SHARED

> -

> -# include <sysdep-vdso.h>

> +#include <sysdep-vdso.h>

>  

>  extern long int (*VDSO_SYMBOL(gettimeofday)) (struct timeval *, void *)

>     attribute_hidden;

>  extern long int (*VDSO_SYMBOL(clock_gettime)) (clockid_t, struct timespec *);

>  

> -#endif

> -

>  #endif /* _LIBC_VDSO_H */

> diff --git a/sysdeps/unix/sysv/linux/sparc/sysdep.h b/sysdeps/unix/sysv/linux/sparc/sysdep.h

> index 981b2a26b7..fc4053c5ce 100644

> --- a/sysdeps/unix/sysv/linux/sparc/sysdep.h

> +++ b/sysdeps/unix/sysv/linux/sparc/sysdep.h

> @@ -19,6 +19,9 @@

>  #ifndef _LINUX_SPARC_SYSDEP_H

>  #define _LINUX_SPARC_SYSDEP_H 1

>  

> +/* Always enable vsyscalls on sparc */

> +#define ALWAYS_USE_VSYSCALL 1

> +

>  #include <sysdeps/unix/sysdep.h>

>  #include <sysdeps/unix/sysv/linux/sysdep.h>

>  #include <sysdeps/sparc/sysdep.h>

>
diff mbox series

Patch

diff --git a/sysdeps/unix/sysv/linux/sparc/init-first.c b/sysdeps/unix/sysv/linux/sparc/init-first.c
index de83321713..643d6c7c88 100644
--- a/sysdeps/unix/sysv/linux/sparc/init-first.c
+++ b/sysdeps/unix/sysv/linux/sparc/init-first.c
@@ -17,9 +17,8 @@ 
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifdef SHARED
-# include <dl-vdso.h>
-# include <libc-vdso.h>
+#include <dl-vdso.h>
+#include <libc-vdso.h>
 
 long int (*VDSO_SYMBOL (gettimeofday)) (struct timeval *, void *)
     attribute_hidden;
@@ -40,7 +39,6 @@  _libc_vdso_platform_setup (void)
   VDSO_SYMBOL (clock_gettime) = p;
 }
 
-# define VDSO_SETUP _libc_vdso_platform_setup
-#endif
+#define VDSO_SETUP _libc_vdso_platform_setup
 
 #include <csu/init-first.c>
diff --git a/sysdeps/unix/sysv/linux/sparc/libc-vdso.h b/sysdeps/unix/sysv/linux/sparc/libc-vdso.h
index 4009b00a28..d20afcdf04 100644
--- a/sysdeps/unix/sysv/linux/sparc/libc-vdso.h
+++ b/sysdeps/unix/sysv/linux/sparc/libc-vdso.h
@@ -20,14 +20,10 @@ 
 #ifndef _LIBC_VDSO_H
 #define _LIBC_VDSO_H
 
-#ifdef SHARED
-
-# include <sysdep-vdso.h>
+#include <sysdep-vdso.h>
 
 extern long int (*VDSO_SYMBOL(gettimeofday)) (struct timeval *, void *)
    attribute_hidden;
 extern long int (*VDSO_SYMBOL(clock_gettime)) (clockid_t, struct timespec *);
 
-#endif
-
 #endif /* _LIBC_VDSO_H */
diff --git a/sysdeps/unix/sysv/linux/sparc/sysdep.h b/sysdeps/unix/sysv/linux/sparc/sysdep.h
index 981b2a26b7..fc4053c5ce 100644
--- a/sysdeps/unix/sysv/linux/sparc/sysdep.h
+++ b/sysdeps/unix/sysv/linux/sparc/sysdep.h
@@ -19,6 +19,9 @@ 
 #ifndef _LINUX_SPARC_SYSDEP_H
 #define _LINUX_SPARC_SYSDEP_H 1
 
+/* Always enable vsyscalls on sparc */
+#define ALWAYS_USE_VSYSCALL 1
+
 #include <sysdeps/unix/sysdep.h>
 #include <sysdeps/unix/sysv/linux/sysdep.h>
 #include <sysdeps/sparc/sysdep.h>