[oe-commits] org.oe.dev packages/gcc/gcc-cross_4.2.2: Attempt to fix the fortran issue

freyther commit openembedded-commits at lists.openembedded.org
Wed Jan 16 08:53:07 UTC 2008


packages/gcc/gcc-cross_4.2.2: Attempt to fix the fortran issue
    f951 was not executable because libmpfr and libgmp which were build by
    OpenEmbedded were not found. They resist in the staging lib directory and
    we do not have the LD_LIBRARY_PATH set.
    --enable-rpath for gcc was not an option, as we would have difficulties to
    say which path would be checked (we install to cross and not staging).
    Attempt to set an rpath when linking to mpfr/gmp. We pass --with-mpfr to the
    gcc-cross, patch the configure to add an -Wl,-rpath, to gmplibs, this gets
    set to GMPLIBS, which gets replaced to HOST_GMPLIBS in the Makefile inside the
    builddir, which will be used when linking the f951 utility.

Author: freyther at openembedded.org
Branch: org.openembedded.dev
Revision: c0856cf5b6ece74a7274429e466e6b5c3672ab1d
ViewMTN: http://monotone.openembedded.org/revision/info/c0856cf5b6ece74a7274429e466e6b5c3672ab1d
Files:
1
packages/gcc/gcc-4.2.2/fortran-libs-rpath-to-staging-hack.patch
packages/gcc/gcc-cross_4.2.2.bb
Diffs:

#
# mt diff -r7942b108b076b6808384f7579f66856e88850fdb -rc0856cf5b6ece74a7274429e466e6b5c3672ab1d
#
# 
# 
# add_file "packages/gcc/gcc-4.2.2/fortran-libs-rpath-to-staging-hack.patch"
#  content [96ee0c885c5757fde97f61188ec0c799ae5c7b18]
# 
# patch "packages/gcc/gcc-cross_4.2.2.bb"
#  from [db2829fa431c6b82c542cae426ddc639e77aa4db]
#    to [e477bab4feaed059762204e290267f58403bede7]
# 
============================================================
--- packages/gcc/gcc-4.2.2/fortran-libs-rpath-to-staging-hack.patch	96ee0c885c5757fde97f61188ec0c799ae5c7b18
+++ packages/gcc/gcc-4.2.2/fortran-libs-rpath-to-staging-hack.patch	96ee0c885c5757fde97f61188ec0c799ae5c7b18
@@ -0,0 +1,48 @@
+f951 (fortran) links to MPFR and GMP of our staging area but when executing
+the command the libs can not be found. Use rpath like all the other apps in
+our staging bin/ directory.
+
+Patch the configure to avoid the regeneration...
+
+Index: gcc-4.2.2/configure
+===================================================================
+--- gcc-4.2.2.orig/configure	2008-01-15 23:23:41.000000000 +0100
++++ gcc-4.2.2/configure	2008-01-15 23:25:20.000000000 +0100
+@@ -2278,14 +2278,14 @@
+ 
+ 
+ if test "x$with_mpfr" != x; then
+-  gmplibs="-L$with_mpfr/lib $gmplibs"
++  gmplibs="-Wl,-rpath,$with_mpfr/lib -L$with_mpfr/lib $gmplibs"
+   gmpinc="-I$with_mpfr/include"
+ fi
+ if test "x$with_mpfr_include" != x; then
+   gmpinc="-I$with_mpfr_include"
+ 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"
+ fi
+ 
+ # Specify a location for gmp
+Index: gcc-4.2.2/configure.in
+===================================================================
+--- gcc-4.2.2.orig/configure.in	2008-01-15 23:23:41.000000000 +0100
++++ gcc-4.2.2/configure.in	2008-01-15 23:24:36.000000000 +0100
+@@ -1066,14 +1066,14 @@
+ AC_ARG_WITH(mpfr_lib, [  --with-mpfr-lib=PATH    Specify the directory for the installed MPFR library])
+ 
+ if test "x$with_mpfr" != x; then
+-  gmplibs="-L$with_mpfr/lib $gmplibs"
++  gmplibs="-Wl,-rpath,$with_mpfr/lib -L$with_mpfr/lib $gmplibs"
+   gmpinc="-I$with_mpfr/include"
+ fi
+ if test "x$with_mpfr_include" != x; then
+   gmpinc="-I$with_mpfr_include"
+ 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"
+ fi
+ 
+ # Specify a location for gmp
============================================================
--- packages/gcc/gcc-cross_4.2.2.bb	db2829fa431c6b82c542cae426ddc639e77aa4db
+++ packages/gcc/gcc-cross_4.2.2.bb	e477bab4feaed059762204e290267f58403bede7
@@ -15,6 +15,7 @@ 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 \






More information about the Openembedded-commits mailing list