Skip to content
Snippets Groups Projects
Unverified Commit 29d37e99 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

gnu: make-bootstrap: Build grep without PCRE support.

Partly fixes <https://bugs.gnu.org/24841>.
Reported by Chris Marusich <cmmarusich@gmail.com>.

This fixes cross-compilation of the statically-linked grep.

* gnu/packages/make-bootstrap.scm (%static-inputs): Add 'inputs' field
for grep.
parent 7349fed5
No related branches found
No related tags found
No related merge requests found
...@@ -197,6 +197,18 @@ (define %static-inputs ...@@ -197,6 +197,18 @@ (define %static-inputs
(("/bin/sh") "sh") (("/bin/sh") "sh")
(("execv ") "execvp ")) (("execv ") "execvp "))
#t))))))) #t)))))))
;; We don't want to retain a reference to /gnu/store in the bootstrap
;; versions of egrep/fgrep, so we remove the custom phase added since
;; grep@2.25. The effect is 'egrep' and 'fgrep' look for 'grep' in
;; $PATH.
(grep (package
(inherit grep)
(inputs '()) ;remove PCRE, which is optional
(arguments
(substitute-keyword-arguments (package-arguments grep)
((#:phases phases)
`(modify-phases ,phases
(delete 'fix-egrep-and-fgrep)))))))
(finalize (compose static-package (finalize (compose static-package
package-with-relocatable-glibc))) package-with-relocatable-glibc)))
`(,@(map (match-lambda `(,@(map (match-lambda
...@@ -209,17 +221,7 @@ (define %static-inputs ...@@ -209,17 +221,7 @@ (define %static-inputs
("patch" ,patch) ("patch" ,patch)
("coreutils" ,coreutils) ("coreutils" ,coreutils)
("sed" ,sed) ("sed" ,sed)
;; We don't want to retain a reference to /gnu/store in the ("grep" ,grep)
;; bootstrap versions of egrep/fgrep, so we remove the custom
;; phase added since grep@2.25. The effect is 'egrep' and
;; 'fgrep' look for 'grep' in $PATH.
("grep" ,(package
(inherit grep)
(arguments
(substitute-keyword-arguments (package-arguments grep)
((#:phases phases)
`(modify-phases ,phases
(delete 'fix-egrep-and-fgrep)))))))
("gawk" ,gawk))) ("gawk" ,gawk)))
("bash" ,static-bash)))) ("bash" ,static-bash))))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment