Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
brew
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KMSCAKKSCFKA AKFACAMADCAS
brew
Commits
1bba5fd8
Commit
1bba5fd8
authored
9 years ago
by
Jack Nagel
Browse files
Options
Downloads
Patches
Plain Diff
Pass full match to warn_about_non_apple_gcc
parent
2d8c307a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Library/Homebrew/extend/ENV/shared.rb
+12
-13
12 additions, 13 deletions
Library/Homebrew/extend/ENV/shared.rb
Library/Homebrew/extend/ENV/std.rb
+1
-1
1 addition, 1 deletion
Library/Homebrew/extend/ENV/std.rb
Library/Homebrew/extend/ENV/super.rb
+1
-1
1 addition, 1 deletion
Library/Homebrew/extend/ENV/super.rb
with
14 additions
and
15 deletions
Library/Homebrew/extend/ENV/shared.rb
+
12
−
13
View file @
1bba5fd8
...
...
@@ -98,10 +98,10 @@ module SharedEnvExtension
def
compiler
@compiler
||=
if
(
cc
=
ARGV
.
cc
)
warn_about_non_apple_gcc
(
$
1
)
if
cc
=~
GNU_GCC_REGEXP
warn_about_non_apple_gcc
(
$
&
)
if
cc
=~
GNU_GCC_REGEXP
fetch_compiler
(
cc
,
"--cc"
)
elsif
(
cc
=
homebrew_cc
)
warn_about_non_apple_gcc
(
$
1
)
if
cc
=~
GNU_GCC_REGEXP
warn_about_non_apple_gcc
(
$
&
)
if
cc
=~
GNU_GCC_REGEXP
compiler
=
fetch_compiler
(
cc
,
"HOMEBREW_CC"
)
if
@formula
...
...
@@ -188,14 +188,13 @@ module SharedEnvExtension
append
"LDFLAGS"
,
"-B
#{
ld64
.
bin
}
/"
end
def
gcc_version_formula
(
version
)
gcc_name
=
"gcc-
#{
version
}
"
def
gcc_version_formula
(
name
)
version
=
name
[
GNU_GCC_REGEXP
,
1
]
gcc_version_name
=
"gcc
#{
version
.
delete
(
'.'
)
}
"
gcc_path
=
HOMEBREW_PREFIX
.
join
"opt
/gcc/bin/
#{
gcc_
name
}
"
gcc_path
=
HOMEBREW_PREFIX
.
join
(
"opt
"
,
"gcc"
,
"bin"
,
name
)
gcc_formula
=
Formulary
.
factory
"gcc"
gcc_versions_path
=
\
HOMEBREW_PREFIX
.
join
"opt/
#{
gcc_version_name
}
/bin/
#{
gcc_name
}
"
gcc_versions_path
=
HOMEBREW_PREFIX
.
join
(
"opt"
,
gcc_version_name
,
"bin"
,
name
)
if
gcc_path
.
exist?
gcc_formula
...
...
@@ -210,11 +209,11 @@ module SharedEnvExtension
end
end
def
warn_about_non_apple_gcc
(
gcc
)
gcc_
name
=
'gcc'
+
gcc
.
delete
(
'.'
)
def
warn_about_non_apple_gcc
(
name
)
gcc_
version_name
=
name
.
delete
(
".-"
)
begin
gcc_formula
=
gcc_version_formula
(
gcc
)
gcc_formula
=
gcc_version_formula
(
name
)
if
gcc_formula
.
name
==
"gcc"
return
if
gcc_formula
.
opt_prefix
.
exist?
raise
<<-
EOS
.
undent
...
...
@@ -226,15 +225,15 @@ module SharedEnvExtension
if
!
gcc_formula
.
opt_prefix
.
exist?
raise
<<-
EOS
.
undent
The requested Homebrew GCC,
#{
gcc_name
}
, was not installed.
The requested Homebrew GCC,
#{
gcc_
version_
name
}
, was not installed.
You must:
brew tap homebrew/versions
brew install
#{
gcc_name
}
brew install
#{
gcc_
version_
name
}
EOS
end
rescue
FormulaUnavailableError
raise
<<-
EOS
.
undent
Homebrew GCC requested, but formula
#{
gcc_name
}
not found!
Homebrew GCC requested, but formula
#{
gcc_
version_
name
}
not found!
You may need to: brew tap homebrew/versions
EOS
end
...
...
This diff is collapsed.
Click to expand it.
Library/Homebrew/extend/ENV/std.rb
+
1
−
1
View file @
1bba5fd8
...
...
@@ -56,7 +56,7 @@ module Stdenv
send
(
compiler
)
if
cc
=~
GNU_GCC_REGEXP
gcc_formula
=
gcc_version_formula
(
$
1
)
gcc_formula
=
gcc_version_formula
(
$
&
)
append_path
"PATH"
,
gcc_formula
.
opt_bin
.
to_s
end
...
...
This diff is collapsed.
Click to expand it.
Library/Homebrew/extend/ENV/super.rb
+
1
−
1
View file @
1bba5fd8
...
...
@@ -125,7 +125,7 @@ module Superenv
end
paths
<<
apple_gcc42
.
opt_bin
.
to_s
if
apple_gcc42
when
GNU_GCC_REGEXP
gcc_formula
=
gcc_version_formula
(
$
1
)
gcc_formula
=
gcc_version_formula
(
$
&
)
paths
<<
gcc_formula
.
opt_bin
.
to_s
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment