[msp430-gcc] Fix FTBFS on aarch64 host (#926177)
Yaakov Selkowitz
yselkowitz at fedoraproject.org
Tue Jul 8 04:34:47 UTC 2014
commit c70b3c11826d468c8e01417113cbc35e144b8163
Author: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
Date: Thu Jun 26 13:20:59 2014 -0500
Fix FTBFS on aarch64 host (#926177)
msp430-gcc-4.6.4-host-aarch64.patch | 65 +++++++++++++++++++++++++++++++++++
msp430-gcc.spec | 7 +++-
2 files changed, 71 insertions(+), 1 deletions(-)
---
diff --git a/msp430-gcc-4.6.4-host-aarch64.patch b/msp430-gcc-4.6.4-host-aarch64.patch
new file mode 100644
index 0000000..e9082be
--- /dev/null
+++ b/msp430-gcc-4.6.4-host-aarch64.patch
@@ -0,0 +1,65 @@
+--- a/config.guess
++++ b/config.guess
+@@ -858,6 +858,13 @@ EOF
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
++ aarch64:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-gnu
++ exit ;;
++ aarch64_be:Linux:*:*)
++ UNAME_MACHINE=aarch64_be
++ echo ${UNAME_MACHINE}-unknown-linux-gnu
++ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+--- a/config.sub
++++ b/config.sub
+@@ -247,6 +247,7 @@ case $basic_machine in
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
++ | aarch64 | aarch64_be \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+@@ -338,6 +339,7 @@ case $basic_machine in
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
++ | aarch64-* | aarch64_be-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+--- a/gcc/config/host-linux.c
++++ b/gcc/config/host-linux.c
+@@ -84,6 +84,8 @@
+ # define TRY_EMPTY_VM_SPACE 0x60000000
+ #elif defined(__mc68000__)
+ # define TRY_EMPTY_VM_SPACE 0x40000000
++#elif defined(__aarch64__)
++# define TRY_EMPTY_VM_SPACE 0x1000000000
+ #elif defined(__ARM_EABI__)
+ # define TRY_EMPTY_VM_SPACE 0x60000000
+ #else
+--- a/libiberty/configure.ac
++++ b/libiberty/configure.ac
+@@ -201,6 +201,7 @@ esac
+ if [[ "${shared}" = "yes" ]]; then
+ case "${host}" in
+ *-*-cygwin*) ;;
++ aarch64*-*-linux*) PICFLAG=-fPIC ;;
+ alpha*-*-linux*) PICFLAG=-fPIC ;;
+ arm*-*-*) PICFLAG=-fPIC ;;
+ hppa*-*-*) PICFLAG=-fPIC ;;
+--- a/libiberty/configure
++++ b/libiberty/configure
+@@ -4850,6 +4850,7 @@ esac
+ if [ "${shared}" = "yes" ]; then
+ case "${host}" in
+ *-*-cygwin*) ;;
++ aarch64*-*-linux*) PICFLAG=-fPIC ;;
+ alpha*-*-linux*) PICFLAG=-fPIC ;;
+ arm*-*-*) PICFLAG=-fPIC ;;
+ hppa*-*-*) PICFLAG=-fPIC ;;
diff --git a/msp430-gcc.spec b/msp430-gcc.spec
index 30402e6..9cb9f87 100644
--- a/msp430-gcc.spec
+++ b/msp430-gcc.spec
@@ -2,7 +2,7 @@
Name: %{target}-gcc
Version: 4.6.4
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Cross Compiling GNU GCC targeted at %{target}
Group: Development/Languages
License: GPLv2+
@@ -13,6 +13,7 @@ Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-core-%{version}.tar.bz2
# This is actually against 4.6.3, but in order to build we need some fixes
# that are in 4.6.4
Patch0: msp430-gcc-4.6.3-20120406.patch
+Patch1: msp430-gcc-4.6.4-host-aarch64.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
@@ -32,6 +33,7 @@ platform.
%setup -q -c -n msp430-gcc
pushd gcc-%{version}
%patch0 -p1
+%patch1 -p1
popd
# Extract %%__os_install_post into os_install_post~
@@ -98,6 +100,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Thu Jun 26 2014 Yaakov Selkowitz <yselkowi at redhat.com> - 4.6.4-3
+- Fix FTBFS on aarch64 host (#926177)
+
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 4.6.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
More information about the scm-commits
mailing list