Closed Bug 1554616 Opened 2 years ago Closed 2 years ago

[patch] add support for lcc compiler (<=1.23)

Categories

(NSS :: Build, enhancement, P1)

3.44
Other
Linux
enhancement

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: shigorin, Assigned: shigorin)

Details

Attachments

(1 file, 1 obsolete file)

NSS currently fails to build with lcc 1.23.12 compiler on 64-bit Elbrus 2000 architecture due to its lack of __int128; not only 3.44 version I've patched but the current hg I've checked the patch to apply against either.

Please find the patch attached.

PS: I hope to revisit this as soon as I can get my hands on lcc 1.24 where __int128 is suppored (not sure when this happens though).

Test suite seems to pass for me:

Tests summary:
--------------
Passed:             13297
Failed:             0
Failed with core:   0
ASan failures:      0
Unknown status:     48
TinderboxPrint:Unknown: 48 
Assignee: nobody → shigorin
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P1
Component: Libraries → Build
QA Contact: jjones
Comment on attachment 9067720 [details] [diff] [review]
0001-freebl-add-lcc-support.patch

Review of attachment 9067720 [details] [diff] [review]:
-----------------------------------------------------------------

::: lib/freebl/Makefile
@@ +494,5 @@
>  
>  ifdef USE_64
> +# no __int128 at least up to lcc 1.23 (pretending to be gcc5)
> +# NB: CC_NAME is not defined here
> +ifneq (lcc,$(shell $(CC) -? 2>&1 >/dev/null | sed -e 's/:.*//;1q'))

Everywhere else in the file we put the constant as the second argument to the if. Can you swap it? Then r+ and I'll check it in. Thanks!
Attachment #9067720 - Flags: review?(jjones) → review-

No problem, thanks for reviewing :-)

Attachment #9067720 - Attachment is obsolete: true
Comment on attachment 9070702 [details] [diff] [review]
0001-freebl-add-lcc-support.patch

Review of attachment 9070702 [details] [diff] [review]:
-----------------------------------------------------------------

Thank you!
Attachment #9070702 - Flags: review+
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.45

MSVC compiler hangs with cl.exe -? >/dev/null - it waits for user input... apparently redirection of stdout to /dev/null breaks some check there, since redirecting to a dummy file works OK.

Mike, that might be worth another ifdef -- and check for CC_NAME in nss/coreconf/Werror.mk as that's where I borrowed the test from (the variable doesn't appear to be defined where I had to inline the test).

Well - simply adding stdin to /dev/null also works - so I'd just made something like

ifneq ($(shell $(CC) -? 2>&1 >/dev/null </dev/null | sed -e 's/:.*//;1q'),lcc)

Go ahead and post a patch for both occasions as a new bug referencing this one :-)

Forgot it: 3.45.0 built on e2k just fine, thank you JC!

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.