Warning: mysqli_real_connect(): Headers and client library minor version mismatch. Headers:50625 Library:50543 in /sites/rockbox.org/flyspray/adodb/drivers/adodb-mysqli.inc.php on line 108 FS#7832 : Building with gcc 4.5



FS#7832 - Building with gcc 4.5

Attached to Project: Rockbox
Opened by Nils Wallménius (nls) - Tuesday, 25 September 2007, 17:32 GMT
Last edited by Nils Wallménius (nls) - Wednesday, 12 January 2011, 23:12 GMT
Task Type Patches
Category Battery/Charging
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


These patches are changes I made to make rockbox build and work with gcc 4.3 and binutils 2.18+ for h300.

I have not built for any other targets than h300, Lear did build for h100 though but he had to remove some code in the core from iram to make it fit.

Building the latest gcc 4.3 snapshot for m68k-elf requires a current snapshot of binutils too, 2.18 won't work without patching gcc to disable new processor support.

configure.diff: Pass the correct -mcpu option to gcc.

linkscript.diff: Make linking of rockbox work correctly with binutils later than 2.17

pcfdriver.diff: Make asm blocks 'volatile' to make the buttons/rtc/batterylevel work

shndec.diff: remove 'volatile' from an asm block to make the flac codec build (this seems like a compiler bug)

tremor_*.diff build Tremor with -O2 to reduce code size and remove some floor0 type specific stuff from iram to make the iram section of the codec fit.
This task depends upon

Closed by  Nils Wallménius (nls)
Wednesday, 12 January 2011, 23:12 GMT
Reason for closing:  Accepted
Additional comments about closing:  comitted
Comment by MichaelGiacomelli (saratoga) - Saturday, 17 January 2009, 20:23 GMT
I tried using gcc 4.3.2 with binutils (because the 2.19 release has issues on arm and I was too lazy to dig for the patch for it). Unfortunately, I error out right away with "as: unrecognized option '-mcpu=arm7tdmi'"

Any ideas? I've applied the multilibs patch, and theres definitely a arm7tdmi folder in my gcc build.

Comment by Nils Wallménius (nls) - Sunday, 31 May 2009, 16:42 GMT
This was sort of abandoned for gcc 4.3 since it turned out there was a pretty bad bug
in it that would cause it to emit incorrect code that could not be assembled that is however fixed in 4.4
so it might be time to revisit this soon, anyway the pcfdriver patch has been comitted and hopefully the
patches removing tremor stuff from iram are no longer needed.

Michael, sorry fro the very late reply but others have been able to build with 4.4 for those arm7tdmi targets
so i would guess there's an issue with your setup.
Comment by Nils Wallménius (nls) - Sunday, 27 December 2009, 01:25 GMT
New patch, for building with gcc 4.4.2 / binutils 2.20
This replaces all the earlier patches and is the only thing needed to build coldfire targets with this toolchain (tested with h300 only for now)
codec benchmarks show both speedups and slowdowns, more tweaking of optimization settings is needed.
The patch fixes compilation of the shorten codec, libmad and libtremor with this new toolchain, the libmad problem
is caused by the inline asm in synth_full() using too many registers (the function should probably be written in asm entirely) and tremor gets too large to fit in iram.
I also included tuning of the optimization setting for flac, it gives a significant speedup. (and changes flac from slowdown to speedup)
Comment by Nils Wallménius (nls) - Monday, 27 December 2010, 10:06 GMT
New patches for building with gcc 4.5.2 / binutils 2.20.1

The tools patch adjusts configure and rockboxdev for the new toolchain.
the other patch tweaks the codec optimization settings for best performance when testing with the test_files

There are large speedups for aac and flac.
Small speedups for ac3, ape (mostly c1000), alac, atrac, cook, mpc
libmad is a little weird: mp3 is a little faster (3-5%), mp2 is ~10% faster but mp1 is 2-4% slower

vorbis is slowed down 0.5-2.5%
wma is slowed down 1-3.5%
Comment by Nils Wallménius (nls) - Friday, 07 January 2011, 18:56 GMT
Synced the tools patch.
To build the new toolchain on cygwin i had to install libiconv and g++ in addition to what the wiki page said.