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
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Does unit recompilation r...
by
Fred vS
[
Today
at 02:34:42 am]
Resolving procedure symbo...
by
TCH
[
Today
at 01:04:13 am]
Painting on a control - 3...
by
TRon
[
Today
at 01:04:09 am]
UK's Online Safety Act
by
Joanna from IRC
[
Today
at 12:24:54 am]
debugging code for te ACS...
by
dseligo
[January 22, 2025, 11:03:34 pm]
Run ffmpeg via TProcess
by
TRon
[January 22, 2025, 10:52:55 pm]
Lazarus Bugfix Release 3....
by
Martin_fr
[January 22, 2025, 10:41:06 pm]
Lazarus Release Candidate...
by
zeljko
[January 22, 2025, 09:56:24 pm]
Application.ProcessMessag...
by
dseligo
[January 22, 2025, 09:45:24 pm]
Minor Q: HowTo use 'Debug...
by
d7_2_laz
[January 22, 2025, 09:40:14 pm]
SDL3 Headers for FPC
by
Roland57
[January 22, 2025, 08:45:57 pm]
How C++ class multiple in...
by
Thaddy
[January 22, 2025, 07:55:26 pm]
Mormot2 and websocket cli...
by
BlueIcaro
[January 22, 2025, 07:25:35 pm]
Generic methods inside a ...
by
Zoran
[January 22, 2025, 06:44:00 pm]
crash db navigator with L...
by
calm_sea
[January 22, 2025, 06:04:33 pm]
Три вопроса новичка: OnPa...
by
majolika
[January 22, 2025, 05:30:20 pm]
Preparing FPC 3.2.4, poin...
by
BSaidus
[January 22, 2025, 04:19:20 pm]
Permuted index for RTL an...
by
Thaddy
[January 22, 2025, 03:52:14 pm]
My first "tool" written w...
by
TBMan
[January 22, 2025, 03:11:42 pm]
Select cell in listview /...
by
Jonny
[January 22, 2025, 02:34:09 pm]
How do you maintain your ...
by
Martin_fr
[January 22, 2025, 12:21:29 pm]
BGRA Controls
by
circular
[January 22, 2025, 11:10:43 am]
Generating a wrapper for ...
by
MarkMLl
[January 22, 2025, 11:02:42 am]
Generic function speciali...
by
Laurent92
[January 22, 2025, 10:33:25 am]
[Solved] SQL update state...
by
folkeu08
[January 22, 2025, 10:10:59 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] wich switches in options.init_settings does the -Os set? (Read 497 times)
Key-Real
Sr. Member
Posts: 372
[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
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
Logged
Demo Scene,
FlyTracker
,
FPC for PlayStation 1
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 »
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
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.
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