https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78806

            Bug ID: 78806
           Summary: gcc assumes gold always supports -plugin
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu
             Build: x86_64-pc-linux-gnu

A recent mainline bootstrap with gold from binutils 2.27 failed linking the
stage1
libgcc_s.so:

/vol/gcc/bin/gold-2.27: -plugin: unknown option
/vol/gcc/bin/gold-2.27: use the --help option for usage information
collect2: error: ld returned 1 exit status
Makefile:971: recipe for target 'libgcc_s.so' failed
make[3]: *** [libgcc_s.so] Error 1

gcc/configure.ac unconditionally assumes gold supports -plugin, which is false
by default as can be seen in this snippet from gold/configure.ac:

AC_ARG_ENABLE([plugins],
[  --enable-plugins        linker plugins],
[case "${enableval}" in
  yes | "") plugins=yes ;;
  no) plugins=no ;;
  *) plugins=yes ;;
 esac],
[plugins=no])

Of course, this can be worked around by building binutils with --enable-gold
--enable-plugins, but gcc needs to cope with a default-configured gold (however
silly that default may be compared to the ld.bfd one).

  Rainer

Reply via email to