Closed Bug 557758 Opened 14 years ago Closed 14 years ago

Don't build with -Wcast-align on ARM (for maemo)

Categories

(Firefox Build System :: General, defect)

ARM
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dholbert, Assigned: dholbert)

References

()

Details

Attachments

(1 file, 1 obsolete file)

The "-Wcast-align" build flag causes tons of warning-spam on maemo (and hence failures if we try to enable WARNINGS_AS_ERRORS in many places).  See this build log for example:
http://tinderbox.mozilla.org/showlog.cgi?log=Mobile/1270621492.1270624849.13473.gz

It has 6340 instances of warnings like this:
{
> In file included from ../../../dist/include/nsReadableUtils.h:52,
>                  from ../../../dist/include/nsString.h:53,
>                  from ../../../dist/include/nsDependentString.h:44,
>                  from /home/cltbld/build/maemo-trunk/mozilla-central/xpcom/string/src/nsDependentString.cpp:41:
> ../../../dist/include/nsTArray.h: In member function 'nsTArray_base::Header* nsTArray_base::GetAutoArrayBuffer()':
> ../../../dist/include/nsTArray.h:162: warning: cast from 'nsTArray_base::Header**' to 'nsTArray_base::AutoArray*' increases required alignment of target type
}

and 231 warnings like this:
{
> pldhash.c: In function 'PL_DHashTableFinish':
> pldhash.c:396: warning: cast increases required alignment of target type
}

See bug 411292 & bug 436133, which disabled this warning due to warning-spam on other platforms.

I imagine we want to do the same for ARM, since it's an easy fix that saves us a ridiculous amount of buildspam (and AIUI the warning isn't actually a serious issue).
(sorry -- technically the 6340 count *includes* the other 231. I grepped for "increases required alignment" to get the first count, and that actually matches both the C++ and the C version of the warning.)
Attached patch fix (obsolete) — Splinter Review
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #437515 - Flags: review?
Attachment #437515 - Flags: review? → review?(ted.mielczarek)
Note that bug 542146 already disabled this warning for arm in js/src.
Attachment #437515 - Flags: review?(ted.mielczarek) → review+
Attached patch fix v1aSplinter Review
Needed to apply the exact same fix to one other place in configure.in -- here's the patch again with that.  Carrying forward r=ted.

One caveat for the moment is that CPU_ARCH isn't actually defined yet on maemo builds -- that's fixed by bug 441767's patch.  So this patch here won't do any good for maemo until that lands.
Attachment #437515 - Attachment is obsolete: true
Attachment #437611 - Flags: review+
Depends on: 441767
Landed:
  http://hg.mozilla.org/mozilla-central/rev/01d577167874
(though note that this won't affect maemo-on-arm until bug 441767 lands -- hopefully that will happen later today)
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: