Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
44 user(s) are online (21 user(s) are browsing Forums)

Members: 2
Guests: 42

mufa, BSzili, more...

Headlines




« 1 ... 4 5 6 (7) 8 9 »


Re: gcc 9 and 10
Just can't stay away
Joined:
2007/7/14 21:30
From Lothric
Posts: 1335
@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).

   Report Go to top

Re: gcc 9 and 10
Just popping in
Joined:
2006/11/30 11:59
From Lund, Sweden
Posts: 161
@Capehill

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

   Report Go to top

Re: gcc 9 and 10
Just popping in
Joined:
2007/11/25 16:32
From Caen (France)
Posts: 173
@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 .
   Report Go to top

Re: gcc 9 and 10
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 7041
@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
_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: gcc 9 and 10
Just popping in
Joined:
2006/11/30 11:59
From Lund, Sweden
Posts: 161
@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.

   Report Go to top

Re: gcc 9 and 10
Just popping in
Joined:
2006/11/30 11:59
From Lund, Sweden
Posts: 161
@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

   Report Go to top

Re: gcc 9 and 10
Home away from home
Joined:
2006/11/26 21:45
From a dying planet
Posts: 4194
@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
   Report Go to top

Re: gcc 9 and 10
Just popping in
Joined:
2006/11/30 11:59
From Lund, Sweden
Posts: 161
@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.

   Report Go to top

Re: gcc 9 and 10
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 7041
@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 :)

_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: gcc 9 and 10
Just popping in
Joined:
2006/11/30 11:59
From Lund, Sweden
Posts: 161
@kas1e
Good to hear that it's working. I'll try to integrate this into the main repo as well.

   Report Go to top

Re: gcc 9 and 10
Quite a regular
Joined:
2007/2/6 13:57
From Donostia (SPAIN)
Posts: 637
@sTix

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

Seems to work ok. GREAT JOB!!!

   Report Go to top

Re: gcc 9 and 10
Just popping in
Joined:
2006/11/30 11:59
From Lund, Sweden
Posts: 161
@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.

   Report Go to top

Re: gcc 9 and 10
Just popping in
Joined:
2009/6/11 2:19
From Germany
Posts: 153
@sTix

also tried 10.3.0. Works fine! Thank you!!

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

   Report Go to top

Re: gcc 9 and 10
Home away from home
Joined:
2006/11/26 21:45
From a dying planet
Posts: 4194
@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
   Report Go to top

Re: gcc 9 and 10
Just popping in
Joined:
2006/11/30 11:59
From Lund, Sweden
Posts: 161
@IamSONIC
That's strange, I have no clue. I'll need to take a look.

@Raziel
What other switches aren't working?

   Report Go to top

Re: gcc 9 and 10
Home away from home
Joined:
2006/11/26 21:45
From a dying planet
Posts: 4194
@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
   Report Go to top

Re: gcc 9 and 10
Home away from home
Joined:
2006/11/26 21:45
From a dying planet
Posts: 4194
@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
   Report Go to top

Re: gcc 9 and 10
Site Builder
Joined:
2006/12/2 23:57
From Athens/Dublin
Posts: 911
@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.

   Report Go to top

Re: gcc 9 and 10
Just can't stay away
Joined:
2007/7/14 21:30
From Lothric
Posts: 1335
@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

   Report Go to top

Re: gcc 9 and 10
Site Builder
Joined:
2006/12/2 23:57
From Athens/Dublin
Posts: 911
@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.

   Report Go to top


« 1 ... 4 5 6 (7) 8 9 »



[Advanced Search]



Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project