Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot configure cross-compiler options #13

Closed
michaliskambi opened this issue Apr 5, 2017 · 4 comments
Closed

Cannot configure cross-compiler options #13

michaliskambi opened this issue Apr 5, 2017 · 4 comments

Comments

@michaliskambi
Copy link
Contributor

There are many ways to nicely configure the compilation of base FPC, but there seems to be no way to change the compilation options used for cross-compiling. After some testing (and playing around with source code), I think that the cross-compilation options are just hardcoded in fpcupdeluxemainform.pas?

E.g. for Android/ARM the fpcupdeluxemainform.pas in TForm1.Button5Click sets (before my change in #10 ):

FPCupManager.FPCOPT:='-dFPC_ARMHF ';
FPCupManager.CrossOPT:='-CpARMV7A -CfVFPV3 -OoFASTMATH -CaEABIHF ';

I have not found a way to customize it. (Except editing the source code, of course:) I don't see an appropriate option in the GUI.

Although I have a settings.ini file, but the cross-compilations options inside seem to be ignored. E.g. it doesn't matter what do I put as crossopt inside the section [android].

@LongDirtyAnimAlf
Copy link
Owner

The arm cross-compiler is used by Linux and Android.
Linux needs FPC_ARMHF.
Therefor this is also enabled for Android, otherwise, building cross-Android after cross-Linux will overwrite the previous cross-compiler with a non-ARMHF compiler.
The -OoFASTMATH -CaEABIHF options are removed for Android.

@michaliskambi
Copy link
Contributor Author

Thank you! But your comments here apply to #10 :)

This issue is a feature requests to have some way (either from GUI or an ini file) to allow user to always adjust the cross-compilation options. I'm sorry, I see that I wasn't clear about what do I want in my issue description.

Even if the defaults in fpcupdeluxe are perfect for us, it seems reasonable to allow user to configure them anyway:) Just like the parameters for non-cross FPC can be configured right now.

If this sounds OK to you, I would happily work on it, and submit a pull request:)

@LongDirtyAnimAlf
Copy link
Owner

Added cross build options.
a2655c1

@michaliskambi
Copy link
Contributor Author

Thank you!

I just tried it, and it works great. I will have a little fix, but I'll submit it as a separate pull request :)

I see that you also added a lot more options for building cross-compilers, and you added "Auto-update compilers", this is very great! Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants