Skip to content

Don't reject -L/usr/local/lib when SDKROOT is defined#845

Merged
tdsmith merged 1 commit intoHomebrew:masterfrom
tdsmith:usr-local-sdkroot
Sep 3, 2016
Merged

Don't reject -L/usr/local/lib when SDKROOT is defined#845
tdsmith merged 1 commit intoHomebrew:masterfrom
tdsmith:usr-local-sdkroot

Conversation

@tdsmith
Copy link
Copy Markdown
Contributor

@tdsmith tdsmith commented Sep 1, 2016

/usr/local/lib is removed from the default linker search path when
SDKROOT is defined or sysroot is specified.

Homebrew sometimes sets SDKROOT without setting a sysroot as of 45e138f.

This is the simplest possible change, but there are some other options:

  • Modify effective_sysroot so that HOMEBREW_SDKROOT gets set identically; maybe @ilovezfs knows why this wasn't done originally?
  • Add an additional accessor for SDKROOT
  • ?

Fixes #844.

/usr/local/lib is removed from the default linker search path when
SDKROOT is defined or sysroot is specified.

Homebrew sometimes sets SDKROOT without setting a sysroot as of 45e138f.
@tdsmith tdsmith added the in progress Maintainers are working on this label Sep 1, 2016
@MikeMcQuaid
Copy link
Copy Markdown
Member

Seems reasonable to me but I don't see any reference to the prefix in this or the referenced commit but this seems to only relate to a non-standard prefix, right? It feels like this is something that should vary depending on the prefix as /usr/local/lib is a system prefix now but we want it filtered if that's the HOMEBREW_PREFIX.

@tdsmith
Copy link
Copy Markdown
Contributor Author

tdsmith commented Sep 1, 2016

It looks like that case is handled elsewhere; refurbish_args rejects linker search paths that are present in library_paths or system_library_paths and HOMEBREW_PREFIX/lib is added to library_paths by superenv.

@tdsmith tdsmith merged commit d39eeac into Homebrew:master Sep 3, 2016
@tdsmith tdsmith deleted the usr-local-sdkroot branch September 3, 2016 00:55
@tdsmith tdsmith removed the in progress Maintainers are working on this label Sep 3, 2016
@MikeMcQuaid
Copy link
Copy Markdown
Member

refurbish_args rejects linker search paths that are present in library_paths or system_library_paths and HOMEBREW_PREFIX/lib is added to library_paths by superenv.

👍

@ilovezfs
Copy link
Copy Markdown
Contributor

ilovezfs commented Sep 3, 2016

I'm still not clear why /usr/local is being hard coded here. By default there's nothing there, so how is it a "special" path?

@MikeMcQuaid
Copy link
Copy Markdown
Member

@ilovezfs Probably because it's in the default search path for Clang.

@ilovezfs
Copy link
Copy Markdown
Contributor

ilovezfs commented Sep 3, 2016

Ah ok

@Homebrew Homebrew locked and limited conversation to collaborators May 3, 2018
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.

3 participants