Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Saul Wold <sgw@linux.intel.com>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] guile: fix compilation on MIPS/PPC
Date: Thu, 21 Jun 2012 09:31:50 -0700	[thread overview]
Message-ID: <4FE34C76.4010303@linux.intel.com> (raw)
In-Reply-To: <1340278793-24590-1-git-send-email-bogdan.a.marinescu@intel.com>

On 06/21/2012 04:39 AM, Bogdan Marinescu wrote:
> This commit fixes the guile compilation segfault on MIPS/PPC.
> Tested by compiling guile with MACHINE=qemumips.
>
> [Yocto #2478]
>
> Signed-off-by: Bogdan Marinescu<bogdan.a.marinescu@intel.com>
> ---
>   .../guile_2.0.5_disable_goops_optimizations.patch  |   32 +++++++++++++
>   .../files/guile_2.0.5_fix_cross_compilation.patch  |   47 ++++++++++++++++++++
>   meta/recipes-devtools/guile/guile_2.0.5.bb         |    4 +-
>   3 files changed, 82 insertions(+), 1 deletion(-)
>   create mode 100644 meta/recipes-devtools/guile/files/guile_2.0.5_disable_goops_optimizations.patch
>   create mode 100644 meta/recipes-devtools/guile/files/guile_2.0.5_fix_cross_compilation.patch
>
> diff --git a/meta/recipes-devtools/guile/files/guile_2.0.5_disable_goops_optimizations.patch b/meta/recipes-devtools/guile/files/guile_2.0.5_disable_goops_optimizations.patch
> new file mode 100644
> index 0000000..8609775
> --- /dev/null
> +++ b/meta/recipes-devtools/guile/files/guile_2.0.5_disable_goops_optimizations.patch
> @@ -0,0 +1,32 @@
> +commit f7d8efc630ce45f5d82aae5b2682d261e5541d5f
> +Author: Andy Wingo<wingo@pobox.com>
> +Date:   Sun Apr 15 13:00:30 2012 -0700
> +
> +    disable optimizations in goops dispatch procedures
> +
> +    * module/oop/goops/dispatch.scm: Disable peval and cse.
> +
> +Upstream-Status: Backported
> +
> +diff --git a/module/oop/goops/dispatch.scm b/module/oop/goops/dispatch.scm
> +index e433b86..b12ab15 100644
> +--- a/module/oop/goops/dispatch.scm
> ++++ b/module/oop/goops/dispatch.scm
> +@@ -1,4 +1,4 @@
> +-;;;; 	Copyright (C) 1999, 2000, 2001, 2003, 2006, 2009 Free Software Foundation, Inc.
> ++;;;;   Copyright (C) 1999, 2000, 2001, 2003, 2006, 2009, 2012 Free Software Foundation, Inc.
> + ;;;;
> + ;;;; This library is free software; you can redistribute it and/or
> + ;;;; modify it under the terms of the GNU Lesser General Public
> +@@ -178,7 +178,9 @@
> +                      '())
> +                  (acons gf gf-sym '()))))
> +   (define (comp exp vals)
> +-    (let ((p ((@ (system base compile) compile) exp #:env *dispatch-module*)))
> ++    (let ((p ((@ (system base compile) compile) exp
> ++              #:env *dispatch-module*
> ++              #:opts '(#:partial-eval? #f #:cse? #f))))
> +       (apply p vals)))
> +
> +   ;; kick it.
> +
> diff --git a/meta/recipes-devtools/guile/files/guile_2.0.5_fix_cross_compilation.patch b/meta/recipes-devtools/guile/files/guile_2.0.5_fix_cross_compilation.patch
> new file mode 100644
> index 0000000..b81f02e
> --- /dev/null
> +++ b/meta/recipes-devtools/guile/files/guile_2.0.5_fix_cross_compilation.patch
> @@ -0,0 +1,47 @@
> +commit f3b312a19d70293d7a3407fc4ef479183edd7cca
> +Author: Ludovic Courtès<ludo@gnu.org>
> +Date:   Wed Jun 20 01:11:44 2012 +0200
> +
> +    Fix cross-compilation of GOOPS-using code.
> +
> +    Fixes<http://bugs.gnu.org/11645>.
> +    Reported by Bogdan A. Marinescu<bogdan.a.marinescu@intel.com>.
> +
> +    * module/oop/goops/dispatch.scm (compute-dispatch-procedure)[comp]:
> +      Wrap `compile' call in (with-target %host-type ...).
> +
> +Upstream-Status: Backported
> +
> +diff --git a/module/oop/goops/dispatch.scm b/module/oop/goops/dispatch.scm
> +index b12ab15..de5359f 100644
> +--- a/module/oop/goops/dispatch.scm
> ++++ b/module/oop/goops/dispatch.scm
> +@@ -25,6 +25,7 @@
> +   #:use-module (oop goops)
> +   #:use-module (oop goops util)
> +   #:use-module (oop goops compile)
> ++  #:use-module (system base target)
> +   #:export (memoize-method!)
> +   #:no-backtrace)
> +
> +@@ -178,11 +179,15 @@
> +                      '())
> +                  (acons gf gf-sym '()))))
> +   (define (comp exp vals)
> +-    (let ((p ((@ (system base compile) compile) exp
> +-              #:env *dispatch-module*
> +-              #:opts '(#:partial-eval? #f #:cse? #f))))
> +-      (apply p vals)))
> +-
> ++    ;; When cross-compiling Guile itself, the native Guile must generate
> ++    ;; code for the host.
> ++    (with-target %host-type
> ++      (lambda ()
> ++        (let ((p ((@ (system base compile) compile) exp
> ++                  #:env *dispatch-module*
> ++                  #:opts '(#:partial-eval? #f #:cse? #f))))
> ++          (apply p vals)))))
> ++
> +   ;; kick it.
> +   (scan))
> +
> diff --git a/meta/recipes-devtools/guile/guile_2.0.5.bb b/meta/recipes-devtools/guile/guile_2.0.5.bb
> index db75863..cf222a6 100644
> --- a/meta/recipes-devtools/guile/guile_2.0.5.bb
> +++ b/meta/recipes-devtools/guile/guile_2.0.5.bb
> @@ -18,6 +18,8 @@ SRC_URI = "${GNU_MIRROR}/guile/guile-${PV}.tar.gz \
>              file://debian/0003-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch \
>              file://opensuse/guile-64bit.patch \
>              file://guile_2.0.5_fix_sed_error.patch \
> +           file://guile_2.0.5_disable_goops_optimizations.patch \
> +           file://guile_2.0.5_fix_cross_compilation.patch \
>              "
>
>   #           file://debian/0001-Change-guile-to-guile-X.Y-for-info-pages.patch
> @@ -26,7 +28,7 @@ SRC_URI = "${GNU_MIRROR}/guile/guile-${PV}.tar.gz \
>   SRC_URI[md5sum] = "bcf70d54b44c99cb9acd3f63c5486b4b"
>   SRC_URI[sha256sum] = "2a026ea6cdbc51ca71bcd9787839debfa45ac5db1e26dc00b30ca9b128b10956"
>
> -PR = "r0"
> +PR = "r1"
>
>   inherit autotools gettext
>   BBCLASSEXTEND = "native"

Merged into OE-Core

Thanks
	Sau!



      reply	other threads:[~2012-06-21 16:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-21 11:39 [PATCH] guile: fix compilation on MIPS/PPC Bogdan Marinescu
2012-06-21 16:31 ` Saul Wold [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FE34C76.4010303@linux.intel.com \
    --to=sgw@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox