unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] setbfree: Fix build on MIPS64
@ 2015-07-05 18:44 Ricardo Wurmus
  2015-07-05 22:29 ` Mark H Weaver
  0 siblings, 1 reply; 4+ messages in thread
From: Ricardo Wurmus @ 2015-07-05 18:44 UTC (permalink / raw)
  To: Guix-devel

[-- Attachment #1: Type: text/plain, Size: 202 bytes --]

The attached patch should fix the build of setbfree on MIPS64.  The
default value for OPTIMIZATIONS contains flags for x86 systems.

I have not tested this as I don’t have access to a MIPS64 system.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-setbfree-Disable-unsupported-optimizations-on-MI.patch --]
[-- Type: text/x-patch, Size: 1399 bytes --]

From 87a5264e54d93cfd84b3c886e2d6ee5fbe69cce7 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado@elephly.net>
Date: Sun, 5 Jul 2015 20:40:56 +0200
Subject: [PATCH] gnu: setbfree: Disable unsupported optimizations on MIPS64.

* gnu/packages/music.scm (setbfree)[arguments]: Override default OPTIMIZATIONS
  variable on MIPS64.
---
 gnu/packages/music.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 9e7e012..8f49f04 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -424,7 +424,12 @@ Editor.  It is compatible with Power Tab Editor 1.7 and Guitar Pro.")
        (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
              (string-append "FONTFILE="
                             (assoc-ref %build-inputs "font-bitstream-vera")
-                            "/share/fonts/truetype/VeraBd.ttf"))
+                            "/share/fonts/truetype/VeraBd.ttf")
+             ;; Disable unsupported optimization flags on MIPS64
+             ,@(if (string-prefix? "mips64" (or (%current-target-system)
+                                                (%current-system)))
+                   '("OPTIMIZATIONS=-ffast-math -fomit-frame-pointer -O3")
+                   '()))
        #:phases
        (modify-phases %standard-phases
          (add-before 'build 'set-CC-variable
-- 
2.4.3


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

* Re: [PATCH] setbfree: Fix build on MIPS64
  2015-07-05 18:44 [PATCH] setbfree: Fix build on MIPS64 Ricardo Wurmus
@ 2015-07-05 22:29 ` Mark H Weaver
  2015-07-06  5:14   ` Ricardo Wurmus
  2015-07-06  7:40   ` Ricardo Wurmus
  0 siblings, 2 replies; 4+ messages in thread
From: Mark H Weaver @ 2015-07-05 22:29 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: Guix-devel

Ricardo Wurmus <rekado@elephly.net> writes:
> The attached patch should fix the build of setbfree on MIPS64.  The
> default value for OPTIMIZATIONS contains flags for x86 systems.

[...]

> diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
> index 9e7e012..8f49f04 100644
> --- a/gnu/packages/music.scm
> +++ b/gnu/packages/music.scm
> @@ -424,7 +424,12 @@ Editor.  It is compatible with Power Tab Editor 1.7 and Guitar Pro.")
>         (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
>               (string-append "FONTFILE="
>                              (assoc-ref %build-inputs "font-bitstream-vera")
> -                            "/share/fonts/truetype/VeraBd.ttf"))
> +                            "/share/fonts/truetype/VeraBd.ttf")
> +             ;; Disable unsupported optimization flags on MIPS64
> +             ,@(if (string-prefix? "mips64" (or (%current-target-system)
> +                                                (%current-system)))
> +                   '("OPTIMIZATIONS=-ffast-math -fomit-frame-pointer -O3")
> +                   '()))

Can you tell what would happen on ARM systems, or other systems?
Depending on the answer to that question, it might be better to invert
the conditional and override OPTIMIZATIONS on any non-Intel system.

> I have not tested this as I don’t have access to a MIPS64 system.

I can test it on MIPS and ARM, but I'll wait to hear back on my question
above.

    Thanks!
      Mark

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

* Re: [PATCH] setbfree: Fix build on MIPS64
  2015-07-05 22:29 ` Mark H Weaver
@ 2015-07-06  5:14   ` Ricardo Wurmus
  2015-07-06  7:40   ` Ricardo Wurmus
  1 sibling, 0 replies; 4+ messages in thread
From: Ricardo Wurmus @ 2015-07-06  5:14 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: Guix-devel

[-- Attachment #1: Type: text/plain, Size: 87 bytes --]

Attached is a new patch, leaving the optimizations unaltered only on
i686 and x86_64.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-setbfree-Disable-unsupported-optimizations-on-no.patch --]
[-- Type: text/x-patch, Size: 1505 bytes --]

From 50536b6e40eed40822b65aba2c296809e5bfbc1e Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado@elephly.net>
Date: Sun, 5 Jul 2015 20:40:56 +0200
Subject: [PATCH] gnu: setbfree: Disable unsupported optimizations on non-x86.

* gnu/packages/music.scm (setbfree)[arguments]: Override default OPTIMIZATIONS
  variable on non-x86 systems.
---
 gnu/packages/music.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 9e7e012..13ddd8b 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -424,7 +424,14 @@ Editor.  It is compatible with Power Tab Editor 1.7 and Guitar Pro.")
        (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
              (string-append "FONTFILE="
                             (assoc-ref %build-inputs "font-bitstream-vera")
-                            "/share/fonts/truetype/VeraBd.ttf"))
+                            "/share/fonts/truetype/VeraBd.ttf")
+             ;; Disable unsupported optimization flags on non-x86
+             ,@(let ((system (or (%current-target-system)
+                                 (%current-system))))
+                 (if (or (string-prefix? "x86_64" system)
+                         (string-prefix? "i686" system))
+                     '()
+                     '("OPTIMIZATIONS=-ffast-math -fomit-frame-pointer -O3"))))
        #:phases
        (modify-phases %standard-phases
          (add-before 'build 'set-CC-variable
-- 
2.4.3


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

* Re: [PATCH] setbfree: Fix build on MIPS64
  2015-07-05 22:29 ` Mark H Weaver
  2015-07-06  5:14   ` Ricardo Wurmus
@ 2015-07-06  7:40   ` Ricardo Wurmus
  1 sibling, 0 replies; 4+ messages in thread
From: Ricardo Wurmus @ 2015-07-06  7:40 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: Guix-devel

(I failed to send this email out before the one containing a corrected
patch.)

>> +             ;; Disable unsupported optimization flags on MIPS64
>> +             ,@(if (string-prefix? "mips64" (or (%current-target-system)
>> +                                                (%current-system)))
>> +                   '("OPTIMIZATIONS=-ffast-math -fomit-frame-pointer -O3")
>> +                   '()))
>
> Can you tell what would happen on ARM systems, or other systems?
> Depending on the answer to that question, it might be better to invert
> the conditional and override OPTIMIZATIONS on any non-Intel system.

I think you are right.  The default OPTIMIZATIONS (according to
common.mak) are

    OPTIMIZATIONS ?= -msse -msse2 -mfpmath=sse -ffast-math \
      -fomit-frame-pointer -O3 -fno-finite-math-only

and I think that at least the first three are only valid for x86.

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

end of thread, other threads:[~2015-07-06  7:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-05 18:44 [PATCH] setbfree: Fix build on MIPS64 Ricardo Wurmus
2015-07-05 22:29 ` Mark H Weaver
2015-07-06  5:14   ` Ricardo Wurmus
2015-07-06  7:40   ` Ricardo Wurmus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).