Closed Bug 629839 Opened 13 years ago Closed 13 years ago

compiler version detection in security/coreconf/Darwin.mk fails for clang

Categories

(NSS :: Build, defect)

x86_64
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
3.12.10

People

(Reporter: espindola, Assigned: espindola)

References

Details

Attachments

(1 file, 2 obsolete files)

The logic for detecting the compiler version greps for "gcc version", and therefore fails with clang.

There are many ways to fix this, the patch I am attaching fixes it by dropping support for really old gcc's (clang's driver behaves like 4.2's). If we must still support 4.0 or 3.x (really?), let me know and I will upload a different patch.
Attachment #508061 - Attachment is patch: true
Attachment #508061 - Flags: review?(wtc)
NSS is used by non-Mozilla products and older versions of
Mozilla products, so it is best to not rip out support for
GCC 4.0 and 3.x.
ah, didn't realized this file was part of NSS. Will test and upload a different one in a sec. Thanks
Assignee: nobody → respindola
Status: NEW → ASSIGNED
Attached patch Use the -dumpversion hack (obsolete) — Splinter Review
Using -dumpversion is shorter than what we have now and as a hack clang already prints 4.2.1 when given that flag.
Attachment #508061 - Attachment is obsolete: true
Attachment #508070 - Flags: review?(wtc)
Attachment #508061 - Flags: review?(wtc)
Attachment #508070 - Attachment is obsolete: true
Attachment #508073 - Flags: review?(wtc)
Attachment #508070 - Flags: review?(wtc)
Comment on attachment 508073 [details] [diff] [review]
now with the correct quotes

r=wtc.  I'm glad you found a simple solution.  Why didn't we use
-dumpversion before?  It's documented in the GCC 3.0 manual:
http://gcc.gnu.org/onlinedocs/gcc-3.0.4/gcc_3.html#IDX286

Before I saw this patch, I studied
https://wiki.mozilla.org/Mac:Build_Requirements#Compatibility_Matrix
Although I don't fully understand the compatibility matrix, it seems
that we can drop support for GCC 3.3, but still need to support GCC
4.0, assuming mozilla-1.8.1 and older are no longer supported.
Attachment #508073 - Flags: review?(wtc) → review+
Hey, thanks for the pointer.
I have no idea why -dumpversion was not used before, the code is a lot older than me (working on Mozilla).

I will probably send an independent patch dropping the 3.3 since that is the really nasty part of the makefile...
Patch checked in on the NSS trunk (NSS 3.13) and the
NSS_3_12_BRANCH (NSS 3.12.10).

Checking in Darwin.mk;
/cvsroot/mozilla/security/coreconf/Darwin.mk,v  <--  Darwin.mk
new revision: 1.27; previous revision: 1.26
done

Checking in Darwin.mk;
/cvsroot/mozilla/security/coreconf/Darwin.mk,v  <--  Darwin.mk
new revision: 1.24.2.2; previous revision: 1.24.2.1
done
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Component: Security → Build
Product: Core → NSS
QA Contact: toolkit → build
Resolution: --- → FIXED
Target Milestone: --- → 3.12.10
Version: Trunk → trunk
Attachment #508073 - Flags: approval2.0?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: