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

Changing Release compiler options #5

Open
wgs777 opened this issue May 30, 2022 · 9 comments
Open

Changing Release compiler options #5

wgs777 opened this issue May 30, 2022 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@wgs777
Copy link

wgs777 commented May 30, 2022

I would like to change the Release compiler options for the 4 external packages to gcc -O3 -march=native.

I've spent some time reviewing the CMake files. It appears to only use this for releases:

CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG

Is there a clean way (at the highest level) to set all compile options for all packages to: gcc -O3 -march=native?

Thanks

@wrljet
Copy link
Member

wrljet commented May 30, 2022

I will address this one.

Bill

@wrljet wrljet self-assigned this May 30, 2022
@wgs777
Copy link
Author

wgs777 commented Jun 28, 2022

Hi - If possible, please provide an update on this one. Thanks.

@wrljet
Copy link
Member

wrljet commented Jun 28, 2022

Been involved in other things and didn't want to switch gears and then loose my train of thought.
So nothing has been done on this issue, yet;.

Bill

@wgs777
Copy link
Author

wgs777 commented Jul 12, 2022 via email

@wrljet
Copy link
Member

wrljet commented Jul 12, 2022

Bill,

If you care to try my Hercules-Helper project, used to make building SDL-Hercules easier on many different systems, it now supports passing options to CMake for the external packages build.

Uncomment the last line in example hercules-helper.conf. This will use -O3 compiler option.

Just FYI... I have not changed anything in the SDL-Hercules for this (yet). Hercules-Helper does not use the
gists build scheme for the external packages. I call CMake directly for each of the extpkgs, which makes this easier.

Let me know if it doesn't work for you.

I will be enhancing the gists approach as well, but that is more involved and will take a while.

Bill

@wrljet wrljet added the enhancement New feature or request label Jul 14, 2022
@wgs777
Copy link
Author

wgs777 commented Sep 6, 2022

Hi Bill,

Thank you again for your time on this, and sorry for my delay in responding. The Hercules Helper is an interesting approach and I can still use that if needed.

I have one question on the original gists project (without using Hercules Helper):

In the original gists project's make files, if I just want to re-use the original compile variable names, with just changing -O2 to -O3 -march=native in the make files(s), would you know which make file or config file should I make that change to, so that the -O3 -march=native propagates down to all the builds under gists project?

@wrljet
Copy link
Member

wrljet commented Sep 6, 2022

I have one question on the original gists project (without using Hercules Helper):

In the original gists project's make files, if I just want to re-use the original compile variable names, with just changing -O2 to -O3 -march=native in the make files(s), would you know which make file or config file should I make that change to, so that the -O3 -march=native propagates down to all the builds under gists project?

As-is, as far as I know, no, that is not possible just by setting one thing at a high level.

You could edit the four {crypto,decNumber,SoftFloat,telnet}/build scripts after you clone the repos and
adjust the compiler switches where CMake is called in do_configure(). Adding something along the lines
of -D CMAKE_C_FLAGS_RELWITHDEBINFO=\"-O3 -march=native -g\" to the command line.

Keep in mind any time you change those things, you'll probably need to destroy the existing CMakeCache.txt
in the build directories. I'm not sure of those command line options will override the cached values or not.

Bill

@wgs777
Copy link
Author

wgs777 commented Sep 15, 2022 via email

@wgs777
Copy link
Author

wgs777 commented Oct 11, 2022 via email

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

No branches or pull requests

2 participants