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

hardware: tweak macOS CFLAGS. #5435

Merged
merged 1 commit into from Dec 22, 2018

Conversation

Projects
None yet
4 participants
@MikeMcQuaid
Copy link
Member

MikeMcQuaid commented Dec 22, 2018

  • High Sierra and Sierra support Penryn CPUs.

  • -march implies the relevant -msse* flags.

  • Have you followed the guidelines in our Contributing document?

  • Have you checked to ensure there aren't other open Pull Requests for the same change?

  • Have you added an explanation of what your changes do and why you'd like us to include them?

  • Have you written new tests for your changes? Here's an example.

  • Have you successfully run brew style with your changes locally?

  • Have you successfully run brew tests with your changes locally?


hardware: tweak macOS CFLAGS.
- High Sierra and Sierra support Penryn CPUs.
- `-march` implies the relevant `-msse*` flags.
@claui

This comment has been minimized.

Copy link
Member

claui commented Dec 22, 2018

@sjackman Just so I understand your earlier comment better:

Does -march=nehalem also enable -msse4.2 by default?

Answer: no. You need to specify -march=nehalem -msse4.2. See the output of…

I can’t reproduce that. The following is what I get

  • without -msse4.2:
  -msse4.2                    		[enabled]
  • with -msse4.2:
  -msse4.2                    		[enabled]

Note that I had to modify your command line and use /usr/local/opt/gcc/bin/gcc-8 instead of gcc lest I’d get a clang: error: unsupported option '--help=target'.

The above output appears to suggest that -march=nehalem -msse4.2 is really redundant.

What did I miss?

@MikeMcQuaid

This comment has been minimized.

Copy link
Member

MikeMcQuaid commented Dec 22, 2018

@claui does this behaviour perhaps vary between clang and gcc? If not maybe a holdover from old gcc versions.

@MikeMcQuaid MikeMcQuaid merged commit 4f571be into Homebrew:master Dec 22, 2018

2 of 3 checks passed

codecov/patch 0% of diff hit (target 71.12%)
Details
codecov/project 71.08% (-0.03%) compared to c4c1830
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@MikeMcQuaid MikeMcQuaid deleted the MikeMcQuaid:macos-cflags-tweaks branch Dec 22, 2018

@claui

This comment has been minimized.

Copy link
Member

claui commented Dec 22, 2018

Thanks @MikeMcQuaid for merging this! This restores compatibility for Sierra and HS bottles, yet keeps Mojave bottles as fast as it gets.

@sjackman

This comment has been minimized.

Copy link
Contributor

sjackman commented Dec 22, 2018

Starting with GCC 7 -march=nehalem implies the other appropriate -msse* flags. We're using GCC 5 to build bottles for Linuxbrew (ships with Ubuntu 16.04 LTS) where I saw the above mentioned behaviour.

@fxcoudert

This comment has been minimized.

Copy link
Member

fxcoudert commented on a2f93fe Jan 8, 2019

-march=penryn is not supported by GCC yet, which causes this error: #5502

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment