[cross-gcc] Fixed the sh64 libgcc compilation.
David Howells
dhowells at fedoraproject.org
Tue Nov 20 15:34:31 UTC 2012
commit f14ced6dfcf0fd03daccf8b55c7f839348d86403
Author: David Howells <dhowells at redhat.com>
Date: Tue Nov 20 15:33:07 2012 +0000
Fixed the sh64 libgcc compilation.
cross-gcc-sh-libgcc.patch | 40 ++++++++++++++++++++++++++++++++++++++++
cross-gcc.spec | 9 +++++++--
2 files changed, 47 insertions(+), 2 deletions(-)
---
diff --git a/cross-gcc-sh-libgcc.patch b/cross-gcc-sh-libgcc.patch
new file mode 100644
index 0000000..0bb7906
--- /dev/null
+++ b/cross-gcc-sh-libgcc.patch
@@ -0,0 +1,40 @@
+Index: libgcc/config/sh/lib1funcs.S
+===================================================================
+--- libgcc/config/sh/lib1funcs.S (revision 193625)
++++ libgcc/config/sh/lib1funcs.S (working copy)
+@@ -3063,14 +3063,10 @@
+
+ #ifdef L_div_table
+ #if __SH5__
+-#if defined(__pic__) && defined(__SHMEDIA__)
++#if defined(__pic__) && defined(__SHMEDIA__) && __SH5__ != 32
+ .global GLOBAL(sdivsi3)
+ FUNC(GLOBAL(sdivsi3))
+-#if __SH5__ == 32
+- .section .text..SHmedia32,"ax"
+-#else
+ .text
+-#endif
+ #if 0
+ /* ??? FIXME: Presumably due to a linker bug, exporting data symbols
+ in a text section does not work (at least for shared libraries):
+@@ -3133,7 +3129,7 @@
+ Min 2nd step defect: 0.000000e+00 at 0.000000e+00
+ Defect at 1: 1.238659e-07
+ Defect at -2: 1.061708e-07 */
+-#else /* ! __pic__ || ! __SHMEDIA__ */
++#else /* ! __pic__ || ! __SHMEDIA__ || __SH5__ == 32 */
+ .section .rodata
+ #endif /* __pic__ */
+ #if defined(TEXT_DATA_BUG) && defined(__pic__) && defined(__SHMEDIA__)
+Index: libgcc/config/sh/t-sh64
+===================================================================
+--- libgcc/config/sh/t-sh64 (revision 193625)
++++ libgcc/config/sh/t-sh64 (working copy)
+@@ -2,5 +2,5 @@
+ _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \
+ _shcompact_call_trampoline _shcompact_return_trampoline \
+ _shcompact_incoming_args _ic_invalidate _nested_trampoline \
+- _push_pop_shmedia_regs \
++ _push_pop_shmedia_regs _udiv_qrnnd_16 \
+ _udivdi3 _divdi3 _umoddi3 _moddi3 _div_table
diff --git a/cross-gcc.spec b/cross-gcc.spec
index b7ea3fc..87c4453 100644
--- a/cross-gcc.spec
+++ b/cross-gcc.spec
@@ -1,5 +1,5 @@
-%define build_all 1
+%define build_all 0
%define build_alpha %{build_all}
%define build_arm %{build_all}
%define build_aarch64 %{build_all}
@@ -18,7 +18,7 @@
%define build_powerpc64 %{build_all}
%define build_s390x %{build_all}
%define build_sh %{build_all}
-%define build_sh64 %{build_all}
+%define build_sh64 1
%define build_sparc64 %{build_all}
%define build_tile %{build_all}
%define build_x86_64 %{build_all}
@@ -92,6 +92,7 @@ Patch100: cross-intl-filename.patch
# m68k - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53557
# alpha - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55344
Patch101: cross-gcc-with-libgcc.patch
+Patch102: cross-gcc-sh-libgcc.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: binutils >= 2.20.51.0.2-12
@@ -208,6 +209,7 @@ cd %{srcdir}
%endif
%patch100 -p0 -b .cross-intl~
%patch101 -p1 -b .with-libgcc~
+%patch102 -p0 -b .sh-libgcc~
# Move the version number back to 4.7.2
sed -i -e 's/4\.7\.3/4.7.2/' gcc/BASE-VER
@@ -659,6 +661,9 @@ rm -rf %{buildroot}
%do_files xtensa-linux-gnu %{build_xtensa}
%changelog
+* Tue Nov 20 2012 David Howells <dhowells at redhat.com> - 4.7.2-1.aa.20121114
+- Fixed the sh64 libgcc compilation.
+
* Thu Nov 15 2012 David Howells <dhowells at redhat.com> - 4.7.2-1.aa.20121114
- Move to the gcc-4.7-aarch64 SVN branch and add a compiler for the aarch64 arch.
- Disable sjlj exception support.
More information about the scm-commits
mailing list