Closed Bug 678361 Opened 13 years ago Closed 13 years ago

Missing corner case from bug 655339

Categories

(Firefox Build System :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla8

People

(Reporter: espindola, Unassigned)

Details

Attachments

(1 file)

I tried doing a 32 bit only build on a 64 bit system by setting CC="gcc -arch i386" CXX="g++ -arch i386". That changes the value of $host, so the existing check for x86_64-apple-darwin fails.

The attached patch should fix it.
Attachment #552512 - Flags: review?(smichaud)
Comment on attachment 552512 [details] [diff] [review]
fix 32 bit builds on 64 bit OS X 10.7

Oops, I didn't realize $host would change in that case.

Your patch looks fine to me (and in fact corresponds to an earlier version of my patch).

Note that I'll have to change my workaround again to deal with MacPorts installing a 64-bit-only egrep in /opt/local/bin, then prepending that directory to $PATH.  See bug 655339 for more info.
Attachment #552512 - Flags: review?(smichaud) → review+
So can this be landed?
> So can this be landed?

Yes, I think so.
Thanks!
If we think it will be a long time for apple to ship a fixed grep, maybe the best check would be to actually trying a test string:

if [ grep "long string" file ]
then
  fixed_grep="grep"
else
  fixed_grep="arch -i386 grep"
fi
Thanks for the suggestion.

Though it might be better to make the else clause read:

else
  fixed_egrep="arch -arch i386 /usr/bin/egrep"
fi

That way we fall back to a known quantity (the broken egrep that Apple ships, which we know has a 32-bit binary, and whose 32-bit binary we know works).
We also that, even when/if Apple fixes their egrep, it'll always be a universal binary (with both x86_64 and i386 executables).
> We also that,

We also know that, ...
http://hg.mozilla.org/mozilla-central/rev/a7911fd8e779
Status: NEW → RESOLVED
Closed: 13 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: