1From 07a5fa22a9a8bbd43982c1b35132f8c2d5276bfe Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 18 Mar 2015 00:55:53 +0000
4Subject: [PATCH] eglibc: Resolve __fpscr_values on SH4
5
62010-09-29  Nobuhiro Iwamatsu  <iwamatsu@nigauri.org>
7            Andrew Stubbs  <ams@codesourcery.com>
8
9        Resolve SH's __fpscr_values to symbol in libc.so.
10
11        * sysdeps/sh/sh4/fpu/fpu_control.h: Add C++ __set_fpscr prototype.
12        * sysdeps/unix/sysv/linux/sh/Versions (GLIBC_2.2): Add __fpscr_values.
13        * sysdeps/unix/sysv/linux/sh/sysdep.S (___fpscr_values): New constant.
14
15Upstream-Status: Pending
16
17Signed-off-by: Khem Raj <raj.khem@gmail.com>
18---
19 sysdeps/unix/sysv/linux/sh/Versions |  1 +
20 sysdeps/unix/sysv/linux/sh/sysdep.S | 11 +++++++++++
21 2 files changed, 12 insertions(+)
22
23diff --git a/sysdeps/unix/sysv/linux/sh/Versions b/sysdeps/unix/sysv/linux/sh/Versions
24index 3ad702e165..931985b5d6 100644
25--- a/sysdeps/unix/sysv/linux/sh/Versions
26+++ b/sysdeps/unix/sysv/linux/sh/Versions
27@@ -3,6 +3,7 @@ libc {
28   GLIBC_2.2 {
29     # functions used in other libraries
30     __xstat64; __fxstat64; __lxstat64;
31+    __fpscr_values;
32
33     # a*
34     alphasort64;
35diff --git a/sysdeps/unix/sysv/linux/sh/sysdep.S b/sysdeps/unix/sysv/linux/sh/sysdep.S
36index d5d8c5e033..f356d02077 100644
37--- a/sysdeps/unix/sysv/linux/sh/sysdep.S
38+++ b/sysdeps/unix/sysv/linux/sh/sysdep.S
39@@ -30,3 +30,14 @@ ENTRY (__syscall_error)
40
41 #define __syscall_error __syscall_error_1
42 #include <sysdeps/unix/sh/sysdep.S>
43+
44+       .data
45+       .align 3
46+       .globl ___fpscr_values
47+       .type ___fpscr_values, @object
48+       .size ___fpscr_values, 8
49+___fpscr_values:
50+       .long 0
51+       .long 0x80000
52+weak_alias (___fpscr_values, __fpscr_values)
53+
54