Bug 775405 - Fix build for OS X v10.7 when MacPorts' non-universal egrep is on $PATH before Apple's egrep. r=ted

This commit is contained in:
Adam Rosenfield 2012-07-19 21:08:39 -04:00
parent 0fe5380dd1
commit 81fe14b6ce

View File

@ -8674,14 +8674,16 @@ xpcom/xpcom-config.h
xpcom/xpcom-private.h
)
# Hack around an Apple bug that effects the egrep that comes with OS X 10.7.
# "arch -arch i386 egrep" always uses the 32-bit Intel part of the egrep fat
# binary, even on 64-bit systems. We (apparently) only need this hack when
# egrep's "pattern" is particularly long (as in the following code).
# See bug 655339.
# Hack around an Apple bug that affects the egrep that comes with OS X 10.7.
# "env ARCHPREFERENCE=i386,x86_64 arch egrep" first tries to use the 32-bit
# Intel part of the egrep fat binary, even on 64-bit systems, and falls back on
# the 64-bit part if it's not a fat binary, as can happen with MacPorts. We
# (apparently) only need this hack when egrep's "pattern" is particularly long
# (as in the following code) and the first egrep on our $PATH is Apple's. See
# bug 655339.
case "$host" in
*-apple-darwin11*)
FIXED_EGREP="arch -arch i386 egrep"
FIXED_EGREP="env ARCHPREFERENCE=i386,x86_64 arch egrep"
;;
*)
FIXED_EGREP="egrep"