Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

hyperscan: leave -march=native to the build system #49876

Closed
wants to merge 1 commit into from

Conversation

ilovezfs
Copy link
Contributor

@ilovezfs ilovezfs commented Mar 8, 2016

The default is -march=native but explicitly setting it can cause build failure. In particular, --build-from-source fails on iMac with :skylake.

Here's are the gist-logs showing the failure case:
https://gist.github.com/5357e306bfcc0e702730

And here's how a successful build looks with this PR in place:
https://gist.github.com/ilovezfs/1d0f2aa32c7bfff0d971

Note that -march=native is indeed used as part of the default when HOMEBREW_OPTFLAGS is deleted.

The default is -march=native but explicitly setting it can cause build
failure. In particular, --build-from-source fails on iMac with :skylake.
@MikeMcQuaid
Copy link
Member

Can you report this upstream? Feels weird that us setting us breaks things.

@ilovezfs
Copy link
Contributor Author

ilovezfs commented Mar 8, 2016

@MikeMcQuaid Ah it was actually ENV tricking me. Calling "make" refurbishes the args, so it's stripping

stripped: 
-O3
-Wall
-Wextra
-Wshadow
-Wcast-qual
-Werror
-march=native
-mtune=native
-Wvla
-Wpointer-arith
-Wstrict-prototypes
-Wmissing-prototypes

So with the patch in the PR, I can still make it fail by running system "xcrun", "make", "install"

That makes more sense now! I will report it to upstream as a problem with -march=native itself and this particular hardware.

@ilovezfs ilovezfs closed this Mar 8, 2016
@ilovezfs ilovezfs deleted the hyperscan-optflags branch March 8, 2016 17:53
@ilovezfs
Copy link
Contributor Author

ilovezfs commented Mar 9, 2016

@MikeMcQuaid FYI upstream was able to replicate the issue using clang-3.6 on Linux on a Core i5-6600K (intel/hyperscan#15 (comment)), but I have now closed the upstream issue: intel/hyperscan#15 (comment)

Using Xcode 7.3 (beta 5) fixes the problem, so this should take care of itself shortly.

Is there any way to specify in the formula that certain architectures (Skylake is affected, Ivy Bridge is not, and I'm not sure about Haswell and Broadwell) will require at least Clang 7.3 build 703 but will fail with Clang 7.0 build 700 and below? Or is it just not worth it to bother since eventually everyone will be on >= Xcode 7.3?

@MikeMcQuaid
Copy link
Member

@ilovezfs I'm OK with merging a fix until upstream merge a patch or Xcode 7.3 has been released?

@Homebrew Homebrew locked and limited conversation to collaborators Jul 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants