Autoreconf'ed configure script for libiberty fails: syntax error near unexpected token `PLUGIN_OPTION'

John Scott jscott@posteo.net
Wed Aug 18 13:42:25 GMT 2021


Hi all,

I'm not certain this is a bug so I'm wanting to discuss this here. When
using Autoreconf to regenerate the configure scripts for Binutils 2.37,
which worked fine with Binutils 2.36, the script builds successfully.
However, an error occurs when the one for libiberty gets invoked:

checking for x86_64-linux-gnu-ar... ar --plugin /usr/lib/gcc/x86_64-linux-gnu/11/liblto_plugin.so
checking for x86_64-linux-gnu-ranlib... ranlib --plugin /usr/lib/gcc/x86_64-linux-gnu/11/liblto_plugin.so
/home/john/Packaging/binutils-sh-elf/binutils/libiberty/configure: line 2911: syntax error near unexpected token `PLUGIN_OPTION'
/home/john/Packaging/binutils-sh-elf/binutils/libiberty/configure: line 2911: `GCC_PLUGIN_OPTION(PLUGIN_OPTION)'
make[2]: *** [Makefile:8089: configure-libiberty] Error 1
make[2]: *** Waiting for unfinished jobs....

This seems to be related to these two commits: [1] on July 3, which
resynced libiberty with GCC, and [2] on July 5 two days later, which
seems to re-introduce this (accidentally removed) problematic part of
the configure.ac.

Here's what lines 2911 and after look like in my configure script:
GCC_PLUGIN_OPTION(PLUGIN_OPTION)
if test -n "$PLUGIN_OPTION"; then
  if $AR --help 2>&1 | grep -q "\--plugin"; then
    AR_PLUGIN_OPTION="$PLUGIN_OPTION"

  fi
  if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
    RANLIB_PLUGIN_OPTION="$PLUGIN_OPTION"

  fi
fi

[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=20c4b12e937b20f0998bd25ad37c77145650e826
[2] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=c919d6be44913ed52d91c203e87e529ee17de805
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: This is a digitally signed message part
URL: <https://sourceware.org/pipermail/binutils/attachments/20210818/f87c4fff/attachment.sig>


More information about the Binutils mailing list