[oe-commits] org.oe.dev * Use static linking for mpfr/gmp instead of the rpath. This avoid the layering
freyther commit
openembedded-commits at lists.openembedded.org
Thu Jan 17 14:12:13 UTC 2008
* Use static linking for mpfr/gmp instead of the rpath. This avoid the layering
violation and makes sure that gcc-cross-sdk will build as well.
* For gcc4.3 we need to look at the gmp/mpfr again as they will be required for
everything and not just gfortran
* Apply a patch to gcc_4.2.2 but only if we want to build gcc. We want to be able
to use arm-angstrom-linux-gnueabi-gfortran and the GF="$(GFORTRAN)" would have set
the fortran to 'gfortran' and we ended up with a build error. Some more experiments
with GFORTRAN_FOR_TARGET are needed.
Author: freyther at openembedded.org
Branch: org.openembedded.dev
Revision: 937e098c88f41af274b6cb04f049439e168d15b9
ViewMTN: http://monotone.openembedded.org/revision/info/937e098c88f41af274b6cb04f049439e168d15b9
Files:
1
packages/gcc/gcc-4.2.2/fortran-libs-rpath-to-staging-hack.patch
packages/gcc/gcc-4.2.2/fortran-static-linking.patch
packages/gcc/gcc-4.2.2/fortran-cross-compile-hack.patch
packages/gcc/gcc-cross-sdk_4.2.2.bb
packages/gcc/gcc-cross_4.2.2.bb
packages/gcc/gcc_4.2.2.bb
Diffs:
#
# mt diff -r65fbfb9dd8770a45ce93446888e70c955e6b11d1 -r937e098c88f41af274b6cb04f049439e168d15b9
#
#
#
# rename "packages/gcc/gcc-4.2.2/fortran-libs-rpath-to-staging-hack.patch"
# to "packages/gcc/gcc-4.2.2/fortran-static-linking.patch"
#
# add_file "packages/gcc/gcc-4.2.2/fortran-cross-compile-hack.patch"
# content [544859e05e08d2a0b5639e1182a8a2a4ef114d07]
#
# patch "packages/gcc/gcc-4.2.2/fortran-static-linking.patch"
# from [96ee0c885c5757fde97f61188ec0c799ae5c7b18]
# to [e51538f27d036e3418faae17b7dcd656ae38313a]
#
# patch "packages/gcc/gcc-cross-sdk_4.2.2.bb"
# from [8ef30993fffbbd19108406cd37d0b36449e5143d]
# to [c51f994c61ce378fb2761f8e6d0cc77071b8dcfe]
#
# patch "packages/gcc/gcc-cross_4.2.2.bb"
# from [bd6eaf9021e129dcbd70794a3e80ac820d764246]
# to [638f8a17318b6c935909d7b7f11cc6506e57d6af]
#
# patch "packages/gcc/gcc_4.2.2.bb"
# from [6bcef9ceeb471bcf1d54c4ae08e78e9b80d6a44c]
# to [b649640ada6aa7b3be9155792213ea7689d6e6ac]
#
============================================================
--- packages/gcc/gcc-4.2.2/fortran-cross-compile-hack.patch 544859e05e08d2a0b5639e1182a8a2a4ef114d07
+++ packages/gcc/gcc-4.2.2/fortran-cross-compile-hack.patch 544859e05e08d2a0b5639e1182a8a2a4ef114d07
@@ -0,0 +1,30 @@
+* Fortran would have searched for arm-angstrom-gnueabi-gfortran but would have used
+ used gfortan. For gcc_4.2.2.bb we want to use the gfortran compiler from our cross
+ directory.
+
+diff --git a/libgfortran/configure b/libgfortran/configure
+index f7d86fb..d0966ec 100755
+--- a/libgfortran/configure
++++ b/libgfortran/configure
+@@ -4475,6 +4475,6 @@ exec 5>>./config.log
+
+ # We need gfortran to compile parts of the library
+ #AC_PROG_FC(gfortran)
+-FC="$GFORTRAN"
++#FC="$GFORTRAN"
+ ac_ext=${FC_SRCEXT-f}
+ ac_compile='$FC -c $FCFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext >&5'
+\ No newline at end of file
+diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac
+index 4661306..9f83e55 100644
+--- a/libgfortran/configure.ac
++++ b/libgfortran/configure.ac
+@@ -140,7 +140,7 @@ AC_SUBST(enable_static)
+
+ # We need gfortran to compile parts of the library
+ #AC_PROG_FC(gfortran)
+-FC="$GFORTRAN"
++#FC="$GFORTRAN"
+ AC_PROG_FC(gfortran)
+
+ # extra LD Flags which are required for targets
============================================================
--- packages/gcc/gcc-4.2.2/fortran-libs-rpath-to-staging-hack.patch 96ee0c885c5757fde97f61188ec0c799ae5c7b18
+++ packages/gcc/gcc-4.2.2/fortran-static-linking.patch e51538f27d036e3418faae17b7dcd656ae38313a
@@ -13,7 +13,7 @@ Index: gcc-4.2.2/configure
if test "x$with_mpfr" != x; then
- gmplibs="-L$with_mpfr/lib $gmplibs"
-+ gmplibs="-Wl,-rpath,$with_mpfr/lib -L$with_mpfr/lib $gmplibs"
++ gmplibs="-static -L$with_mpfr/lib $gmplibs"
gmpinc="-I$with_mpfr/include"
fi
if test "x$with_mpfr_include" != x; then
@@ -21,7 +21,7 @@ Index: gcc-4.2.2/configure
fi
if test "x$with_mpfr_lib" != x; then
- gmplibs="-L$with_mpfr_lib $gmplibs"
-+ gmplibs="-Wl,-rpath,$with_mpfr_lib -L$with_mpfr_lib $gmplibs"
++ gmplibs="-static -L$with_mpfr_lib $gmplibs"
fi
# Specify a location for gmp
@@ -34,7 +34,7 @@ Index: gcc-4.2.2/configure.in
if test "x$with_mpfr" != x; then
- gmplibs="-L$with_mpfr/lib $gmplibs"
-+ gmplibs="-Wl,-rpath,$with_mpfr/lib -L$with_mpfr/lib $gmplibs"
++ gmplibs="-static -L$with_mpfr/lib $gmplibs"
gmpinc="-I$with_mpfr/include"
fi
if test "x$with_mpfr_include" != x; then
@@ -42,7 +42,7 @@ Index: gcc-4.2.2/configure.in
fi
if test "x$with_mpfr_lib" != x; then
- gmplibs="-L$with_mpfr_lib $gmplibs"
-+ gmplibs="-Wl,-rpath,$with_mpfr_lib -L$with_mpfr_lib $gmplibs"
++ gmplibs="-static -L$with_mpfr_lib $gmplibs"
fi
# Specify a location for gmp
============================================================
--- packages/gcc/gcc-cross-sdk_4.2.2.bb 8ef30993fffbbd19108406cd37d0b36449e5143d
+++ packages/gcc/gcc-cross-sdk_4.2.2.bb c51f994c61ce378fb2761f8e6d0cc77071b8dcfe
@@ -8,9 +8,14 @@ FILESDIR = "${@os.path.dirname(bb.data.g
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
-DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc mpfr"
PACKAGES = "${PN}"
require gcc_${PV}.bb
require gcc4-build-sdk.inc
require gcc-package-sdk.inc
+
+DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc gmp-native mpfr-native"
+
+EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \
+ --disable-libgomp --disable-libmudflap \
+ --with-mpfr=${STAGING_DIR_NATIVE}${layout_exec_prefix}"
============================================================
--- packages/gcc/gcc-cross_4.2.2.bb bd6eaf9021e129dcbd70794a3e80ac820d764246
+++ packages/gcc/gcc-cross_4.2.2.bb 638f8a17318b6c935909d7b7f11cc6506e57d6af
@@ -15,7 +15,6 @@ SRC_URI_append_fail-fast = " file://zeck
# cross packaging
require gcc-package-cross.inc
SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
-SRC_URI_append = " file://fortran-libs-rpath-to-staging-hack.patch;patch=1 "
# Do not build libssp libmudflap and libgomp
# We might need them for some beefy targets
EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \
============================================================
--- packages/gcc/gcc_4.2.2.bb 6bcef9ceeb471bcf1d54c4ae08e78e9b80d6a44c
+++ packages/gcc/gcc_4.2.2.bb b649640ada6aa7b3be9155792213ea7689d6e6ac
@@ -41,6 +41,7 @@ SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc
file://gfortran.patch;patch=1 \
file://gcc-4.0.2-e300c2c3.patch;patch=1 \
file://pr34130.patch;patch=1 \
+ file://fortran-static-linking.patch;patch=1 \
"
SRC_URI_append_ep93xx = " \
@@ -72,6 +73,8 @@ FORTRAN_linux-gnueabi = ",fortran"
FORTRAN = ""
FORTRAN_linux-gnueabi = ",fortran"
+DEPENDS += " gmp mpfr "
+
#Set the java bits
JAVA = ""
JAVA_arm = ""
@@ -83,3 +86,9 @@ EXTRA_OECONF += " --disable-libssp --dis
EXTRA_OECONF += " --disable-libssp --disable-bootstrap "
+# We know some one is including us, but we only want to apply this fortran hack for the real gcc
+python __anonymous () {
+ import bb
+ if bb.data.getVar('PN', d, True) == "gcc":
+ bb.data.setVar('SRC_URI_append', ' file://fortran-cross-compile-hack.patch;patch=1', d)
+}
More information about the Openembedded-commits
mailing list