Recent

Author Topic: [SOLVED] wich switches in options.init_settings does the -Os set?  (Read 497 times)

Key-Real

  • Sr. Member
  • ****
  • Posts: 372
I'm trying to optimize for size.

With the -Os option the produced executable is segnificant smaller, but don't runs.

Have to trace out a switch dodn't work!

Pls provide all the setting -Os do
« Last Edit: October 02, 2024, 05:34:31 pm by Key-Real »

Key-Real

  • Sr. Member
  • ****
  • Posts: 372
Re: wich switches in options.init_settings does the -Os set?
« Reply #1 on: October 02, 2024, 05:34:14 pm »
ah, ok,

it containts level1 and 2 and so on.... and a bunch of others

TRon

  • Hero Member
  • *****
  • Posts: 3810
Re: [SOLVED] wich switches in options.init_settings does the -Os set?
« Reply #2 on: October 02, 2024, 06:01:40 pm »
With the -Os option the produced executable is segnificant smaller, but don't runs.
The different optimization levels might cause the compiler to produce code that doesn't run which is especially true for processors that do not get (too) much attention.

You would have to do this on a case by case base and try to determine what kind of code produces 'faulty' code. So you might want to have a closer look at the produces assembler code and decipher that in order to learn why it fails. If you are able to determine the cause then it is possible to file a (complete) report so that a devs is able to address it (or perhaps you are able to figure out yourself what the compiler is doing wrong and suggest/create a patch).
I do not have to remember anything anymore thanks to total-recall.

ccrause

  • Hero Member
  • *****
  • Posts: 989
Re: [SOLVED] wich switches in options.init_settings does the -Os set?
« Reply #3 on: October 02, 2024, 06:43:14 pm »
-Os includes cs_opt_size in optimizerswitches.  Searching for cs_opt_size in the compiler source should show all the relevant code.

 

TinyPortal © 2005-2018