-
Notifications
You must be signed in to change notification settings - Fork 267
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
gentables: only unset compiler flags if cross-compilation is detected #1479
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intention behind your change isn't clear.
I don't see how CMAKE_CROSSCOMPILING
could ever become true
. gentables must always be compiled for the host. It's invoked as a separate process, there is no knowing if the calling cmake process was cross compiling or not.
|
https://cmake.org/cmake/help/latest/variable/CMAKE_CROSSCOMPILING.html |
Lines 557 to 565 in de1daa4
As you can see, neither a toolchain file, nor
Why does this even matter? |
A build log checker, some tool that we run as part of our Debian packaging CI, detected and complained that parts of the code were not built with the hardening flags sets during packaging: https://salsa.debian.org/multimedia-team/fluidsynth/-/jobs/7012907 |
I would have appreciated it if this had been your very first comment for this PR, rather than presenting a solution without a problem. IMO, it is inappropriate to run such a tool on the entire Your proposed change is inappropriate as it doesn't work and actually breaks cross-compilation, see the Android CI ARM and AARCH64 pipelines. Because of that, I'm rejecting your PR. |
Alright, I have to admit that my patch was a bit half-baked, as in, well, broken. But, as a compromise, could we agree on a different approach maybe? If the user has the |
That wouldn't work either, because in a cross compilation scenario, IMO, the only way to handle this is to introduce yet another cmake variable which would allow you to specify CFLAGS for the host compiler, similar to The most straight forward way for you would be to create a patch that just removes all the I really hope that one day we'll start to make a first step towards C++11, which would allow these lookup tables to become |
Gretchenfrage: Why do you need to regenerate these tables during each compilation at all? Is there anything non-portable or non-constant about them? Why don't you just save the generated headers and keep the instructions around how to rebuild them if ever necessary? |
As long as the implementation behind those lookup tables doesn't change,
they are constant, hopefully identical for all architectures, and one might
version control them. However, I consider it wrong to version control
autogenerated files, just like I consider it wrong to version control any
kind of build artifacts. If I make a change to the underlying logic
anywhere in the code, I expect this change to take effect the next time I
compile the software, without having to worry about any additional manual
steps, which if not done, may silently fool myself.
IIRC, someone once reported an issue (either here on GH or via mailing
list) complaining about some tunes sounding detuned. It turned out that the
packager of fluidsynth he installed it from did in fact pre-generated those
tables. And just before that, we made a tiny change to the math behind the
lookup tables. They didn't regenerate the tables though, which had caused
the problem.
|
No description provided.