All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gcc-cross: fix gfortran -> g77 linking logic
@ 2010-03-29 18:16 Koen Kooi
  2010-03-30  9:24 ` Koen Kooi
  2010-03-30 14:23 ` Tom Rini
  0 siblings, 2 replies; 4+ messages in thread
From: Koen Kooi @ 2010-03-29 18:16 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Koen Kooi

From: Koen Kooi <koen@openembedded.org>

---
 recipes/gcc/gcc-configure-cross.inc |   13 +++++++++++++
 recipes/gcc/gcc-package-cross.inc   |   14 ++++++++------
 2 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/recipes/gcc/gcc-configure-cross.inc b/recipes/gcc/gcc-configure-cross.inc
index 1c37de8..7dde9de 100644
--- a/recipes/gcc/gcc-configure-cross.inc
+++ b/recipes/gcc/gcc-configure-cross.inc
@@ -51,5 +51,18 @@ do_stage_append () {
 		sed -i "s|dependency_libs\s*=\s*.*|dependency_libs='-L${CROSS_DIR}/${TARGET_SYS}/$d ${LIBGCCS_VAR} -lc -lm '|" ${CROSS_DIR}/${TARGET_SYS}/$d/libsupc++.la || true
 		sed -i "s|dependency_libs\s*=\s*.*|dependency_libs='-L${CROSS_DIR}/${TARGET_SYS}/$d ${LIBGCCS_VAR} -lc -lm '|" ${CROSS_DIR}/${TARGET_SYS}/$d/libstdc++.la || true
 	done
+
+    # Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77
+    # gfortran is fully backwards compatible. This is a safe and practical solution.
+    if [ -f ${CROSS_DIR}/bin/${TARGET_PREFIX}gfortran ]; then
+           currdir="$PWD"
+           cd ${CROSS_DIR}/bin/
+           ln -sf ${TARGET_PREFIX}gfortran ${TARGET_PREFIX}g77 || true
+           if [ -d ${CROSS_DIR}/${TARGET_SYS}/bin/ ] ; then 
+               cd ${CROSS_DIR}/${TARGET_SYS}/bin/
+               ln -sf gfortran g77 || true
+           fi
+           cd $currdir
+    fi
 }
 
diff --git a/recipes/gcc/gcc-package-cross.inc b/recipes/gcc/gcc-package-cross.inc
index 6c4f9bb..0f91861 100644
--- a/recipes/gcc/gcc-package-cross.inc
+++ b/recipes/gcc/gcc-package-cross.inc
@@ -63,16 +63,18 @@ do_install () {
                ${TARGET_PREFIX}strip ${D}${target_libdir}/libg2c.so.* || true
                ${TARGET_PREFIX}strip ${D}${target_base_libdir}/libgcc_s.so.* || true
                ${TARGET_PREFIX}strip ${D}${target_libdir}/libgfortran*.so* || true
-	fi
+       fi
      
        # Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77
        # gfortran is fully backwards compatible. This is a safe and practical solution.
-       if [ -f ${CROSS_DIR}/bin/${TARGET_PREFIX}gfortran ]; then
+       if [ -f ${D}${CROSS_DIR}/bin/${TARGET_PREFIX}gfortran ]; then
               currdir="$PWD"
-              cd ${CROSS_DIR}/bin/
+              cd ${D}${CROSS_DIR}/bin/
               ln -sf ${TARGET_PREFIX}gfortran ${TARGET_PREFIX}g77 || true
-              cd ${CROSS_DIR}/${TARGET_SYS}/bin/
-              ln -sf gfortran g77 || true
+              if [ -d ${CROSS_DIR}/${TARGET_SYS}/bin/ ] ; then 
+                  cd ${CROSS_DIR}/${TARGET_SYS}/bin/
+                  ln -sf gfortran g77 || true
+              fi
               cd $currdir
-       fi
+        fi
 }
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] gcc-cross: fix gfortran -> g77 linking logic
  2010-03-29 18:16 [PATCH] gcc-cross: fix gfortran -> g77 linking logic Koen Kooi
@ 2010-03-30  9:24 ` Koen Kooi
  2010-03-30 14:23 ` Tom Rini
  1 sibling, 0 replies; 4+ messages in thread
From: Koen Kooi @ 2010-03-30  9:24 UTC (permalink / raw)
  To: openembedded-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Any comments?

On 29-03-10 20:16, Koen Kooi wrote:
> From: Koen Kooi <koen@openembedded.org>
> 
> ---
>  recipes/gcc/gcc-configure-cross.inc |   13 +++++++++++++
>  recipes/gcc/gcc-package-cross.inc   |   14 ++++++++------
>  2 files changed, 21 insertions(+), 6 deletions(-)
> 
> diff --git a/recipes/gcc/gcc-configure-cross.inc b/recipes/gcc/gcc-configure-cross.inc
> index 1c37de8..7dde9de 100644
> --- a/recipes/gcc/gcc-configure-cross.inc
> +++ b/recipes/gcc/gcc-configure-cross.inc
> @@ -51,5 +51,18 @@ do_stage_append () {
>  		sed -i "s|dependency_libs\s*=\s*.*|dependency_libs='-L${CROSS_DIR}/${TARGET_SYS}/$d ${LIBGCCS_VAR} -lc -lm '|" ${CROSS_DIR}/${TARGET_SYS}/$d/libsupc++.la || true
>  		sed -i "s|dependency_libs\s*=\s*.*|dependency_libs='-L${CROSS_DIR}/${TARGET_SYS}/$d ${LIBGCCS_VAR} -lc -lm '|" ${CROSS_DIR}/${TARGET_SYS}/$d/libstdc++.la || true
>  	done
> +
> +    # Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77
> +    # gfortran is fully backwards compatible. This is a safe and practical solution.
> +    if [ -f ${CROSS_DIR}/bin/${TARGET_PREFIX}gfortran ]; then
> +           currdir="$PWD"
> +           cd ${CROSS_DIR}/bin/
> +           ln -sf ${TARGET_PREFIX}gfortran ${TARGET_PREFIX}g77 || true
> +           if [ -d ${CROSS_DIR}/${TARGET_SYS}/bin/ ] ; then 
> +               cd ${CROSS_DIR}/${TARGET_SYS}/bin/
> +               ln -sf gfortran g77 || true
> +           fi
> +           cd $currdir
> +    fi
>  }
>  
> diff --git a/recipes/gcc/gcc-package-cross.inc b/recipes/gcc/gcc-package-cross.inc
> index 6c4f9bb..0f91861 100644
> --- a/recipes/gcc/gcc-package-cross.inc
> +++ b/recipes/gcc/gcc-package-cross.inc
> @@ -63,16 +63,18 @@ do_install () {
>                 ${TARGET_PREFIX}strip ${D}${target_libdir}/libg2c.so.* || true
>                 ${TARGET_PREFIX}strip ${D}${target_base_libdir}/libgcc_s.so.* || true
>                 ${TARGET_PREFIX}strip ${D}${target_libdir}/libgfortran*.so* || true
> -	fi
> +       fi
>       
>         # Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77
>         # gfortran is fully backwards compatible. This is a safe and practical solution.
> -       if [ -f ${CROSS_DIR}/bin/${TARGET_PREFIX}gfortran ]; then
> +       if [ -f ${D}${CROSS_DIR}/bin/${TARGET_PREFIX}gfortran ]; then
>                currdir="$PWD"
> -              cd ${CROSS_DIR}/bin/
> +              cd ${D}${CROSS_DIR}/bin/
>                ln -sf ${TARGET_PREFIX}gfortran ${TARGET_PREFIX}g77 || true
> -              cd ${CROSS_DIR}/${TARGET_SYS}/bin/
> -              ln -sf gfortran g77 || true
> +              if [ -d ${CROSS_DIR}/${TARGET_SYS}/bin/ ] ; then 
> +                  cd ${CROSS_DIR}/${TARGET_SYS}/bin/
> +                  ln -sf gfortran g77 || true
> +              fi
>                cd $currdir
> -       fi
> +        fi
>  }

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFLscNFMkyGM64RGpERAvzdAJ9ThKJilQssdNmTWBacsGLO8gWWEACfXusn
P57vKbezse7N9wjUTjI++JY=
=Jn6k
-----END PGP SIGNATURE-----




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gcc-cross: fix gfortran -> g77 linking logic
  2010-03-29 18:16 [PATCH] gcc-cross: fix gfortran -> g77 linking logic Koen Kooi
  2010-03-30  9:24 ` Koen Kooi
@ 2010-03-30 14:23 ` Tom Rini
  2010-03-30 17:47   ` Khem Raj
  1 sibling, 1 reply; 4+ messages in thread
From: Tom Rini @ 2010-03-30 14:23 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Koen Kooi

On Mon, 2010-03-29 at 20:16 +0200, Koen Kooi wrote:
> From: Koen Kooi <koen@openembedded.org>

Acked-by: Tom Rini <tom_rini@mentor.com>

> 
> ---
>  recipes/gcc/gcc-configure-cross.inc |   13 +++++++++++++
>  recipes/gcc/gcc-package-cross.inc   |   14 ++++++++------
>  2 files changed, 21 insertions(+), 6 deletions(-)
> 
> diff --git a/recipes/gcc/gcc-configure-cross.inc b/recipes/gcc/gcc-configure-cross.inc
> index 1c37de8..7dde9de 100644
> --- a/recipes/gcc/gcc-configure-cross.inc
> +++ b/recipes/gcc/gcc-configure-cross.inc
> @@ -51,5 +51,18 @@ do_stage_append () {
>  		sed -i "s|dependency_libs\s*=\s*.*|dependency_libs='-L${CROSS_DIR}/${TARGET_SYS}/$d ${LIBGCCS_VAR} -lc -lm '|" ${CROSS_DIR}/${TARGET_SYS}/$d/libsupc++.la || true
>  		sed -i "s|dependency_libs\s*=\s*.*|dependency_libs='-L${CROSS_DIR}/${TARGET_SYS}/$d ${LIBGCCS_VAR} -lc -lm '|" ${CROSS_DIR}/${TARGET_SYS}/$d/libstdc++.la || true
>  	done
> +
> +    # Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77
> +    # gfortran is fully backwards compatible. This is a safe and practical solution.
> +    if [ -f ${CROSS_DIR}/bin/${TARGET_PREFIX}gfortran ]; then
> +           currdir="$PWD"
> +           cd ${CROSS_DIR}/bin/
> +           ln -sf ${TARGET_PREFIX}gfortran ${TARGET_PREFIX}g77 || true
> +           if [ -d ${CROSS_DIR}/${TARGET_SYS}/bin/ ] ; then 
> +               cd ${CROSS_DIR}/${TARGET_SYS}/bin/
> +               ln -sf gfortran g77 || true
> +           fi
> +           cd $currdir
> +    fi
>  }
>  
> diff --git a/recipes/gcc/gcc-package-cross.inc b/recipes/gcc/gcc-package-cross.inc
> index 6c4f9bb..0f91861 100644
> --- a/recipes/gcc/gcc-package-cross.inc
> +++ b/recipes/gcc/gcc-package-cross.inc
> @@ -63,16 +63,18 @@ do_install () {
>                 ${TARGET_PREFIX}strip ${D}${target_libdir}/libg2c.so.* || true
>                 ${TARGET_PREFIX}strip ${D}${target_base_libdir}/libgcc_s.so.* || true
>                 ${TARGET_PREFIX}strip ${D}${target_libdir}/libgfortran*.so* || true
> -	fi
> +       fi
>       
>         # Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77
>         # gfortran is fully backwards compatible. This is a safe and practical solution.
> -       if [ -f ${CROSS_DIR}/bin/${TARGET_PREFIX}gfortran ]; then
> +       if [ -f ${D}${CROSS_DIR}/bin/${TARGET_PREFIX}gfortran ]; then
>                currdir="$PWD"
> -              cd ${CROSS_DIR}/bin/
> +              cd ${D}${CROSS_DIR}/bin/
>                ln -sf ${TARGET_PREFIX}gfortran ${TARGET_PREFIX}g77 || true
> -              cd ${CROSS_DIR}/${TARGET_SYS}/bin/
> -              ln -sf gfortran g77 || true
> +              if [ -d ${CROSS_DIR}/${TARGET_SYS}/bin/ ] ; then 
> +                  cd ${CROSS_DIR}/${TARGET_SYS}/bin/
> +                  ln -sf gfortran g77 || true
> +              fi
>                cd $currdir
> -       fi
> +        fi
>  }


-- 
Tom Rini <tom_rini@mentor.com>
Mentor Graphics Corporation



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gcc-cross: fix gfortran -> g77 linking logic
  2010-03-30 14:23 ` Tom Rini
