Remember me

Lost Password?

Register now!


Who's Online
56 user(s) are online (43 user(s) are browsing Forums)

Members: 0
Guests: 56



Report message:*

Re: gcc 9 and 10

Subject: Re: gcc 9 and 10
by walkero on 2021/4/19 11:54:45

I would like to ask one thing, which possible might be my fault, but it seems weird to me. I am developing a new application for AmigaOS 4, where I try to split the code to multiple small files. I use GCC 8 natively on AmigaOS to compile it, as well as on linux with cross compiler.

So, with GCC 8 I have not issues to compile it at all, but with your GCC 10.1.0 and 10.3.0 on linux using cross compiler I get "multiple definition" errors, like below:

src/gui.o:(.sbss+0x0): multiple definition of `ApplicationBase'
src/libshandler.o:(.sbss+0x0): first defined here
src/gui.o:(.sbss+0x4): multiple definition of 
src/libshandler.o:(.sbss+0x4): first defined here
src/gui.o:(.sbss+0x8): multiple definition of `IntuitionBase'
src/libshandler.o:(.sbss+0x8): first defined here
/gui.o:(.sbss+0xc): multiple definition of `IIntuition'
src/libshandler.o:(.sbss+0xc): first defined here
src/gui.o:(.sbss+0x10): multiple definition of 
src/libshandler.o:(.sbss+0x10): first defined here
src/gui.o:(.sbss+0x14): multiple definition of `ILabel'
src/libshandler.o:(.sbss+0x14): first defined here
errorld returned 1 exit status

I wonder why this shows up only on GCC 10 and not with GCC 8. Also tried GCC 9 on Linux with cross compiling, and it compiles the same code just fine.

Is this something that should be looked further? Could it be a problem on the way I compile the GCC 10 from the master branch of your repo https://github.com/sodero/adtools?

Below you can see how I compile it:
git clone https://github.com/sodero/adtools;
cd adtools;
git submodule init;
git submodule update;
gild/bin/gild clone;
gild/bin/gild checkout binutils 2.23.2;
gild/bin/gild checkout gcc 10;
cp /opt/temp/native-build/makefile-10 /opt/adtools/native-build/;
make -C native-build gcc-cross CROSS_PREFIX=/opt/ppc-amigaos -j4;

Thank you for your help.

Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project