diff options
author | Maxime Devos <maximedevos@telenet.be> | 2021-08-24 09:37:01 +0200 |
---|---|---|
committer | Mathieu Othacehe <othacehe@gnu.org> | 2021-09-20 11:11:46 +0000 |
commit | 5203a3f12312bda6fe4fb3af13de842768628365 (patch) | |
tree | 237a0443a05aa078c3b241388bb1bf871b668114 /gnu | |
parent | 04380925eae70f1a2f27eb09669f4ca241d3ae2a (diff) |
gnu: libcap: Fix cross-compilation build failures.
* gnu/packages/linux.scm
(libcap)[arguments]<#:phases>{configure}: Don't use non-existent
'%output' when cross-compiling.
(libcap)[arguments]<#:make-flags>: Set "CROSS_COMPILE" and "BUILD_CC"
when cross-compiling.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/linux.scm | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index ec079e8af9..b771f65d92 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -2996,20 +2996,32 @@ configuration (iptunnel, ipmaddr).") (base32 "1ych13qc1mvzv8iscbims5b317vxcmy5ffpmfy98zk7bgamz62b6")))) (build-system gnu-build-system) - (arguments '(#:phases - (modify-phases %standard-phases - (replace 'configure - ;; Add $libdir to the RUNPATH of executables. - (lambda _ - (substitute* "Make.Rules" - (("LDFLAGS \\?= #-g") - (string-append "LDFLAGS ?= -Wl,-rpath=" - %output "/lib")))))) + (arguments `(#:phases + ,#~(modify-phases %standard-phases + (replace 'configure + ;; Add $libdir to the RUNPATH of executables. + (lambda _ + (substitute* "Make.Rules" + (("LDFLAGS \\?= #-g") + (string-append "LDFLAGS ?= -Wl,-rpath=" + ;; TODO(core-updates): Use #$output + ;; unconditionally. + #$(if (%current-target-system) + #~#$output + '%output) + "/lib")))))) #:test-target "test" - #:make-flags (list "lib=lib" - (string-append "prefix=" - (assoc-ref %outputs "out")) - "RAISE_SETFCAP=no"))) + #:make-flags + (list "lib=lib" + (string-append "prefix=" (assoc-ref %outputs "out")) + "RAISE_SETFCAP=no" + ;; Tell the makefile to use TARGET-gcc and friends + ;; when cross-compiling. + ,@(if (%current-target-system) + `(,(string-append "CROSS_COMPILE=" + (%current-target-system) "-") + "BUILD_CC=gcc") + '())))) (native-inputs `(("perl" ,perl))) (supported-systems (delete "i586-gnu" %supported-systems)) (home-page "https://sites.google.com/site/fullycapable/") |