blob: 74c8c10661f928a38e254b3f80a199e6aa01dcc4 [file] [log] [blame]
Patrick Williams0ca19cc2021-08-16 14:03:13 -05001From 111ab95a85314d1e70fb159a14250354cc69d899 Mon Sep 17 00:00:00 2001
Andrew Geissler82c905d2020-04-13 13:39:40 -05002From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 18 Mar 2015 00:55:53 +0000
Andrew Geisslerd1e89492021-02-12 15:35:20 -06004Subject: [PATCH] eglibc: Resolve __fpscr_values on SH4
Andrew Geissler82c905d2020-04-13 13:39:40 -05005
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
Patrick Williams0ca19cc2021-08-16 14:03:13 -050024index 9c734ff755..974e33b4b1 100644
Andrew Geissler82c905d2020-04-13 13:39:40 -050025--- a/sysdeps/unix/sysv/linux/sh/Versions
26+++ b/sysdeps/unix/sysv/linux/sh/Versions
Patrick Williams0ca19cc2021-08-16 14:03:13 -050027@@ -3,6 +3,7 @@ libc {
Andrew Geissler82c905d2020-04-13 13:39:40 -050028 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
Andrew Geisslerd1e89492021-02-12 15:35:20 -060036index a18fbb2e8b..59421bfbb0 100644
Andrew Geissler82c905d2020-04-13 13:39:40 -050037--- 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+