Closed Bug 476448 Opened 16 years ago Closed 16 years ago

-KPIC is obsolete in Sun Studio 12 SPARC

Categories

(Firefox Build System :: General, defect)

x86
OpenSolaris
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: ginnchen+exoracle, Assigned: ginnchen+exoracle)

References

Details

(Keywords: fixed1.9.1, Whiteboard: [fixed1.9.1b99])

Attachments

(3 files, 2 obsolete files)

See http://docs.sun.com/source/820-4180/man1/CC.1.html We should use -xcode=pic32 instead.
I'm working on it. Also I'd like to change to the compiler version check to Sun Studio 12, as some code is known as not working with Sun Studio 11. I'm testing my patch now. I'll post it tomorrow.
Assignee: nobody → ginn.chen
Status: NEW → ASSIGNED
Attached patch patch (obsolete) — Splinter Review
1) Use -xcode=pic32 instead of -KPIC for Sun Compiler on Solaris/SPARC. 2) Remove the workaround for -xbuiltin option, the patch of Sun Compiler went public on June 2008. I didn't find an easy way to test whether the compiler is patched. But I believe most Sun Studio users have updated their compilers, so it's not really needed. 3) Update the compiler requirement to Sun Studio 12 because nanojit uses some new features of Sun Studio 12.
Attachment #360255 - Flags: review?(jim)
Attachment #360255 - Flags: review?(jim) → review+
Comment on attachment 360255 [details] [diff] [review] patch This looks good. Would it be possible to set SUNSTUDIO_CC and SUNSTUDIO_CXX variables, somewhere around line 400-430, where we set GNU_CC, GNU_CXX, INTEL_CC, and INTEL_CXX, and then test that instead of all these if test "$CPU_ARCH" = "sparc" && test "$OS_ARCH" = "SunOS"; then all over? Then, the first hunk, substituting -xcode=pic32 for -KPIC, could become its own independent 'elif' clause, a sibling to the 'if test "$GNU_CC"' clause, concerned only with getting the flags right for Sun Studio. You'd need to duplicate a little code, but I think it would be much easier to determine when a given flag was appropriate, because you'd only be concerned with one compiler at a time. The 'if test -z "$GNU_CC"' clause in the second hunk could become 'if test "$SUNSTUDIO_CC"'.
Attached patch patch v2 (obsolete) — Splinter Review
Attachment #360255 - Attachment is obsolete: true
Attachment #360484 - Flags: review?(jim)
Do people use GNU ld with Sun Studio?
Comment on attachment 360484 [details] [diff] [review] patch v2 This looks great. My only thought was that it seems more robust to decide whether we're using Sun Studio by the same kinds of tests we use to recognize Intel CC: if test "`$CC -help 2>&1 | grep -c 'Intel(R) C Compiler'`" != "0"; then INTEL_CC=1 fi
Attachment #360484 - Flags: review?(jim) → review+
(In reply to comment #5) > Do people use GNU ld with Sun Studio? I think most people use /usr/ccs/bin/ld with either Sun Studio or gcc on Solaris. But we can leave it here, in case someone want to use GNU ld.
grep 'Sun C ' / 'Sun C++ '
Attachment #360484 - Attachment is obsolete: true
Attachment #360652 - Flags: review?(jim)
Attachment #360652 - Flags: review?(jim) → review+
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
The version line of Sun Studio Express compiler (PreRelease of next version of Sun Studio) has its codename between "Sun" and "C "/"C++ ". So use regexp to test it.
Attachment #362540 - Flags: review?(jim)
Attachment #362540 - Flags: review?(jim) → review+
What about 1.9.1?
Target Milestone: --- → mozilla1.9.2a1
It's not must to have but better to have. The fix should only affects Solaris platform with Sun Studio compiler.
Attachment #375012 - Flags: approval1.9.1?
Comment on attachment 375012 [details] [diff] [review] patch for 1.9.1 branch (combined fix for Bug 475393 and Bug 488260) [Checkin: Comment 15] a191=beltzner
Attachment #375012 - Flags: approval1.9.1? → approval1.9.1+
Attachment #375012 - Attachment description: patch for 1.9.1 branch (combined fix for Bug 475393 and Bug 488260) → patch for 1.9.1 branch (combined fix for Bug 475393 and Bug 488260) [Checkin: Comment 15]
Attachment #362540 - Attachment description: fix for Sun Studio Express → fix for Sun Studio Express [Checkin: Comment 11]
Attachment #360652 - Attachment description: patch v3 → patch v3 [Checkin: Comment 9]
Flags: in-testsuite-
Keywords: fixed1.9.1
Whiteboard: [fixed1.9.1b5]
Whiteboard: [fixed1.9.1b5] → [fixed1.9.1b99]
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: