Closed Bug 900714 Opened 11 years ago Closed 11 years ago

Better handle -fno-strict-aliasing in xpcom/io/Makefile.in

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla26

People

(Reporter: gps, Assigned: gps)

References

Details

Attachments

(1 file)

https://hg.mozilla.org/mozilla-central/file/default/xpcom/io/Makefile.in#l18 contains a workaround for bug 408258. However, bug 408258 appears to be necessary for ScriptableIO, which appears to have gone away a long time ago. On first glance, it's tempting to remove those lines and the addition of -fno-strict-aliasing to compiler flags.

Since the MODULE_OPTIMIZE_FLAGS mucking in xpcom/io/Makefile.in is global instead of target specific, changing this will remove -fno-strict-aliasing from a bunch of compilations in this directory. I'm not sure if that is desired.

I see the following options (in my personal preferred order):

1) Remove -fno-strict-aliasing globally, as it's no longer needed.
2) Only add -fno-strict-aliasing on targets that actually need it.
3) Update the comment to note general applicability.

bz: please advise
Flags: needinfo?(bzbarsky)
actually afaict that code is totally useless because C{,XX}FLAGS contain -fno-strict-aliasing globaly, so you can just remove it.
(In reply to Trevor Saunders (:tbsaunde) from comment #1)
> actually afaict that code is totally useless because C{,XX}FLAGS contain
> -fno-strict-aliasing globaly, so you can just remove it.

You are correct. https://mxr.mozilla.org/mozilla-central/source/configure.in#1236
Flags: needinfo?(bzbarsky)
Trivial patch.
Attachment #784701 - Flags: review?(mshal)
Assignee: nobody → gps
Yep, so two comments:

1)  As comment 1 points out we disable strict aliasing globally.
2)  The actual warnings attached to bug 408258 show warnings in the binary stream code,
    which is very much alive, sadly.
Comment on attachment 784701 [details] [diff] [review]
Remove legacy -fno-strict-aliasing compiler flag adjustment

Sorry for the delay - somehow this slipped by. Looks good!
Attachment #784701 - Flags: review?(mshal) → review+
https://hg.mozilla.org/mozilla-central/rev/69dc9d2c72cd
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
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: