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

            Bug ID: 95648
           Summary: gcc/configure: line 26509: objdump: command not found:
                    config/gcc-plugin.m4 uses 'objdump' instead of
                    ${host}-objdump
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: plugins
          Assignee: unassigned at gcc dot gnu.org
          Reporter: slyfox at inbox dot ru
                CC: pmuldoon at gcc dot gnu.org
  Target Milestone: ---

Looks similar to bug #67590.

Gentoo always builds gcc as:
    $ ./configure --build=... --host=... --target=...
and assumes tool-prefixed tools to be always used, like ${CHOST}-ld,
${CHOST}-nm. To make sure there are no accidental fallbacks to unprefixed tools
we have an optional mode to remove tools like 'objdump' and leave only
${CHOST}-objdump around.

It almost always work except for gcc plugins where objdump is referred as-is. 

Here is the full problematic configure command:

"""
$ /tmp/portage/cross-avr/gcc-10.1.0/work/gcc-10.1.0/configure
--host=x86_64-pc-linux-gnu --target=avr --build=x86_64-pc-linux-gnu
--prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/avr/gcc-bin/10.1.0
--includedir=/usr/lib/gcc/avr/10.1.0/include
--datadir=/usr/share/gcc-data/avr/10.1.0
--mandir=/usr/share/gcc-data/avr/10.1.0/man
--infodir=/usr/share/gcc-data/avr/10.1.0/info
--with-gxx-include-dir=/usr/lib/gcc/avr/10.1.0/include/g++-v10
--with-python-dir=/share/gcc-data/avr/10.1.0/python --enable-languages=c
--enable-obsolete --enable-secureplt --disable-werror --with-system-zlib
--enable-nls --without-included-gettext --enable-checking=release
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion=Gentoo 10.1.0 p1
--disable-esp --enable-poison-system-directories --enable-shared
--disable-threads --disable-bootstrap --enable-multilib --disable-fixed-point
--disable-libgomp --disable-libmudflap --disable-libssp --disable-libada
--disable-systemtap --disable-vtable-verify --disable-libvtv --without-zstd
--disable-libquadmath --enable-lto --without-isl --disable-libsanitizer
--disable-default-pie --enable-default-ssp

$ make
...
checking dl_iterate_phdr in target C library... unknown
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether to avoid linking multiple front-ends at once... no
Links are now set up to build a cross-compiler
 from x86_64-pc-linux-gnu to avr-unknown-none.
checking for exported symbols...
/tmp/portage/cross-avr/gcc-10.1.0/work/gcc-10.1.0/gcc/configure: line 26509:
objdump: command not found
yes
checking for -rdynamic...
/tmp/portage/cross-avr/gcc-10.1.0/work/gcc-10.1.0/gcc/configure: line 26519:
objdump: command not found
no
...
"""

Note: objdump is referred here from config/gcc-plugin.m4:
https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=config/gcc-plugin.m4;h=8f278719118277230f493e0185fb2a09593e9e45;hb=HEAD#l46

"""
  47        if test x$build = x$host; then
  48          export_sym_check="objdump${exeext} -T"
  49        elif test x$host = x$target; then
  50          export_sym_check="$gcc_cv_objdump -T"
  51        else
  52          export_sym_check=
  53        fi
"""

AFAIU here 'export_sym_check="objdump${exeext} -T"' is triggered.

Should it use an $ac_cv_prog_OBJDUMP value instead?

Reply via email to