-
Notifications
You must be signed in to change notification settings - Fork 28
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
Clean arch-dependent guessing, allow cross-compile #36
Comments
I don't quite get what you're asking, but if you are cross-compiling, you are going to need to look into "CMake toolchains". I outlined an example of how cross-compiling works here: https://docs.zeek.org/en/latest/install/cross-compiling.html i.e. I think the SSE2 availability check isn't the real problem if you have not actually set up the right cross-compilation tool chain. |
I am just saying that if (USE_SSE2)
add_definitions(-DBROKER_USE_SSE2 -msse2)
endif () where USE_SSE2 is conditional set by the environment (as opposed to guessed from the hardware). Since you mentioned that this may actually be not used anymore, I was wondering if this whole block can be dropped at some point. |
But CMake should understand the difference between build and target hosts if you use a CMake toolchain file like I pointed out?
Then we'd need such conditions for every platform-specific test? e.g. like also for endianness as you pointed out. CMake toolchains should be helping for this cross-compiling issue more generally -- so we don't need a special flag/condition that users may need to set for every platform-specific feature test. Example for this specific case: if you have a cross-compilation toolchain and point CMake to use it, then that SSE2 TEST should correctly fail if
It's not used at the moment because there has not been a performance measurement to judge whether this optimization is worthwhile: If it is, then we would bring back the code which makes use of SSE2 anyway. |
I have been struggling with getting bro (i.e. zeek) package updated in Gentoo and a random issue caught my eye: use of -msse2 CFLAG. I looked around and it seems part of broker starting at around https://github.com/zeek/broker/blob/master/CMakeLists.txt#L378 :
Especially when part of another build (zeek) that makes quite a headache....
It was mentioned in zeek/zeek#249 (comment) that "that code isn't actually used at run-time anymore in latest versions of Bro 2.6.x.", may be this can just be purged?
Packaging software, e.g. in Gentoo, a source-based bistro, means that often flexibility such as choosing the target hardware is needed and used.
The text was updated successfully, but these errors were encountered: