]> gitweb.factorcode.org Git - factor.git/commitdiff
alien.libraries.finder.linux: always use ld when ldconfig fails.
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 17 Jan 2023 03:43:50 +0000 (19:43 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 17 Jan 2023 03:43:50 +0000 (19:43 -0800)
basis/alien/libraries/finder/linux/linux.factor

index 4bc6a517677035d88f27b0f355775fa15726b175..0e88d40b7cb290a8d391a7e4deda55d22904bf38 100644 (file)
@@ -45,17 +45,16 @@ CONSTANT: mach-map {
     [ ldconfig-matches? ] with find nip ?last ;
 
 :: find-ld ( name -- path/f )
-    "LD_LIBRARY_PATH" os-env [
-        <process>
-            swap [
-                "ld" , "-t" , ":" split [ "-L" , , ] each
-                cpu x86.64? "-melf_x86_64" "-melf_i386" ? ,
-                "-o" , "/dev/null" , "-l" name append ,
-            ] { } make >>command
-            +closed+ >>stderr
-        utf8 [ read-lines ] with-process-reader* 2drop
-        "lib" name append '[ _ subseq-of? ] find nip
-    ] [ f ] if* ;
+    "lib" name append <process>
+        [
+            "ld" , "-t" ,
+            "LD_LIBRARY_PATH" os-env ":" split [ "-L" , , ] each
+            cpu x86.64? "-melf_x86_64" "-melf_i386" ? ,
+            "-o" , "/dev/null" , "-l" name append ,
+        ] { } make >>command
+        +closed+ >>stderr
+    utf8 [ read-lines ] with-process-reader* 2drop
+    [ subseq? ] with find nip ;
 
 PRIVATE>