Last Comment Bug 818092 - $CC is not used properly when not cross-compiling
: $CC is not used properly when not cross-compiling
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: unspecified
: x86_64 Mac OS X
: -- normal (vote)
: mozilla20
Assigned To: Mike Hommey [:glandium]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-04 09:01 PST by Mike Hommey [:glandium]
Modified: 2012-12-06 08:08 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Properly use CC/CXX from mozconfig on non-cross-compile Mac builds (2.17 KB, patch)
2012-12-04 09:03 PST, Mike Hommey [:glandium]
ted: review+
Details | Diff | Review

Description Mike Hommey [:glandium] 2012-12-04 09:01:23 PST
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 1 Mike Hommey [:glandium] 2012-12-04 09:03:37 PST
Created attachment 688290 [details] [diff] [review]
Properly use CC/CXX from mozconfig on non-cross-compile Mac builds
Comment 2 Ted Mielczarek [:ted.mielczarek] 2012-12-05 05:13:53 PST
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?
Comment 3 Mike Hommey [:glandium] 2012-12-05 05:33:28 PST
(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.
Comment 4 Ted Mielczarek [:ted.mielczarek] 2012-12-05 06:29:20 PST
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".
Comment 5 Mike Hommey [:glandium] 2012-12-06 08:08:57 PST
http://hg.mozilla.org/mozilla-central/rev/008f2249f16d

Note You need to log in before you can comment on or make changes to this bug.