[oe-commits] org.oe.dev gcc(-cross): enable fortran for arm/EABI, thanks to Alain for showing and testing the patch
koen commit
openembedded-commits at lists.openembedded.org
Wed Sep 19 10:01:19 UTC 2007
gcc(-cross): enable fortran for arm/EABI, thanks to Alain for showing and testing the patch
Author: koen at openembedded.org
Branch: org.openembedded.dev
Revision: bac543c4612d852bbed6209100ed1a521881f0cf
ViewMTN: http://monotone.openembedded.org/revision/info/bac543c4612d852bbed6209100ed1a521881f0cf
Files:
1
packages/gcc/files
packages/gcc/files/gfortran.patch
packages/gcc/gcc-cross_4.1.2.bb
packages/gcc/gcc-cross_4.2.1.bb
packages/gcc/gcc_4.1.2.bb
packages/gcc/gcc_4.2.1.bb
Diffs:
#
# mt diff -r088e148a7a64b7c3edc061b69814f03daf526a94 -rbac543c4612d852bbed6209100ed1a521881f0cf
#
#
#
# add_dir "packages/gcc/files"
#
# add_file "packages/gcc/files/gfortran.patch"
# content [b050220a6851cf1b7525b48eba3fc64209d7c89c]
#
# patch "packages/gcc/gcc-cross_4.1.2.bb"
# from [e32d37ba80f15300c2db6d0edcc1ede5e4b98c2a]
# to [36019aa250fcf94fb16c8f3adab162249c9d8053]
#
# patch "packages/gcc/gcc-cross_4.2.1.bb"
# from [7c1b83bd533cc9f0be3ff22dfc2f2f421a61b51d]
# to [be2f2c53bbd220132778e60f9e959c8e95466e72]
#
# patch "packages/gcc/gcc_4.1.2.bb"
# from [31103053e64980e6cc2b3a95ec488a95571ad557]
# to [9898246aa60cafd67aec15702e2857dd9a13c54e]
#
# patch "packages/gcc/gcc_4.2.1.bb"
# from [75d1f330d3edd4d9ef0c6477866c817ffddf9f14]
# to [cf5a7ff85d01add9d5ee5a5f6fc4db5df067224e]
#
============================================================
--- packages/gcc/files/gfortran.patch b050220a6851cf1b7525b48eba3fc64209d7c89c
+++ packages/gcc/files/gfortran.patch b050220a6851cf1b7525b48eba3fc64209d7c89c
@@ -0,0 +1,40 @@
+The patch below fixes a crash building libgfortran on arm-linux-gnueabi.
+
+This target doesn't really have a 128-bit integer type, however it does use
+TImode to represent the return value of certain special ABI defined library
+functions. This results in type_for_size(TImode) being called.
+
+Because TImode deosn't correspond to any gfortran integer kind
+gfc_type_for_size returns NULL and we segfault shortly after.
+
+The patch below fixes this by making gfc_type_for_size handle TImode in the
+same way as the C frontend.
+
+Tested on x86_64-linux and arm-linux-gnueabi.
+Applied to trunk.
+
+Paul
+
+2007-05-15 Paul Brook <paul at codesourcery.com>
+
+ gcc/fortran/
+ * trans-types.c (gfc_type_for_size): Handle signed TImode.
+
+Index: gcc-4.2.1/gcc/fortran/trans-types.c
+===================================================================
+--- gcc-4.2.1/gcc/fortran/trans-types.c (revision 170435)
++++ gcc-4.2.1/gcc/fortran/trans-types.c (working copy)
+@@ -1800,6 +1800,13 @@ gfc_type_for_size (unsigned bits, int un
+ if (type && bits == TYPE_PRECISION (type))
+ return type;
+ }
++
++ /* Handle TImode as a special case because it is used by some backends
++ (eg. ARM) even though it is not available for normal use. */
++#if HOST_BITS_PER_WIDE_INT >= 64
++ if (bits == TYPE_PRECISION (intTI_type_node))
++ return intTI_type_node;
++#endif
+ }
+ else
+ {
============================================================
--- packages/gcc/gcc-cross_4.1.2.bb e32d37ba80f15300c2db6d0edcc1ede5e4b98c2a
+++ packages/gcc/gcc-cross_4.1.2.bb 36019aa250fcf94fb16c8f3adab162249c9d8053
@@ -5,7 +5,7 @@ FILESDIR = "${@os.path.dirname(bb.data.g
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
# NOTE: split PR. If the main .oe changes something that affects its *build*
# remember to increment this one too.
-PR = "r6"
+PR = "r7"
DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc gmp-native mpfr-native"
PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
============================================================
--- packages/gcc/gcc-cross_4.2.1.bb 7c1b83bd533cc9f0be3ff22dfc2f2f421a61b51d
+++ packages/gcc/gcc-cross_4.2.1.bb be2f2c53bbd220132778e60f9e959c8e95466e72
@@ -5,7 +5,7 @@ FILESDIR = "${@os.path.dirname(bb.data.g
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
# NOTE: split PR. If the main .oe changes something that affects its *build*
# remember to increment this one too.
-PR = "r4"
+PR = "r5"
DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc gmp-native mpfr-native"
PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
============================================================
--- packages/gcc/gcc_4.1.2.bb 31103053e64980e6cc2b3a95ec488a95571ad557
+++ packages/gcc/gcc_4.1.2.bb 9898246aa60cafd67aec15702e2857dd9a13c54e
@@ -1,4 +1,4 @@
-PR = "r5"
+PR = "r6"
DESCRIPTION = "The GNU cc and gcc C compilers."
HOMEPAGE = "http://www.gnu.org/software/gcc/"
SECTION = "devel"
@@ -30,20 +30,24 @@ SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc
file://unbreak-armv4t.patch;patch=1 \
file://fix-ICE-in-arm_unwind_emit_set.diff;patch=1 \
file://cache-amnesia.patch;patch=1 \
- "
+ file://gfortran.patch;patch=1 \
+ "
SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 "
#Set the fortran bits
-# 'fortran' or '', not 'f77' like gcc3 had
+# ',fortran' or '', not 'f77' like gcc3 had
FORTRAN = ""
+FORTRAN_linux-gnueabi = ",fortran"
HAS_GFORTRAN = "no"
-HAS_G2C = "no"
+HAS_GFORTRAN_linux-gnueabi = "yes"
+HAS_G2C = "yes"
#Set the java bits
+JAVA = ""
JAVA_arm = ""
-JAVA = ""
+
LANGUAGES = "c,c++${FORTRAN}${JAVA}"
require gcc3-build.inc
ARCH_FLAGS_FOR_TARGET=-isystem${STAGING_INCDIR}
============================================================
--- packages/gcc/gcc_4.2.1.bb 75d1f330d3edd4d9ef0c6477866c817ffddf9f14
+++ packages/gcc/gcc_4.2.1.bb cf5a7ff85d01add9d5ee5a5f6fc4db5df067224e
@@ -1,4 +1,4 @@
-PR = "r3"
+PR = "r4"
DESCRIPTION = "The GNU cc and gcc C compilers."
HOMEPAGE = "http://www.gnu.org/software/gcc/"
SECTION = "devel"
@@ -55,19 +55,22 @@ SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc
file://arm-crunch-truncsi-disable.patch;patch=1 \
file://arm-crunch-cfcvt64-disable.patch;patch=1 \
file://arm-crunch-cirrus-bugfixes.patch;patch=1 \
- "
+ file://gfortran.patch;patch=1 \
+ "
SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 "
#Set the fortran bits
-# 'fortran' or '', not 'f77' like gcc3 had
+# 'i,fortran' or '', not 'f77' like gcc3 had
FORTRAN = ""
+FORTRAN_linux-gnueabi = ",fortran"
HAS_GFORTRAN = "no"
-HAS_G2C = "no"
+HAS_GFORTRAN_linux-gnueabi = "yes"
+HAS_G2C = "yes"
#Set the java bits
+JAVA = ""
JAVA_arm = ""
-JAVA = ""
LANGUAGES = "c,c++${FORTRAN}${JAVA}"
require gcc3-build.inc
More information about the Openembedded-commits
mailing list