Closed Bug 139211 Opened 23 years ago Closed 23 years ago

Configure check for -fshort-wchar is broken

Categories

(SeaMonkey :: Build Config, defect, P3)

All
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.0.1

People

(Reporter: oes, Assigned: netscape)

References

()

Details

Attachments

(2 files, 2 obsolete files)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0rc1) Gecko/20020417 BuildID: 2002041711 In configure.in, lines 1530ff there is what looks as if someone had the idea to check for support of the option -fshort-wchar in gcc, used the test above as a cut&paste source, and then forgot to make changes. With gcc 2.95.2, configure then incorrectly assumes that -fshort-wchar is supoorted, which causes subsequent AC_TRY_RUNs to fail. Reproducible: Always Steps to Reproduce: 1. Use gcc without support for -fshort-wchar 2. ./configure Actual Results: [...] checking for compiler -fshort-wchar option... (cached) yes [...] checking for X11/extensions/XIElib.h... (cached) yes configure: error: Could not compile basic X program.
Ooops, forget the cut&paste comment; I didn't look right. The bug itself is valid, though.
I build with gcc 2.95.3 all the time and it doesn't improperly detect -fshort-wchar support. > checking for compiler -fshort-wchar option... (cached) yes ^^^^^^^^ Did you make sure that you did a 'make distclean' before changing compilers? Can you attach the full configure output & config.log when running configure on a clean tree?
Attached file configure output, called after make distclean (obsolete) (deleted) —
Attached file Config log from clean tree as requested (obsolete) (deleted) —
Hrm. So, it looks as though -fshort-wchar is a valid flag for SuSE 7.1 (per private email)'s g++ but not for gcc. dbaron, would we run into any problems if we used -fshort-wchar for c++ but not c? Should we add a test for $CC and fail the general check if either test fails?
We should be OK using it only for C++, since PRUnichar is never actually typedef-ed to wchar_t on Unix. But you should add a comment mentioning that hack in nscore.h (but I don't think it's worth changing nscore.h to add a pointer back).
Contains brief note about nscore.h as well.
Keywords: mozilla1.0
Priority: -- → P3
Target Milestone: --- → mozilla1.0.1
Comment on attachment 80699 [details] [diff] [review] Only add -fshort-wchar to CXXFLAGS r=bryner
Attachment #80699 - Flags: review+
Blocks: 138348
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Whiteboard: [fixed on trunk]
*** Bug 143041 has been marked as a duplicate of this bug. ***
*** Bug 143041 has been marked as a duplicate of this bug. ***
According to bbaetz, the standard says that wchar_t should be declared in stddef.h so just include it directly instead of going thru stdlib.h.
Attachment #80453 - Attachment is obsolete: true
Attachment #80454 - Attachment is obsolete: true
Comment on attachment 83004 [details] [diff] [review] Include stddef.h instead of stdlib.h to avoid exit() signature issues r=dbaron
Attachment #83004 - Flags: review+
Whiteboard: [fixed on trunk] → [fixed on trunk][drivers queue]
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Whiteboard: [fixed on trunk][drivers queue]
Target Milestone: mozilla1.0.1 → mozilla1.1alpha
Comment on attachment 83004 [details] [diff] [review] Include stddef.h instead of stdlib.h to avoid exit() signature issues Please land this on the 1.0.1 branch. Once there, replace the "mozilla1.0.1+" keyword with the "fixed1.0.1" keyword.
Attachment #83004 - Flags: approval+
Attachment #80699 - Flags: approval+
Keywords: mozilla1.0.1+
Target Milestone: mozilla1.1alpha → mozilla1.0.1
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: