]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
libtool: fix empty "-L" in compiler_lib_search_path
authorXiang.Lin <myd.xia@gmail.com>
Mon, 6 Nov 2023 07:07:56 +0000 (15:07 +0800)
committerIleana Dumitrescu <ileanadumitrescu95@gmail.com>
Tue, 16 Jan 2024 17:47:20 +0000 (19:47 +0200)
If the compiler places a space between "-L" and the path, the path will
be skipped and only an empty "-L" will appear in the final
compiler_lib_search_path. This will cause the first library in postdeps
following compiler_lib_search_path to be accidentally skipped.

* libtool.m4: Fixed string comparison by adding missing 'x's.

m4/libtool.m4

index 20d2c3ab36f0255e151902813dc787caeb151148..23a68497a964179f86cf4945ba0f7d508de6dd63 100644 (file)
@@ -7563,8 +7563,8 @@ if AC_TRY_EVAL(ac_compile); then
     -L* | -R* | -l*)
        # Some compilers place space between "-{L,R}" and the path.
        # Remove the space.
-       if test x-L = "$p" ||
-          test x-R = "$p"; then
+       if test x-L = x"$p" ||
+          test x-R = x"$p"; then
         prev=$p
         continue
        fi