Closed Bug 1471643 Opened 6 years ago Closed 6 years ago

Use -std=gnu89 for libpng compilation.

Categories

(Core :: General, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox-esr60 --- fixed

People

(Reporter: jacek, Assigned: jacek)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We build libpng with -std=c89. This causes problems with mingw clang: clang in this mode does not support inline keyword, but headers assume it does. It works fine when using -std=gnu89 instead. Other platforms seem happy as well: https://treeherder.mozilla.org/#/jobs?repo=try&revision=0c5ac4177edb5e64d3e08bd80adcb5dc93a9725b
Attachment #8988239 - Flags: review?(mh+mozilla)
Already fixed in bug 1469790
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
Comment on attachment 8988239 [details] Bug 1471643 - Use -std=gnu89 for libpng compilation on mingw. [Approval Request Comment] This is one of several MinGW Build patches I'd like to land in esr60 for Tor. It will prevent them from carrying their own patches for the lifetime of esr60 and will enable us to keep the MinGW build functioning and know if/when/how it was broken by new commits into esr60. This fix was accepted and merged into Central in Bug 1469790 - but I'd like to request a (partial) backport here.
Attachment #8988239 - Flags: approval-mozilla-esr60?
More on the risk assessment: the difference between c89 and gnu89 is that gnu89 adds gcc extensions. These might affect something, and this patch does apply to non-mingw platforms. Also the bug I referenced was merged just a short while ago. So I'd say this is medium-risk; and we could either take it early in the cycle or we could restrict it to mingw-only.
Note that before bug 1371266, libpng was built with -std=gnu99, which is like gnu89, but with a newer C standard. So low-medium.
I attached a variant that uses gnu89 only for mingw, which should be safer for esr60.
Comment on attachment 8988239 [details] Bug 1471643 - Use -std=gnu89 for libpng compilation on mingw. https://reviewboard.mozilla.org/r/253470/#review262700 I don't think that's necessary, unless approval of the previous version is rejected.
Attachment #8988239 - Flags: review?(mh+mozilla)
Comment on attachment 8988239 [details] Bug 1471643 - Use -std=gnu89 for libpng compilation on mingw. For uplift, I'd rather take the version that only affects mingw. Makes downstream maintenance easier for Tor. Approved for ESR 60.2.
Attachment #8988239 - Flags: approval-mozilla-esr60? → approval-mozilla-esr60+
Comment on attachment 8988239 [details] Bug 1471643 - Use -std=gnu89 for libpng compilation on mingw. Can you please rubberstamp this, glandium?
Attachment #8988239 - Flags: review?(mh+mozilla)
Comment on attachment 8988239 [details] Bug 1471643 - Use -std=gnu89 for libpng compilation on mingw. https://reviewboard.mozilla.org/r/253470/#review263822 That's overkill, cf. comment 5, but meh.
Attachment #8988239 - Flags: review?(mh+mozilla) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: