Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
25 user(s) are online (18 user(s) are browsing Forums)

Members: 0
Guests: 25

more...

Headlines

 
  Register To Post
« 1 ... 4 5 6 (7) 8 9 10 ... 14 »

Re: gcc 9 and 10
Just can't stay away
Just can't stay away


See User information
@sTix

I have been using GCC 8.3.0. Adding __attribute__((weak)) for these symbols helped also but I decided to fallback from GCC10 to GCC8 because this SDL build is a maintenance release.

I will try to get GCC10 build working on master (SDL 2.0.16).

Go to top
Re: gcc 9 and 10
Just popping in
Just popping in


See User information
@Capehill

Yep, weak symbols is probably a better solution than -fcommon.

Go to top
Re: gcc 9 and 10
Just popping in
Just popping in


See User information
@Capehill

Thanks for your help.
I will give my first impressions.
At first I tested gcc10 and gcc09 without success.
Too many errors even with -std=c++11 -mcrt=...
I managed to get my progs compiled with gcc09 with
-std=c++11 -athread=native (or something like that not sure of the syntax).

I compiled a hello prog and a more complex amiga program with sucess.
I notice a problem though.
In one .cc file (located in work:dir2 ) I declared an include like #include "work:dir/file.h"

I had an error during compilation
File not found work:dir2/work:dir/file.h
As you see, there is a bug here.

For the moment, I change the include by /work/dir/file.h in the linux way. I don't really like it.


Since a lot of months without an amiga to love, I was lost.
Now I feel happiness again with a Sam Flex 800 .
Go to top
Re: gcc 9 and 10
Home away from home
Home away from home


See User information
@Sodero

I see a few days ago GCC 10.0.3 out, is it ok to ask you if you can bring that one to us as well?:)


@Yescop

Quote:

At first, I tested gcc10 and gcc09 without success.
Too many errors even with -std=c++11 -mcrt=...
I managed to get my progs compiled with gcc09 with
-std=c++11 -athread=native (or something like that not sure of the syntax).


You _should always_ use -athread=native, if you want to compile anything with the latest GCC on OS4. At least for now, while it still not enabled by default.




Edited by kas1e on 2021/4/10 11:58:28
Edited by kas1e on 2021/4/10 11:59:10
Go to top
Re: gcc 9 and 10
Just popping in
Just popping in


See User information
@kas1e
Quote:
I see a few days ago GCC 10.0.3 out, is it ok to ask you if you can bring that one to us as well?:)


I'll fix that. Hopefully next week.

Go to top
Re: gcc 9 and 10
Just popping in
Just popping in


See User information
@kas1e
Quote:
I see a few days ago GCC 10.0.3 out, is it ok to ask you if you can bring that one to us as well?:)



Done: https://github.com/sodero/adtools/releases/tag/10.3.0_1

Go to top
Re: gcc 9 and 10
Home away from home
Home away from home


See User information
@sTix

Wohooo...on to testing

Thank you very much

edit:

Produced a working static exe, many thanks again


Edited by Raziel on 2021/4/13 11:18:34
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Go to top
Re: gcc 9 and 10
Just popping in
Just popping in


See User information
@Raziel
Quote:
Wohooo...on to testing


I haven't done any testing except building Vim, but it should be OK, no drastic changes in there as far as I can see.

Go to top
Re: gcc 9 and 10
Home away from home
Home away from home


See User information
@sTix
I build 10.3.0 from sources on cross-compiler: all fine. Also, build with new cross-compiler latest SDL2 and test it together with building few games (ogles2/gl4es/warp3d based): all fine.

More of it, sizes of binaries start to be even smaller in comparison with 10.1.0 and 10.2.0, which means that some optimization takes place again in GCC 10.3.0, cool. A little bit smaller, but still.

Will use 10.3.0 since now, thanks a bunch!

ps. I see after my comment Sebastian accepts your old pool request, may be worth to pull request GCC 10.3.0 now, just in case it will be approved after month or two :)

Go to top
Re: gcc 9 and 10
Just popping in
Just popping in


See User information
@kas1e
Good to hear that it's working. I'll try to integrate this into the main repo as well.

Go to top
Re: gcc 9 and 10
Quite a regular
Quite a regular


See User information
@sTix

compiled a few of my tools with 10.3.0 and non stripped exec is smaller

Seems to work ok. GREAT JOB!!!

Go to top
Re: gcc 9 and 10
Just popping in
Just popping in


See User information
@jabirulo

Yes, code density seems to have gone up slightly. I would be interesting to do some performance benchmarking as well but that's a bit to ambitious for me. I just assume that newer is better.

Go to top
Re: gcc 9 and 10
Just popping in
Just popping in


See User information
@sTix

also tried 10.3.0. Works fine! Thank you!!

Do you have an idea why "-flto" doesn't work when building natively?

Go to top
Re: gcc 9 and 10
Home away from home
Home away from home


See User information
@IamSONIC

That and a few other switches that do work in cross compiling.

I'd like to know too, maybe we can tackle this now aswell

People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Go to top
Re: gcc 9 and 10
Just popping in
Just popping in


See User information
@IamSONIC
That's strange, I have no clue. I'll need to take a look.

@Raziel
What other switches aren't working?

Go to top
Re: gcc 9 and 10
Home away from home
Home away from home


See User information
@sTix

See here for lto
https://www.amigans.net/modules/xforum ... id=113450#forumpost113450

and at least one other switch didn't work, but I cant remember now.

Efit: then again, I didn't test lto since 8.3.0...

People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Go to top
Re: gcc 9 and 10
Home away from home
Home away from home


See User information
@sTix

The "other" switch i mentioned is an LD one, nothing to do wtith gcc

Quote:

--no-keep-memory
ld normally optimizes for speed over memory usage by caching the symbol tables of input files in memory. This option tells ld to instead optimize for memory usage, by rereading the symbol tables as necessary. This may be required if ld runs out of memory space while linking a large executable.

Since LD is still at version 2.32.2 since gcc 5.4.0 i doubt this will change.

That option might have bought me some more time depending on how much memory it really would have saved.

People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Go to top
Re: gcc 9 and 10
Site Builder
Site Builder


See User information
@sTix
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 
`IApplication'
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
src
/gui.o:(.sbss+0xc): multiple definition of `IIntuition'
src/libshandler.o:(.sbss+0xc): first defined here
src/gui.o:(.sbss+0x10): multiple definition of 
`LabelBase'
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
collect2
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.

Go to top
Re: gcc 9 and 10
Just can't stay away
Just can't stay away


See User information
@walkero

1) Don't define symbols multiple times ;)
2) If this cannot be avoided, try -fcommon workaround

GCC10 has different default behaviour. https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common

Go to top
Re: gcc 9 and 10
Site Builder
Site Builder


See User information
@capehill
Thank you so much for your reply. I will check your recommendations.
The thing is that I don't define the same things in multiple places, it is happening because of inclusion of the global.h file, which has some definitions there.
I am going to find a way to fix it.

Go to top

  Register To Post
« 1 ... 4 5 6 (7) 8 9 10 ... 14 »

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project