diff options
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/tls.scm | 65 |
1 files changed, 38 insertions, 27 deletions
diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index a310899b27..1e527ecce2 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -376,33 +376,44 @@ OpenSSL for TARGET." ;; Keep this code outside the build code, ;; such that new targets can be added ;; without causing rebuilds for other targets. - (cond ((string-prefix? "i586" target) - "hurd-x86") - ((string-suffix? "mingw32" target) - (string-append - "mingw" - (if (string-prefix? "x86_64" target) - "64" - ""))) - ((string-prefix? "i686" target) - "linux-x86") - ((string-prefix? "x86_64" target) - "linux-x86_64") - ((string-prefix? "mips64el" target) - "linux-mips64") - ((string-prefix? "arm" target) - "linux-armv4") - ((string-prefix? "aarch64" target) - "linux-aarch64") - ((string-prefix? "powerpc64le" target) - "linux-ppc64le") - ((string-prefix? "powerpc64" target) - "linux-ppc64") - ((string-prefix? "powerpc" target) - "linux-ppc") - ((string-prefix? "riscv64" target) - ;; linux64-riscv64 isn't recognized until 3.0.0. - "linux-generic64"))) + (if (target-mingw? target) + (string-append + "mingw" + (if (target-x86-64? target) + "64" + "")) + (let ((kernel + (cond ((target-hurd? target) + "hurd") + ((target-linux? target) + "linux") + (else + (error "unsupported openssl target kernel")))) + (arch + (cond + ((target-x86-32? target) + "x86") + ((target-x86-64? target) + "x86_64") + ((target-mips64el? target) + "mips64") + ((target-arm32? target) + "armv4") + ((target-aarch64? target) + "aarch64") + ((target-ppc64le? target) + "ppc64le") + ((target-ppc32? target) + "ppc") + ((and (target-powerpc? target) + (target-64bit? target)) + "ppc64") + ((target-64bit? target) + ;; linux64-riscv64 isn't recognized until 3.0.0. + "generic64") + (else + (error "unsupported openssl target architecture"))))) + (string-append kernel "-" arch)))) (define-public openssl (package |