mirror of
https://codeberg.org/guix/guix.git
synced 2026-01-25 12:05:19 -06:00
environment: Gracefully handle preexistence of /bin/cc in FHS.
* guix/scripts/environment.scm (setup-fhs): When /bin/cc already exists, keep it. Reported-by: Marco Fortina <marco_fortina@hotmail.it> Change-Id: I73d39d2aa6fbafd236061a0e3b8d1fe327b2bb19
This commit is contained in:
parent
573a07b689
commit
23ab6fc29f
1 changed files with 9 additions and 2 deletions
|
|
@ -464,8 +464,15 @@ providing a symlink for CC if GCC is in the container PROFILE, and writing
|
|||
;; /bin since that already has the sh symlink and the other (optional) FHS
|
||||
;; bin directories will link to /bin.
|
||||
(let ((gcc-path (string-append profile "/bin/gcc")))
|
||||
(if (file-exists? gcc-path)
|
||||
(symlink gcc-path "/bin/cc")))
|
||||
(when (file-exists? gcc-path)
|
||||
(catch 'system-error
|
||||
(lambda ()
|
||||
(symlink gcc-path "/bin/cc"))
|
||||
(lambda args
|
||||
;; If /bin/cc already exists because it was provided by another
|
||||
;; package in PROFILE, such as 'clang-toolchain', leave it.
|
||||
(unless (= EEXIST (system-error-errno args))
|
||||
(apply throw args))))))
|
||||
|
||||
;; Guix's ldconfig doesn't search in FHS default locations, so provide a
|
||||
;; minimal ld.so.conf.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue