Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: Bumping arm and m68k toolchains to gcc 4.9.4

Re: Bumping arm and m68k toolchains to gcc 4.9.4

From: Solomon Peachy via rockbox-dev <rockbox-dev_at_cool.haxx.se>
Date: Wed, 8 Apr 2020 09:18:56 -0400

On Wed, Apr 08, 2020 at 02:27:02PM +0200, Nils Wallménius wrote:
> Hi, been away from rb for a couple of years but one thing that might be
> worthwhile is to "re tune" the compiler flags for the codecs when changing
> toolchain. Basically just build the whole bunch with O[123] and run the
> test files through test_codec for each arc. Of course it's not necessary up
> front but would make it fairly easy to spot serious perf regressions and to
> get any benefits from better optimizers.

Oh, cleaning up the compiler flags is definitely on my to-do list, but I
lack access to a sufficiently diverse set of targets to do much
benchmarking (or much general testing) myself.

As part of the WIP toolchain patch in gerrit [1], I changed the global
CFLAGS to include "-Os -Wall -Wextra -funit-at-a-time", and have been
fixing up the warnings that have come up. Some of these turned out to be
very real bugs.

Meanwhile, the CODECs (and a few of the plugins [2]) are the only things
remaining that override the global optimization flags, but the
bootloaders tend to force -Os for obvious reasons. There are also
plugins that blanket-disable all warnings [3].

IMO we should use -Os for everything, and only use -O2 or -O3 if
benchmarks show a tangible benefit (and the code still fits, obviously).
If -Os causes problems then we should disable the specific problematic
optimizations rather than downgrade to -O1 or -O0.

  [1] http://gerrit.rockbox.org/r/#/c/2305/
  [2] SDL and xzbox, notably, though several others force -Os already
  [3] SDL and puzzles. I have a WIP patch trying to clean up SDL too [4]
  [4] http://gerrit.rockbox.org/r/#/c/2324/

> Glad to see people still working on it.

...Suffice it to say I could really use some help getting this done.

 - Solomon

-- 
Solomon Peachy			       pizza at shaftnet dot org
High Springs, FL                          ^^ (email/xmpp) ^^
Quidquid latine dictum sit, altum videtur.

Received on 2020-04-08

Page was last modified "Jan 10 2012" The Rockbox Crew
aaa