Add permit_weak_imports directive
Issue Homebrew/homebrew-core#3727 suggested we set -no_weak_imports for new versions of Xcode to ensure that e.g. building on 10.11 against the 10.12 SDK doesn't result in a situation where autotools thinks symbols exist that don't actually exist on the current platform. Further discussion in golang/go#16770 revealed that some packages require weak imports to build normally.
This commit is contained in:
		
							parent
							
								
									764390aadd
								
							
						
					
					
						commit
						9c7f24b84a
					
				@ -293,6 +293,8 @@ module SharedEnvExtension
 | 
			
		||||
 | 
			
		||||
  def permit_arch_flags; end
 | 
			
		||||
 | 
			
		||||
  def permit_weak_imports; end
 | 
			
		||||
 | 
			
		||||
  private
 | 
			
		||||
 | 
			
		||||
  def cc=(val)
 | 
			
		||||
 | 
			
		||||
@ -146,4 +146,8 @@ module Stdenv
 | 
			
		||||
 | 
			
		||||
    append "CFLAGS", "-I#{MacOS::X11.include}" unless MacOS::CLT.installed?
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def permit_weak_imports
 | 
			
		||||
    remove "LDFLAGS", "-Wl,-no_weak_imports"
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
@ -107,6 +107,10 @@ module Superenv
 | 
			
		||||
    ENV.x11 = MacOS::X11.installed?
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def permit_weak_imports
 | 
			
		||||
    remove "HOMEBREW_CCCFG", "w"
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  # These methods are no longer necessary under superenv, but are needed to
 | 
			
		||||
  # maintain an interface compatible with stdenv.
 | 
			
		||||
  alias_method :macosxsdk, :noop
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user