Closed Bug 818092 Opened 8 years ago Closed 8 years ago

$CC is not used properly when not cross-compiling

Categories

(Firefox Build System :: General, defect)

x86_64
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla20

People

(Reporter: glandium, Assigned: glandium)

Details

Attachments

(1 file)

See our universal build mozconfig, for instance, which defines this:
  CC="$CC -arch $TARGET_CPU"
  CXX="$CXX -arch $TARGET_CPU"

But when building without cross-compilation, here's what we do in build/autoconf/compiler-opts.m4:
  MOZ_PATH_PROGS(CC, $CC clang)

Essentially, this doesn't do what one might expect, and the result is the build happens with /usr/bin/clang instead. Which is not a huge problem in the clang -arch x86_64 case because running clang alone does the same, but it is a problem when you try to set CC to something else. Also, it doesn't match what we do on other platforms.
Comment on attachment 688290 [details] [diff] [review]
Properly use CC/CXX from mozconfig on non-cross-compile Mac builds

Review of attachment 688290 [details] [diff] [review]:
-----------------------------------------------------------------

This should obviate the need for the patch in bug 818061, right?
Attachment #688290 - Flags: review?(ted) → review+
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #2)
> This should obviate the need for the patch in bug 818061, right?

Most likely yes.
No, I'm wrong, because without that other patch if you try to use the universal mozconfig locally you'll still wind up with things like CC=" -arch i386".
http://hg.mozilla.org/mozilla-central/rev/008f2249f16d
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.