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
Search
Advanced search
Recent
IStringList...
by
d2010
[
Today
at 07:37:11 am]
What's wrong with my appl...
by
cdbc
[
Today
at 06:41:03 am]
AdvancedHTTPServer: A Go-...
by
egsuh
[
Today
at 06:25:59 am]
Unit decfloat
by
srvaldez
[
Today
at 12:14:43 am]
Access violation during d...
by
Martin_fr
[January 19, 2026, 08:02:11 pm]
Adjacent rectangles not a...
by
jamie
[January 19, 2026, 06:21:09 pm]
Developing FreePascal on ...
by
HKPhysicist
[January 19, 2026, 03:53:13 pm]
Cross Compile for Dos on ...
by
andersonscinfo
[January 19, 2026, 03:49:40 pm]
Very simple Style Manager...
by
zamtmn
[January 19, 2026, 02:53:11 pm]
Assigning firebird file n...
by
egsuh
[January 19, 2026, 10:18:22 am]
Strings in Free Pascal: I...
by
Thaddy
[January 19, 2026, 07:43:13 am]
Postgres, ZEOS and Visual...
by
Thaddy
[January 19, 2026, 07:00:03 am]
Feature announcement: Fun...
by
Thaddy
[January 19, 2026, 06:55:15 am]
[SOLVED] Strange behavior...
by
jamie
[January 19, 2026, 12:08:12 am]
ThemeServices.OnThemeChan...
by
sgj
[January 18, 2026, 10:37:32 pm]
AVRPascal – free code edi...
by
ackarwow
[January 18, 2026, 10:18:12 pm]
help implementing frexp
by
srvaldez
[January 18, 2026, 09:25:07 pm]
my implementation of frex...
by
srvaldez
[January 18, 2026, 06:27:39 pm]
Rolling releases Lazarus[...
by
Martin_fr
[January 18, 2026, 04:37:42 pm]
Question about optimizer ...
by
PascalDragon
[January 18, 2026, 04:01:54 pm]
How to set the Excel cell...
by
dodgex
[January 18, 2026, 02:06:25 pm]
PeaZip project turns 20 t...
by
JanRoza
[January 18, 2026, 01:57:46 pm]
How to implement multiple...
by
bills
[January 18, 2026, 01:26:29 pm]
RPNCalc in Lazarus
by
jwdietrich
[January 18, 2026, 12:13:43 pm]
Is this Pascal Compiler t...
by
HKPhysicist
[January 18, 2026, 11:11:59 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] wich switches in options.init_settings does the -Os set? (Read 848 times)
Key-Real
Sr. Member
Posts: 395
[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: 395
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: 1087
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