bebbo / amiga-gcc

The GNU C-Compiler with Binutils and other useful tools for cross development for Amiga
GNU General Public License v2.0
312 stars 66 forks source link

6.5.0b/libstdc++.a(iostream-inst.o): duplicate section - problem with std::setfill #364

Closed tdolphin-org closed 10 months ago

tdolphin-org commented 10 months ago

for such simple C++ program

#include <iomanip>
#include <iostream>

int main(int argc, char *argv[])
{
    std::cout << std::setfill('0') << std::endl;
}

cross compilation on linux, gives such errors:

$ m68k-amigaos-g++ -lstdc++ -o setfill-error setfill-error.cpp

/opt/amiga/lib/gcc/m68k-amigaos/6.5.0b/libstdc++.a(iostream-inst.o): duplicate section `.text._ZSt7setfillIcESt8_SetfillITES1' has different size

/opt/amiga/lib/gcc/m68k-amigaos/6.5.0b/libstdc++.a(iostream-inst.o): duplicate section `.text._ZSt7setfillIcESt8_SetfillITES1' has different size

bebbo commented 10 months ago

That's a warning not an error. The inline function in your file is compiled with a different option as the built library. Try -Os. I also recommend adding -noixemul.