diff mbox series

[bug#62309,core-updates,1/2] opensbi: Build with default gcc, with microarch rv64g

Message ID b08b5b8076d362a44f0043c50e7c999be0d5b9f0.1679350685.git.dev@jpoiret.xyz
State New
Headers show
Series Fix qemu build | expand

Commit Message

Josselin Poiret March 20, 2023, 10:26 p.m. UTC
* gnu/packages/firmware.scm (make-opensbi-package): Do it.
---
 gnu/packages/firmware.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Maxim Cournoyer March 21, 2023, 1:29 a.m. UTC | #1
Hi Josselin,

Josselin Poiret <dev@jpoiret.xyz> writes:

> * gnu/packages/firmware.scm (make-opensbi-package): Do it.

Nitpick: The change log should state the change; it took me an instant
to realize the "Do it" meant implement the git summary description.  The
summary can be more brief (or it could say the same if it fits under 80
chars).

>  gnu/packages/firmware.scm | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
> index 956ece5d6d..9b9443effe 100644
> --- a/gnu/packages/firmware.scm
> +++ b/gnu/packages/firmware.scm
> @@ -486,7 +486,7 @@ (define* (make-opensbi-package platform name #:optional (arch "riscv64"))
>      (native-inputs
>       `(,@(if (and (not (string-prefix? "riscv64" (%current-system)))
>                    (string-prefix? "riscv64" arch))
> -           `(("cross-gcc" ,(cross-gcc "riscv64-linux-gnu" #:xgcc gcc-7))
> +           `(("cross-gcc" ,(cross-gcc "riscv64-linux-gnu"))
>               ("cross-binutils" ,(cross-binutils "riscv64-linux-gnu")))
>             '())))
>      (arguments
> @@ -499,6 +499,8 @@ (define* (make-opensbi-package platform name #:optional (arch "riscv64"))
>                                  `("CC=gcc"))
>                            "FW_PAYLOAD=n"
>                            "V=1")
> +       ;; fence.i instructions are used, so we need a non-default micro arch
> +       #:configure-flags (list "-march=rv64g")

I don't quite understand, but then I don't know what is opensbi either,
so I'd have to read more.  Or if you can expound a bit that comment for
neophytes like me, that'd be nice.

Thanks for the fix!
diff mbox series

Patch

diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index 956ece5d6d..9b9443effe 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -486,7 +486,7 @@  (define* (make-opensbi-package platform name #:optional (arch "riscv64"))
     (native-inputs
      `(,@(if (and (not (string-prefix? "riscv64" (%current-system)))
                   (string-prefix? "riscv64" arch))
-           `(("cross-gcc" ,(cross-gcc "riscv64-linux-gnu" #:xgcc gcc-7))
+           `(("cross-gcc" ,(cross-gcc "riscv64-linux-gnu"))
              ("cross-binutils" ,(cross-binutils "riscv64-linux-gnu")))
            '())))
     (arguments
@@ -499,6 +499,8 @@  (define* (make-opensbi-package platform name #:optional (arch "riscv64"))
                                 `("CC=gcc"))
                           "FW_PAYLOAD=n"
                           "V=1")
+       ;; fence.i instructions are used, so we need a non-default micro arch
+       #:configure-flags (list "-march=rv64g")
        #:phases
        (modify-phases %standard-phases
          (delete 'configure)