Closed Bug 423913 Opened 12 years ago Closed 12 years ago

-fshort-wchar does not work on gcc 4.2.1 in arm scratchbox

Categories

(Firefox Build System :: General, defect)

x86
Maemo
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dougt, Assigned: glandium)

References

Details

Attachments

(1 file)

currently configure.in passes -fshort-wchar to gcc.  this doesn't work when building against the maemo sdk:

[sbox-arm3: ~] > cat t.c
int main()
{
        return 0;
}
[sbox-arm3: ~] > gcc -fshort-wchar t.c
/scratchbox/compilers/arm-linux-cs2007q3-51sb1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.1/../../../../arm-none-linux-gnueabi/bin/ld: ERROR: /tmp/ccoJUOWj.o: Conflicting definitions of wchar_t


The work around is to set an env flag:

export SBOX_BLOCK_CROSS_COMPILER_ARGS="-fshort-wchar"
The configure check is somewhat bogus; it's assuming that -fshort-wchar works even though binaries that result with it set don't run.  It should probably be skipped (possibly entirely -- what platforms is it needed on?), or at least made into an optional --configure setting (--with-short-wchar or something).
OS: Mac OS X → Linux Maemo
see bug 139211
I dunno if it's 139211 -- that's separate breakage for when it's available for g++ but not gcc or somesuch, no?
This could just be a toolchain problem. Both "compiler -fshort-wchar option" and "correct temporary object destruction order" were passing, before... See http://buildd.debian.org/fetch.cgi?pkg=xulrunner;ver=1.8.1.12-5;arch=armel;stamp=1206621388 for example.
Could be, but either way we should check instead of always setting it, no?
A proposed patch on the debian bug for the same issue is to turn AC_TRY_COMPILE into a AC_TRY_LINK for the -fshort-wchar option test, which makes it fail, thus making -fshort-wchar not used.
Yup, AC_TRY_LINK works for me.
Attached patch patchSplinter Review
Attachment #317321 - Flags: review?(benjamin)
Comment on attachment 317321 [details] [diff] [review]
patch

Please re-indent the remaining code
Attachment #317321 - Flags: review?(benjamin) → review+
Checked in, with reindentation.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Where was that checked in ?
Assignee: nobody → mh+mozilla
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.