https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101111
--- Comment #5 from Mosè Giordano <mose at gnu dot org> --- Ok, I finally found the culprit: `libsanitizer` does already have a way to add `-Wl,-undefined,dynamic_lookup` to CXXFLAGS, but it uses a bashism: <https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libsanitizer/configure.tgt;h=0ca5d9fd92464110d99a5da86b8de4378384e944;hb=HEAD#l68>. On Alpine Linux, the system where I'm doing the compilation, sh isn't bash and appending to a string variable with += isn't valid. Scavenging the compilation log I found /workspace/srcdir/gcc-11.1.0/libsanitizer/configure: /workspace/srcdir/gcc-11.1.0/libsanitizer/configure.tgt: line 68: EXTRA_CXXFLAGS+=-Wl,-undefined,dynamic_lookup: not found If I replace EXTRA_CXXFLAGS+="-Wl,-undefined,dynamic_lookup" with EXTRA_CXXFLAGS="${EXTRA_CXXFLAGS} -Wl,-undefined,dynamic_lookup" compilation of GCC is finally successful.