Closed Bug 787931 Opened 13 years ago Closed 13 years ago

update the default compiler on OS X because we can't build with gcc 4.2 any longer

Categories

(Firefox Build System :: General, defect)

x86_64
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla18

People

(Reporter: jfkthame, Assigned: espindola)

References

Details

(Keywords: dev-doc-needed)

Attachments

(1 file, 2 obsolete files)

The build system chooses gcc-4.2 by default as the preferred compiler on OS X: http://mxr.mozilla.org/mozilla-central/source/build/autoconf/compiler-opts.m4#37 However, mozilla-central no longer compiles with gcc-4.2. According to bug 784029, at least, this is a deliberate decision. So we should change the default compiler to one that actually works. (IMO, this should've been done *before* pushing known gcc-4.2-breaking code into the tree.)
Assignee: nobody → respindola
(In reply to Jonathan Kew (:jfkthame) from comment #0) > (IMO, this should've been done *before* pushing known gcc-4.2-breaking code > into the tree.) Yes, I'm losing time because of this because I can't even compile clang from trunk ATM :(
(In reply to Benoit Girard (:BenWa) from comment #3) > Yes, I'm losing time because of this because I can't even compile clang from > trunk ATM :( BenWa fwiw, I have a copy of clang r161152 http://tooltool.pub.build.mozilla.org/temp-sm-stuff/sha512/708bf18f40edd46517c6368b6b5ad5cd05904d3c60614cdb483248e035cdca0fc905f0e72e90d94de9dccaa18270aadfe07987ab95adcc0c6bb4ce51aa292623 Its truely a .tar.bz2 file compiled for mac and should unblock you short-term. Note this dir is explicitly *temporary* and could go away at any time.
Thanks, I downloaded it. For the record here's the error I got. Probably not worth investigating since I didn't follow any particular instruction other then building trunk then tried to build with 'svn update -r 161152': /Users/bgirard/ben/clang/llvm/tools/llvm-ranlib/llvm-ranlib.cpp:84:53: error: too many arguments to function call, expected 3, have 4
Comment on attachment 659694 [details] [diff] [review] patch Review of attachment 659694 [details] [diff] [review]: ----------------------------------------------------------------- ::: build/autoconf/compiler-opts.m4 @@ +33,5 @@ > HOST_LDFLAGS=" " > fi > ;; > *-darwin*) > + # GCC on darwing is based on gcc 4.2 and we don't support it anymore. "darwin" @@ +42,2 @@ > then > + echo gcc is known to be broken on OS X, please use clang. This doesn't seem right. I'd support a check for gcc 4.2 that errors out to prevent the common case, but we should let people build with stock GCC if they have a new enough version.
Attachment #659694 - Flags: review?(ted.mielczarek) → review-
Attached patch fix typo (obsolete) — Splinter Review
I don't think that non apple gcc will work. We use an API that uses blocks in ./widget/cocoa/nsChildView.mm: usingHandler:^(CGFloat gestureAmount, NSEventPhase phase, BOOL isComplete, BOOL *stop) {
Attachment #659694 - Attachment is obsolete: true
Attachment #659696 - Flags: review?(ted.mielczarek)
Comment on attachment 659696 [details] [diff] [review] fix typo Review of attachment 659696 [details] [diff] [review]: ----------------------------------------------------------------- Can you make the error message helpful? Perhaps drop a link to an MDN page saying how to ensure you have a proper compiler. I'm content with this being a follow-up because not having this specific patch in the tree is causing a lot of developer pain. For that reason, I support landing this directly in m-c.
Attachment #659696 - Flags: review?(ted.mielczarek) → review+
> I don't think that non apple gcc will work. We use an API that uses blocks > in ./widget/cocoa/nsChildView.mm: Correct. See also bug 700772.
Add better error message.
Attachment #659696 - Attachment is obsolete: true
Attachment #659844 - Flags: review?(gps)
Attachment #659844 - Flags: review?(gps) → review+
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
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: