https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86651
--- Comment #13 from rguenther at suse dot de <rguenther at suse dot de> --- On Sun, 29 Jul 2018, andris at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86651 > > Andris Pavenis <andris at gcc dot gnu.org> changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > CC| |andris at gcc dot gnu.org > > --- Comment #12 from Andris Pavenis <andris at gcc dot gnu.org> --- > Did some testing with gcc-8.2.0 built as both native compiler for DJGPP and as > Linux to DJGPP cross-compiler on Arch Linux (same build as one gets using > https://aur.archlinux.org/packages/djgpp-gcc/) and new one with proposed patch > applied additionally (added -msse to command line to avoid some unnecessary > warnings) > > Arch Linux: > > 1) without proposed patch and -g<n> (where n missing or greater than 1): > lto-wrapper: vakava virhe: simple_object_copy_lto_debug_sections not > implemented: Virheellinen argumentti > > 2) with -g0 (patch do not have any influence in this case) or with proposed > patch applied: > lto1: virhe: two or more sections for > .gnu.lto__ZNSt8__detail16_Hashtable_allocISaINS_10_Hash_nodeISt4pairIKhN2jw2io3keyEELb0EEEEE21_M_deallocate_bucketsEPPNS_15_Hash_node_baseEm.e29cca957c80c524 > (null):0: hämmentynyt aikaisemmista virheistä, poistutaan > lto-wrapper: vakava virhe: i686-pc-msdosdjgpp-g++ returned 1 exit status That looks like an unrelated bug to me. > DJGPP native compiler (only tested with patch applied): > lto1.exe: error: two or more sections for > .gnu.lto__ZNSt16allocator_traitsISaINSt8__detail10_Hash_nodeISt4pairIKhN2jw2io3keyEELb0EEEEE7destroyIS7_EEvRS9_PT_.e5d8ced6 > (null):0: confused by earlier errors, bailing out > lto-wrapper.exe: fatal error: C:\DJGPP\BIN/gpp.exe returned 1 exit status > compilation terminated. > collect2.exe: fatal error: lto-wrapper returned 1 exit status > > Compiling simple program did not work earlier for native compiler fir DJGPP > target before when both -flto and -g where specified but works after proposed > patch is applied. > > So we have 2 bugs and patch only fixes one of them. Yes, let's track the other bug in another PR.