diff options
| author | Andreas Enge <andreas@enge.fr> | 2026-07-23 13:41:47 +0200 |
|---|---|---|
| committer | Andreas Enge <andreas@enge.fr> | 2026-08-17 11:00:37 +0200 |
| commit | 42cb71a916d87abd773efe6b25e7cee015972426 (patch) | |
| tree | 737536778f808d1ca8afe0534a0ec3074c28f98e /gnu | |
| parent | 1c7074ea3de4c6ef7d6b159c09155a5f669bb7e6 (diff) | |
gnu: skcms: Fix build on i686 and aarch64.
* gnu/packages/graphics.scm (skcms)[arguments]<#:phases>{build}:
Pass the CFLAGS "-DSKCMS_PORTABLE" and "-ffloat-store" on i686,
and "-ffp-contract=off" on aarch64.
Modify the gexp such that the builder script is simplified.
Fixes: guix/guix#10115
Co-authored-by: Roman Scherer <roman@burningswell.com>
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/graphics.scm | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index f85167ba540..7d282d484bf 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | ;;; Copyright © 2016, 2019 Leo Famulari <leo@famulari.name> | 4 | ;;; Copyright © 2016, 2019 Leo Famulari <leo@famulari.name> |
| 5 | ;;; Copyright © 2016, 2017, 2019, 2023, 2025 Ricardo Wurmus <rekado@elephly.net> | 5 | ;;; Copyright © 2016, 2017, 2019, 2023, 2025 Ricardo Wurmus <rekado@elephly.net> |
| 6 | ;;; Copyright © 2016, 2018, 2021, 2023-2025 Efraim Flashner <efraim@flashner.co.il> | 6 | ;;; Copyright © 2016, 2018, 2021, 2023-2025 Efraim Flashner <efraim@flashner.co.il> |
| 7 | ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr> | 7 | ;;; Copyright © 2016, 2026 Andreas Enge <andreas@enge.fr> |
| 8 | ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com> | 8 | ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com> |
| 9 | ;;; Copyright © 2017, 2018 Ben Woodcroft <donttrustben@gmail.com> | 9 | ;;; Copyright © 2017, 2018 Ben Woodcroft <donttrustben@gmail.com> |
| 10 | ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr> | 10 | ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr> |
| @@ -2580,11 +2580,30 @@ and engineering community.") | |||
| 2580 | (replace 'build | 2580 | (replace 'build |
| 2581 | (lambda _ | 2581 | (lambda _ |
| 2582 | ;; Some CPUs may not support these features. | 2582 | ;; Some CPUs may not support these features. |
| 2583 | (let ((cflags (append '("-DSKCMS_DISABLE_HSW=1" | 2583 | (let ((cflags |
| 2584 | "-DSKCMS_DISABLE_SKX=1") | 2584 | (list |
| 2585 | (if #$(target-mingw?) | 2585 | #$@(append |
| 2586 | '("-DSKCMS_HAS_MUSTTAIL=0") | 2586 | '("-DSKCMS_DISABLE_HSW=1" |
| 2587 | '()))) | 2587 | "-DSKCMS_DISABLE_SKX=1") |
| 2588 | (if (target-mingw?) | ||
| 2589 | '("-DSKCMS_HAS_MUSTTAIL=0") | ||
| 2590 | '()) | ||
| 2591 | ;; Avoid SIMD instructions where | ||
| 2592 | ;; not available. | ||
| 2593 | ;; Tests compare floating point numbers for | ||
| 2594 | ;; equality; avoid double rounding through | ||
| 2595 | ;; extended precision where needed. | ||
| 2596 | (if (target-x86-32?) | ||
| 2597 | '("-DSKCMS_PORTABLE" | ||
| 2598 | "-ffloat-store") | ||
| 2599 | '()) | ||
| 2600 | ;; Upstream builds with | ||
| 2601 | ;; -ffp-contract=off (see ninja/gcc); | ||
| 2602 | ;; without it the tests fail on architectures | ||
| 2603 | ;; with fused multiply-add such as aarch64. | ||
| 2604 | (if (target-aarch64?) | ||
| 2605 | '("-ffp-contract=off") | ||
| 2606 | '())))) | ||
| 2588 | (ldflags '("-lstdc++"))) | 2607 | (ldflags '("-lstdc++"))) |
| 2589 | (apply invoke #$(cc-for-target) | 2608 | (apply invoke #$(cc-for-target) |
| 2590 | `("-O2" "-g" "-fPIC" ,@cflags | 2609 | `("-O2" "-g" "-fPIC" ,@cflags |
