gcc 9 (was Re: Windows GUI for gcc toolchain) - General Discussion and Assistance - CHDK Forum  

gcc 9 (was Re: Windows GUI for gcc toolchain)

  • 18 Replies
  • 7330 Views
*

Offline Caefix

  • *****
  • 947
  • Sorry, busy deleting test shots...
gcc 9 (was Re: Windows GUI for gcc toolchain)
« on: 07 / November / 2020, 11:44:32 »
Advertisements
 :-[ Found & played with that:
https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads

Code: [Select]
\-> main.elf
   text    data     bss     dec     hex filename
  78228   43180    6800  128208   1f4d0 main.elf
main.elf \-> main.bin
<< Leaving ./platform/m100/sub/100a
>> Entering to ./loader/m100
entry.S \-> entry.o
main.c \-> main.o
blobs.S \-> blobs.o
\-> main.elf
../../build_rules.inc:58: recipe for target 'main.elf' failed
makefile_base.inc:107: recipe for target 'all-recursive' failed


d:/hostluaportable/chdk-shell/trunk/gcc931/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld.exe: --no-define-common may not be used without -shared
collect2.exe: error: ld returned 1 exit status
gmake[1]: *** [main.elf] Error 1
gmake: *** [all-recursive] Error 1
/usr/bin/sh: svnversion: command not found
Where to look next?  :-X
« Last Edit: 07 / November / 2020, 15:06:49 by reyalp »
All lifetime is a loan from eternity.

*

Offline reyalp

  • ******
  • 14119
Re: Re: Windows GUI for gcc toolchain
« Reply #1 on: 07 / November / 2020, 15:06:05 »
Where to look next?  :-X
The current build process supports gcc 3 through 5. If you want to build with a different compiler, it's up to you to understand the build process, the particular requirements of CHDK and the options for your chosen compiler. In any case, this has nothing to do with windows GUI, because suitable compilers are available in the first post.
Don't forget what the H stands for.

*

Offline Caefix

  • *****
  • 947
  • Sorry, busy deleting test shots...
Re: gcc 9 (was Re: Windows GUI for gcc toolchain)
« Reply #2 on: 09 / November / 2020, 13:47:34 »
 :xmas Option for "newer" cams, with the "newest" Compilerwarnings...
Cave   ...\CHDK-Shell\trunk\gcc493\arm-none-eabi\bin\ld*.*
Create ...\CHDK-Shell\trunk\gcc931
Copy   ...\gcc493\all in there, then folders from gcc931.zip all over that // ( \shared\ is doku )
Copy caved ld*.* over ...\CHDK-Shell\trunk\gcc931\arm-none-eabi\bin\ld*.*
Choose gcc931 for Digic 6-7
Compile & smile...
Code: [Select]
/*
A495, D10, G-15, Ix275, Ix300, SD30, Sx20, Sx50, ....
callfunc.S: Assembler messages:
callfunc.S:67: Error: selected processor does not support `blx R12' in ARM mode
gmake[2]: *** [.o/callfunc.o] Error 1
gmake[1]: *** [all-recursive] Error 1
gmake: *** [all-recursive] Error 1
*/
« Last Edit: 10 / November / 2020, 10:49:23 by Caefix »
All lifetime is a loan from eternity.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: gcc 9 (was Re: Windows GUI for gcc toolchain)
« Reply #3 on: 09 / November / 2020, 21:17:01 »
:xmas Option for "newer" cams, with the "newest" Compilerwarnings...
Cave   ...\CHDK-Shell\trunk\gcc493\arm-none-eabi\bin\ld*.*
Create ...\CHDK-Shell\trunk\gcc931
Copy   ...\gcc493\all in there, then folders from gcc931.zip all over that // ( \shared\ is doku )
Copy caved ld*.* over ...\CHDK-Shell\trunk\gcc931\arm-none-eabi\bin\ld*.*
Choose gcc931 for Digic 6-7
Compile & smile...
Code: [Select]
/*
A495, D10, G-15, Ix275, Ix300, SD30, Sx20, Sx50, ....
callfunc.S: Assembler messages:
callfunc.S:67: Error: selected processor does not support `blx R12' in ARM mode
gmake[2]: *** [.o/callfunc.o] Error 1
gmake[1]: *** [all-recursive] Error 1
gmake: *** [all-recursive] Error 1
*/


So instead of actually trying to fix the issue with the linker from GCC9, your solution is to bodge together a totally unsupported scenario by using the linker from GCC4 with the compiler from GCC9 ???


Seriously, if you want to help, learn how the process works and look for meaningful and useful solutions.


The linker fix for GCC9 is trivial - you only need to remove the '--no-define-common' option in the loader/makefile_loader.inc file.


And yes, you can build DIGIC 6 & 7 cameras with GCC9; but this is of no use to the auto build system and for anyone with multiple cameras it just makes things harder to be switching GCC version all the time.
Apart from a few compiler warnings that should be fixed, there is no advantage to using GCC9. It does not produce any better code - in fact the final CHDK size is slightly larger with GCC9 vs GCC5.


Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)


*

Offline Caefix

  • *****
  • 947
  • Sorry, busy deleting test shots...
Re: gcc 9 (was Re: Windows GUI for gcc toolchain)
« Reply #4 on: 10 / November / 2020, 10:47:51 »
 :D Thx, works too, should have done a global search...

Catching unk. issues is my intention, gcc621 seems the right spice for verbose Assembler...
Code: [Select]
Ix300
C:\DOKUME~1\I\LOKALE~1\Temp\cc2H4RlJ.s: Assembler messages:
C:\DOKUME~1\I\LOKALE~1\Temp\cc2H4RlJ.s:902: Error: selected processor does not support `blx R12' in ARM mode
C:\DOKUME~1\I\LOKALE~1\Temp\cc2H4RlJ.s:911: Error: selected processor does not support `blx R1' in ARM mode
C:\DOKUME~1\I\LOKALE~1\Temp\cc2H4RlJ.s:977: Error: selected processor does not support `blx R1' in ARM mode
gmake[1]: *** [boot.o] Error 1
gmake: *** [all-recursive] Error 1

Ix170
C:\DOKUME~1\I\LOKALE~1\Temp\cc7BUjpo.s: Assembler messages:
C:\DOKUME~1\I\LOKALE~1\Temp\cc7BUjpo.s:870: Error: selected processor does not support `blx R2' in ARM mode
C:\DOKUME~1\I\LOKALE~1\Temp\cc7BUjpo.s:892: Error: selected processor does not support `blx R1' in ARM mode
C:\DOKUME~1\I\LOKALE~1\Temp\cc7BUjpo.s:970: Error: selected processor does not support `blx R3' in ARM mode
C:\DOKUME~1\I\LOKALE~1\Temp\cc7BUjpo.s:999: Error: selected processor does not support `blx R12' in ARM mode
C:\DOKUME~1\I\LOKALE~1\Temp\cc7BUjpo.s:1011: Error: selected processor does not support `blx R12' in ARM mode
C:\DOKUME~1\I\LOKALE~1\Temp\cc7BUjpo.s:1023: Error: selected processor does not support `blx R12' in ARM mode
C:\DOKUME~1\I\LOKALE~1\Temp\cc7BUjpo.s:1041: Error: selected processor does not support `blx R3' in ARM mode
C:\DOKUME~1\I\LOKALE~1\Temp\cc7BUjpo.s:1203: Error: selected processor does not support `blx R3' in ARM mode
C:\DOKUME~1\I\LOKALE~1\Temp\cc7BUjpo.s:1261: Error: selected processor does not support `strd R2,[SP]' in ARM mode
C:\DOKUME~1\I\LOKALE~1\Temp\cc7BUjpo.s:1268: Error: selected processor does not support `strd R2,[SP]' in ARM mode
C:\DOKUME~1\I\LOKALE~1\Temp\cc7BUjpo.s:1275: Error: selected processor does not support `strd R2,[SP]' in ARM mode
gmake[1]: *** [capt_seq.o] Error 1
gmake: *** [all-recursive] Error 1
Havent tested all, but Ix265+275 compile fine.
All lifetime is a loan from eternity.

*

Offline Caefix

  • *****
  • 947
  • Sorry, busy deleting test shots...
Re: gcc 9 (was Re: Windows GUI for gcc toolchain)
« Reply #5 on: 17 / February / 2021, 15:58:37 »
 :-[ Strange news from this basecamp...
gcc 10 seems to have lost a feature that works until gcc 9.x
Code: [Select]
// tokenizer.h (any version)
 char  bug_since_gcc[10];
Quote
d:/hostluaportable/chdk-shell/trunk/gcc1021_host920/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: ../lib/ubasic/.o/libubasic.a(tokenizer.o):(.bss+0xd): multiple definition of `bug_since_gcc'; ../lib/ubasic/.o/libubasic.a(ubasic.o):(.bss+0x228): first defined here
collect2.exe: error: ld returned 1 exit status
gmake[1]: *** [.o/ubasic.flt] Error 1
gmake: *** [all-recursive] Error 1
:-X ixus izoom compiles fine until 9.x, but fails (no reaction) with 10.x
All lifetime is a loan from eternity.

*

Offline whim

  • ******
  • 2046
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: gcc 9 (was Re: Windows GUI for gcc toolchain)
« Reply #6 on: 18 / February / 2021, 05:00:06 »
@Caefix

Check this out for an explanation, and try:

Quote
extern char  bug_since_gcc[10];
for all 'char  bug_since_gcc[10];' declarations except 1


wim
PS: found by googling 'gcc linker multiple symbol definition'
« Last Edit: 18 / February / 2021, 05:26:52 by whim »

*

Offline Caefix

  • *****
  • 947
  • Sorry, busy deleting test shots...
Re: gcc 9 (was Re: Windows GUI for gcc toolchain)
« Reply #7 on: 18 / February / 2021, 14:27:25 »
 :) Thanks solved && added as an exercise a new feature to new ubasic.
https://forum.chdk-treff.de/viewtopic.php?f=7&t=3626#p32012

Left to avoid...
:-X ixus izoom compiles fine until 9.x, but fails (no reaction) with 10.x
Edit: Same with Ix900.
« Last Edit: 05 / March / 2021, 12:08:26 by Caefix »
All lifetime is a loan from eternity.


*

Offline Caefix

  • *****
  • 947
  • Sorry, busy deleting test shots...
Re: Windows GUI for gcc toolchain
« Reply #8 on: 20 / March / 2021, 16:57:48 »
 :( Yes...

Left to avoid...
:-X ixus izoom compiles fine until 9.x, but fails (no reaction) with 10.x
Edit: Same with Ix900.
All lifetime is a loan from eternity.

*

Offline reyalp

  • ******
  • 14119
Re: gcc 9 (was Re: Windows GUI for gcc toolchain)
« Reply #9 on: 20 / March / 2021, 18:50:55 »
The post above was moved from "Windows GUI for gcc toolchain" on request in mod report.

If you want to report a problem or get help with something, please explain in specific, simple terms what it is. Emojis and wordplay aren't helpful.

I guess you are saying gcc 10 doesn't work for vxworks cameras, as whim reported, but this is far from obvious from the contents of your post.
« Last Edit: 21 / March / 2021, 19:24:20 by reyalp »
Don't forget what the H stands for.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal