From b7e0d52b9678535cae2100bc54693cad0f5a818d Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 8 Mar 2019 18:21:34 -0700 Subject: [PATCH] setup/dirs: improve host lib dir search for cross-compile Insteda of just consulting `lib-search-dirs` in the host system's config during cross-build mode, use `lib-dir` if set to arrive at the expected default when `lib-search-dirs` is not set. --- racket/collects/setup/dirs.rkt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/racket/collects/setup/dirs.rkt b/racket/collects/setup/dirs.rkt index ed953d61bc..4d93a7e25f 100644 --- a/racket/collects/setup/dirs.rkt +++ b/racket/collects/setup/dirs.rkt @@ -191,7 +191,9 @@ (combine-search (to-path (hash-ref (force host-config) 'lib-search-dirs #f)) (list (find-user-lib-dir) - (build-path - (exe-relative-path->complete-path (find-system-path 'host-collects-dir)) - 'up - "lib"))))) + (let ([coll-dir (exe-relative-path->complete-path + (find-system-path 'host-collects-dir))]) + (or (let ([p (hash-ref (force host-config) 'lib-dir #f)]) + (and p + (path->complete-path p coll-dir))) + (build-path coll-dir 'up "lib")))))))