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

            Bug ID: 88422
           Summary: collect2.exe: fatal error: lto-wrapper returned 1 exit
                    status: file not recognized: file truncated
           Product: gcc
           Version: lto
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: nidal.faour at wdc dot com
  Target Milestone: ---

Created attachment 45192
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45192&action=edit
test case to reproduce the the failure

When attempt to build a simple code including one assembly file and one c code
file while calling a c function from the assembly code and using the lto in
linkage stage I encountered an error in the lto-wrapper where ld returned 1
exit status, with file not recognized: file truncated.

the build has been done in windows machine.

the toolchain used: gcc-arm-8.2-2018.08-i686-mingw32-arm-eabi
download link:
https://developer.arm.com/-/media/Files/downloads/gnu-a/8.2-2018.08/gcc-arm-8.2-2018.08-i686-mingw32-arm-eabi.tar.xz?revision=37b1357c-06a5-4721-8fde-533b0028c083&la=en

gcc build info:
Using built-in specs.
COLLECT_GCC=..\gcc-arm-8.2\bin\arm-eabi-gcc.exe
COLLECT_LTO_WRAPPER=c:/tmp/gcc-arm-8.2/bin/../libexec/gcc/arm-eabi/8.2.1/lto-wrapper.exe
Target: arm-eabi
Configured with:
/tmp/dgboter/bbs/dsggnu-vm-1-x86_64--mingw32-i686/buildbot/mingw32-i686--arm-eabi/build/src/gcc/configure
--target=arm-eabi
--prefix=/tmp/dgboter/bbs/dsggnu-vm-1-x86_64--mingw32-i686/buildbot/mingw32-i686--arm-eabi/build/build-mingw-arm-eabi/install//
--with-gmp=/tmp/dgboter/bbs/dsggnu-vm-1-x86_64--mingw32-i686/buildbot/mingw32-i686--arm-eabi/build/build-mingw-arm-eabi/host-tools
--with-mpfr=/tmp/dgboter/bbs/dsggnu-vm-1-x86_64--mingw32-i686/buildbot/mingw32-i686--arm-eabi/build/build-mingw-arm-eabi/host-tools
--with-mpc=/tmp/dgboter/bbs/dsggnu-vm-1-x86_64--mingw32-i686/buildbot/mingw32-i686--arm-eabi/build/build-mingw-arm-eabi/host-tools
--with-isl=/tmp/dgboter/bbs/dsggnu-vm-1-x86_64--mingw32-i686/buildbot/mingw32-i686--arm-eabi/build/build-mingw-arm-eabi/host-tools
--with-pkgversion='GNU Toolchain for the A-profile Architecture 8.2-2018-08
(arm-rel-8.23)' --disable-shared --disable-nls --disable-threads --disable-tls
--enable-checking=release --enable-languages=c,c++,fortran --with-newlib
--with-multilib-list=aprofile
--with-libiconv-prefix=/tmp/dgboter/bbs/dsggnu-vm-1-x86_64--mingw32-i686/buildbot/mingw32-i686--arm-eabi/build/build-mingw-arm-eabi/host-tools
--host=i686-w64-mingw32
Thread model: single
gcc version 8.2.1 20180802 (GNU Toolchain for the A-profile Architecture
8.2-2018-08 (arm-rel-8.23))

Attached a simple test case [lto_test_arm.zip] that reproduce the failure.

Reply via email to