diff mbox series

[bug#64711,10/43] gnu: openssl: Build fix for the Hurd.

Message ID cf0c80a1834cbd7bfad74b8f69d416f61fb3799e.1689690897.git.janneke@gnu.org
State New
Headers show
Series Fix builds and skip failing tests for the Hurd. | expand

Commit Message

Janneke Nieuwenhuizen July 18, 2023, 2:40 p.m. UTC
* gnu/packages/tls.scm (openssl-3.0)[arguments]: When building on the Hurd,
add "hurd-x86" to #:configure-flags.
---
 gnu/packages/tls.scm | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Comments

Ludovic Courtès July 18, 2023, 5:53 p.m. UTC | #1
Hi,

Janneke Nieuwenhuizen <janneke@gnu.org> skribis:

> * gnu/packages/tls.scm (openssl-3.0)[arguments]: When building on the Hurd,
> add "hurd-x86" to #:configure-flags.

[...]

> +       ((#:configure-flags flags #~'())
> +        (if (target-hurd? (%current-system))

Should it be (target-hurd?) with no arguments, so it also affects
cross-compilation?  If not, maybe add “;native builds” or similar as a
margin comment to make it clear that it’s on purpose.

> +            #~(append
> +               #$flags
> +               '("hurd-x86"))

On a single line please.  :-)

Ludo’.
Janneke Nieuwenhuizen July 18, 2023, 6:04 p.m. UTC | #2
Ludovic Courtès writes:

> Janneke Nieuwenhuizen <janneke@gnu.org> skribis:
>
>> * gnu/packages/tls.scm (openssl-3.0)[arguments]: When building on the Hurd,
>> add "hurd-x86" to #:configure-flags.
>
> [...]
>
>> +       ((#:configure-flags flags #~'())
>> +        (if (target-hurd? (%current-system))
>
> Should it be (target-hurd?) with no arguments, so it also affects
> cross-compilation?

No, but I'll change it to "(system-hurd?)" (chronologically, I only
decided to add system-hurd two weeks later).

> If not, maybe add “;native builds” or similar as a
> margin comment to make it clear that it’s on purpose.

Using system-hurd? is probably indicative enough, but because it *must*
not be used when cross building, I'll add a comment.

>
>> +            #~(append
>> +               #$flags
>> +               '("hurd-x86"))
>
> On a single line please.  :-)

Changed to

        (if (system-hurd?)
            #~(append #$flags '("hurd-x86")) ;must not be used when
                                             ;cross-compiling!
            flags))))

Greetings,
Janneke
diff mbox series

Patch

diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index d94b7c27f5..e8ed0d61a4 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -585,7 +585,13 @@  (define-public openssl-3.0
               (lambda* (#:key native-inputs inputs #:allow-other-keys)
                 (setenv "HASHBANGPERL"
                         (search-input-file (or native-inputs inputs)
-                                           "/bin/perl"))))))))
+                                           "/bin/perl"))))))
+       ((#:configure-flags flags #~'())
+        (if (target-hurd? (%current-system))
+            #~(append
+               #$flags
+               '("hurd-x86"))
+            flags))))
     (license license:asl2.0)))
 
 (define-public openssl openssl-3.0)