http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49097

           Summary: gnatbind link fails to find version_string, potential
                    ranlib concurrency problem
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: build
          Severity: normal
          Priority: P3
         Component: ada
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: amyl...@gcc.gnu.org
                CC: js...@gcc.gnu.org
              Host: x86_64-unknown-linux-gnu
            Target: arm-ecos-elf, x86_64-elf


This is from the arm-ecos-elf build log, using svn revision 173975 on gcc20:

gcc -static-libgcc  -o gnatbind ada/b_gnatb.o ada/adaint.o ada/argv.o
ada/exit.o ada/cio.o ada/cstreams.o ada/env.o ada/final.o ada/init.o
ada/initialize.o ada/seh_init.o ada/link.o ada/targext.o ada/raise.o
ada/tracebak.o ada/ada.o ada/a-clrefi.o ada/a-comlin.o ada/a-elchha.o
ada/a-except.o ada/ali-util.o ada/ali.o ada/alloc.o ada/aspects.o ada/atree.o
ada/bcheck.o ada/binde.o ada/binderr.o ada/bindgen.o ada/bindusg.o ada/butil.o
ada/casing.o ada/csets.o ada/debug.o ada/einfo.o ada/elists.o ada/err_vars.o
ada/errout.o ada/erroutc.o ada/fmap.o ada/fname.o ada/g-hesora.o ada/g-htable.o
ada/s-os_lib.o ada/s-string.o ada/gnat.o ada/gnatbind.o ada/gnatvsn.o
ada/hostparm.o ada/interfac.o ada/lib.o ada/namet.o ada/nlists.o ada/opt.o
ada/osint-b.o ada/osint.o ada/output.o ada/rident.o ada/s-addope.o
ada/s-assert.o ada/s-carun8.o ada/s-casuti.o ada/s-conca2.o ada/s-conca3.o
ada/s-conca4.o ada/s-conca5.o ada/s-conca6.o ada/s-conca7.o ada/s-conca8.o
ada/s-conca9.o ada/s-crc32.o ada/s-crtl.o ada/s-except.o ada/s-exctab.o
ada/s-htable.o ada/s-imenne.o ada/s-imgenu.o ada/s-mastop.o ada/s-memory.o
ada/s-parame.o ada/s-restri.o ada/s-secsta.o ada/s-soflin.o ada/s-sopco3.o
ada/s-sopco4.o ada/s-sopco5.o ada/s-stache.o ada/s-stalib.o ada/s-stoele.o
ada/s-strhas.o ada/s-strops.o ada/s-traceb.o ada/s-traent.o ada/s-unstyp.o
ada/s-utf_32.o ada/s-wchcnv.o ada/s-wchcon.o ada/s-wchjis.o ada/scng.o
ada/scans.o ada/scil_ll.o ada/sdefault.o ada/sem_aux.o ada/sinfo.o ada/sinput.o
ada/sinput-c.o ada/snames.o ada/stand.o ada/stringt.o ada/switch-b.o
ada/switch.o ada/style.o ada/styleg.o ada/stylesw.o ada/system.o ada/table.o
ada/targparm.o ada/tree_io.o ada/types.o ada/uintp.o ada/uname.o ada/urealp.o
ada/widechar.o prefix.o libcommon.a ../libcpp/libcpp.a  
../libiberty/libiberty.a ../libdecnumber/libdecnumber.a   -g -O2
ranlib  libcommon.a
ada/adaint.o: In function `get_gcc_version':
/home/amylaar/pr46489/may20/multi/arm-ecos-elf/gcc/../../../gcc/gcc/ada/adaint.c:3595:
undefined reference to `version_string'
ada/gnatvsn.o: In function `gnatvsn__gnat_version_string':
/home/amylaar/pr46489/may20/multi/arm-ecos-elf/gcc/../../../gcc/gcc/ada/gnatvsn.adb:75:
undefined reference to `version_string'
/home/amylaar/pr46489/may20/multi/arm-ecos-elf/gcc/../../../gcc/gcc/ada/gnatvsn.adb:73:
undefined reference to `version_string'
collect2: ld returned 1 exit status
make[2]: *** [gnatbind] Error 1

Likewise, for the x86_64-elf --with-fpmath=sse build, ranlib appears to be
called during the gnatbind link, and the latter fails with an undefined
reference to version_string.
In each case, libcommon.a contains version_string as a global read-only symbol.
Re-running the link command by hand succeeds.

Reply via email to