@ 2010-03-30 17:47   ` Khem Raj
  0 siblings, 0 replies; 4+ messages in thread
From: Khem Raj @ 2010-03-30 17:47 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Koen Kooi

On Tue, Mar 30, 2010 at 7:23 AM, Tom Rini <tom_rini@mentor.com> wrote:
> On Mon, 2010-03-29 at 20:16 +0200, Koen Kooi wrote:
>> From: Koen Kooi <koen@openembedded.org>
>
> Acked-by: Tom Rini <tom_rini@mentor.com>

Looks good.

 Acked-by: Khem Raj <raj.khem@gmail.com>

>
>>
>> ---
>>  recipes/gcc/gcc-configure-cross.inc |   13 +++++++++++++
>>  recipes/gcc/gcc-package-cross.inc   |   14 ++++++++------
>>  2 files changed, 21 insertions(+), 6 deletions(-)
>>
>> diff --git a/recipes/gcc/gcc-configure-cross.inc b/recipes/gcc/gcc-configure-cross.inc
>> index 1c37de8..7dde9de 100644
>> --- a/recipes/gcc/gcc-configure-cross.inc
>> +++ b/recipes/gcc/gcc-configure-cross.inc
>> @@ -51,5 +51,18 @@ do_stage_append () {
>>               sed -i "s|dependency_libs\s*=\s*.*|dependency_libs='-L${CROSS_DIR}/${TARGET_SYS}/$d ${LIBGCCS_VAR} -lc -lm '|" ${CROSS_DIR}/${TARGET_SYS}/$d/libsupc++.la || true
>>               sed -i "s|dependency_libs\s*=\s*.*|dependency_libs='-L${CROSS_DIR}/${TARGET_SYS}/$d ${LIBGCCS_VAR} -lc -lm '|" ${CROSS_DIR}/${TARGET_SYS}/$d/libstdc++.la || true
>>       done
>> +
>> +    # Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77
>> +    # gfortran is fully backwards compatible. This is a safe and practical solution.
>> +    if [ -f ${CROSS_DIR}/bin/${TARGET_PREFIX}gfortran ]; then
>> +           currdir="$PWD"
>> +           cd ${CROSS_DIR}/bin/
>> +           ln -sf ${TARGET_PREFIX}gfortran ${TARGET_PREFIX}g77 || true
>> +           if [ -d ${CROSS_DIR}/${TARGET_SYS}/bin/ ] ; then
>> +               cd ${CROSS_DIR}/${TARGET_SYS}/bin/
>> +               ln -sf gfortran g77 || true
>> +           fi
>> +           cd $currdir
>> +    fi
>>  }
>>
>> diff --git a/recipes/gcc/gcc-package-cross.inc b/recipes/gcc/gcc-package-cross.inc
>> index 6c4f9bb..0f91861 100644
>> --- a/recipes/gcc/gcc-package-cross.inc
>> +++ b/recipes/gcc/gcc-package-cross.inc
>> @@ -63,16 +63,18 @@ do_install () {
>>                 ${TARGET_PREFIX}strip ${D}${target_libdir}/libg2c.so.* || true
>>                 ${TARGET_PREFIX}strip ${D}${target_base_libdir}/libgcc_s.so.* || true
>>                 ${TARGET_PREFIX}strip ${D}${target_libdir}/libgfortran*.so* || true
>> -     fi
>> +       fi
>>
>>         # Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77
>>         # gfortran is fully backwards compatible. This is a safe and practical solution.
>> -       if [ -f ${CROSS_DIR}/bin/${TARGET_PREFIX}gfortran ]; then
>> +       if [ -f ${D}${CROSS_DIR}/bin/${TARGET_PREFIX}gfortran ]; then
>>                currdir="$PWD"
>> -              cd ${CROSS_DIR}/bin/
>> +              cd ${D}${CROSS_DIR}/bin/
>>                ln -sf ${TARGET_PREFIX}gfortran ${TARGET_PREFIX}g77 || true
>> -              cd ${CROSS_DIR}/${TARGET_SYS}/bin/
>> -              ln -sf gfortran g77 || true
>> +              if [ -d ${CROSS_DIR}/${TARGET_SYS}/bin/ ] ; then
>> +                  cd ${CROSS_DIR}/${TARGET_SYS}/bin/
>> +                  ln -sf gfortran g77 || true
>> +              fi
>>                cd $currdir
>> -       fi
>> +        fi
>>  }
>
>
> --
> Tom Rini <tom_rini@mentor.com>
> Mentor Graphics Corporation
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-03-30 17:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-29 18:16 [PATCH] gcc-cross: fix gfortran -> g77 linking logic Koen Kooi
2010-03-30  9:24 ` Koen Kooi
2010-03-30 14:23 ` Tom Rini
2010-03-30 17:47   ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.