Fix bashism in `libsanitizer/configure.tgt'
authorMosè Giordano <mose@gnu.org>
Fri, 18 Jun 2021 23:46:44 +0000 (23:46 +0000)
committerMartin Liska <mliska@suse.cz>
Tue, 3 Aug 2021 11:24:47 +0000 (13:24 +0200)
Appending to a string variable with `+=' is a bashism and does not work in
strict POSIX shells like dash.  This results in the extra compilation flags not
to be set correctly.  This patch replaces the `+=' syntax with a simple string
interpolation to append to the `EXTRA_CXXFLAGS' variable.

libsanitizer/ChangeLog

PR sanitizer/101111
* configure.tgt: Fix bashism in setting of `EXTRA_CXXFLAGS'.

libsanitizer/configure.tgt

index f635e41..5a59ea6 100644 (file)
@@ -70,7 +70,7 @@ case "${target}" in
        ;;
   x86_64-*-darwin2* | x86_64-*-darwin1[2-9]* | i?86-*-darwin1[2-9]*)
        TSAN_SUPPORTED=no
-       EXTRA_CXXFLAGS+="-Wl,-undefined,dynamic_lookup"
+       EXTRA_CXXFLAGS="${EXTRA_CXXFLAGS} -Wl,-undefined,dynamic_lookup"
        ;;
   x86_64-*-solaris2.11* | i?86-*-solaris2.11*)
        ;;