Closed Bug 409224 Opened 17 years ago Closed 17 years ago

Don't use obsolete gcc -no-cpp-precomp

Categories

(Firefox Build System :: General, defect)

All
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mark, Assigned: mark)

Details

Attachments

(4 files, 1 obsolete file)

On Mac OS X, we invoke the compiler with -no-cpp-precomp.  At one time, this option directed the compiler to use the standard GCC preprocessor instead of Apple's own precompiled-header-capable preprocessor.  This option last had an effect in Apple gcc 3.1.  Since Apple gcc 3.3, it has been silently accepted but ignored for compatibility with previous gcc versions.  I determined this based on examination of source code for various Apple gcc releases.  The last version to support -no-cpp-precomp was gcc_jaguar-1257, corresponding to Apple gcc 3.1 in Xcode 1.5.  The first Apple gcc 3.3 release, gcc-1495 from Xcode 1.1, did not support the option.

A future Apple gcc will no longer silently ignore this option, and will instead complain:

mark@crack bash$ gcc-4.2 -no-cpp-precomp -c t.c -o t.o
i686-apple-darwin9-gcc-4.2.1: unrecognized option '-no-cpp-precomp'

These are not errors and gcc will continue to perform as though the option had not been specified, with the exception of printing these messages to stderr.

Because the minimum supported compiler on the trunk is gcc 4.0, we should simply remove our use of -no-cpp-precomp.
Attached patch CoreSplinter Review
Attachment #294041 - Flags: review?(ted.mielczarek)
Attached patch NSPRSplinter Review
Attachment #294042 - Flags: review?(wtc)
Attached patch NSSSplinter Review
Attachment #294043 - Flags: review?(wtc)
Attached patch Directory (obsolete) — Splinter Review
Attachment #294044 - Flags: review?(mcs)
Attachment #294044 - Flags: review?(mcs) → review?(richm)
Attached patch DirectorySplinter Review
Attachment #294044 - Attachment is obsolete: true
Attachment #294046 - Flags: review?(richm)
Attachment #294044 - Flags: review?(richm)
bugzilla says that I am not authorized to approve the patch.  Mark Smith?
Comment on attachment 294046 [details] [diff] [review]
Directory

Weird, a couple years ago when I contributed a patch to this file, Mark asked that you or dmose look at it.
Attachment #294046 - Flags: review?(richm) → review?(mcs)
Attachment #294041 - Flags: review?(ted.mielczarek) → review+
Comment on attachment 294042 [details] [diff] [review]
NSPR

r=wtc
Attachment #294042 - Flags: review?(wtc) → review+
Comment on attachment 294043 [details] [diff] [review]
NSS

r=wtc
Attachment #294043 - Flags: review?(wtc) → review+
Attachment #294041 - Flags: approval1.9?
Comment on attachment 294044 [details] [diff] [review]
Directory

OK.  I am not sure why Bugzilla prevented Rich from marking this as reviewed though.
Attachment #294044 - Flags: review+
Mark, you approved the obsolete patch, but I intend to use the other one (attachment 294046 [details] [diff] [review]) - it gets rid of the comment that would be meaningless without the -no-cpp-precomp line.
Comment on attachment 294046 [details] [diff] [review]
Directory

Approving the correct patch (sorry about that; I did look at this one but somehow approved the other one!)
Attachment #294046 - Flags: review?(mcs) → review+
Comment on attachment 294041 [details] [diff] [review]
Core

a=beltzner for 1.9
Attachment #294041 - Flags: approval1.9? → approval1.9+
This has been checked in on the trunk.  I'm holding this bug open until the other parts can be checked in.  I don't believe I have access to check into the restricted modules for NSPR, NSS, and LDAPCSDK.  Wan-Teh and Mark, can you help out?
(In reply to comment #14)
> This has been checked in on the trunk.  I'm holding this bug open until the
> other parts can be checked in.  I don't believe I have access to check into the
> restricted modules for NSPR, NSS, and LDAPCSDK.  Wan-Teh and Mark, can you help
> out?

The LDAP area (Directory SDK module) is open now so anyone may commit.

Thanks, Mark.  I've checked the directory patch and a regenerated configure in on the trunk and LDAPCSDK_6_0_3_CLIENT_BRANCH, which is used by the Mozilla trunk.  I don't know if there are any other branches that this would be needed on, I only plan for it to be used on anything corresponding to the current Mozilla trunk (1.9) and future development.

That leaves only the NSPR and NSS portions to be checked in.
Whiteboard: [needs checkin wtc]
I checked in the NSPR patch on the NSPR trunk (NSPR 4.7).
I checked in the NSS patch on the NSS trunk (NSS 3.12).

Mark, you can close this bug now because we will definitely update
the NSPR and NSS CVS tags in mozilla/client.mk before Firefox 3 final.

Thanks, Wan-Teh!
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Whiteboard: [needs checkin wtc]
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.