Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Free Pascal
»
FPC development
(Moderators:
FPK
,
Tomas Hajny
) »
[SOLVED] wich switches in options.init_settings does the -Os set?
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
WIKI Maintenance
Our wiki is currently undergoing maintenance. Courtesy of Tony a mirror is available
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] wich switches in options.init_settings does the -Os set? (Read 990 times)
Key-Real
Sr. Member
Posts: 413
[SOLVED] wich switches in options.init_settings does the -Os set?
«
on:
October 02, 2024, 03:45:39 pm »
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
»
Logged
Demo Scene
,
FlyTracker
,
FPC for PlayStation 1
,
my Repos
Key-Real
Sr. Member
Posts: 413
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
Logged
Demo Scene
,
FlyTracker
,
FPC for PlayStation 1
,
my Repos
TRon
Hero Member
Posts: 4377
Re: [SOLVED] wich switches in options.init_settings does the -Os set?
«
Reply #2 on:
October 02, 2024, 06:01:40 pm »
Quote from: Key-Real on October 02, 2024, 03:45:39 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).
Logged
Today is tomorrow's yesterday.
ccrause
Hero Member
Posts: 1121
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.
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Free Pascal
»
FPC development
(Moderators:
FPK
,
Tomas Hajny
) »
[SOLVED] wich switches in options.init_settings does the -Os set?
TinyPortal
© 2005-2018