Page MenuHomeFreeBSD

Fix build of sparc64 kernel with newer toolchain
ClosedPublic

Authored by bapt on Oct 10 2014, 7:12 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Sep 9, 3:00 AM
Unknown Object (File)
Mon, Sep 9, 1:58 AM
Unknown Object (File)
Sun, Sep 8, 4:40 PM
Unknown Object (File)
Sun, Sep 8, 12:17 PM
Unknown Object (File)
Fri, Aug 23, 11:28 PM
Unknown Object (File)
Thu, Aug 22, 11:17 PM
Unknown Object (File)
Fri, Aug 16, 11:43 PM
Unknown Object (File)
Thu, Aug 15, 10:36 AM
Subscribers
None

Details

Summary

gcc 4.9.1 complains about parenthesis in
sys/dev/mc146818/mc146818.c
gas is not happy with the typo in support.S

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

bapt retitled this revision from to Fix build of sparc64 kernel with newer toolchain.
bapt updated this object.
bapt edited the test plan for this revision. (Show Details)
bapt added a reviewer: marius.

Looks like the proposed change for mc146818.c adds parentheses in the wrong spots, breaking intended semantics.
The proper variant (untested) should be:
if (!((*sc->sc_mcread)(dev, MC_REGD) & MC_REGD_VRT)) {
However, the best variant would be to re-write it FreeBSD-bit-checking-style, which translates to:
if (((*sc->sc_mcread)(dev, MC_REGD) & MC_REGD_VRT) == 0) {
There are two other lines in mc146818.c which should also be changed to FreeBSD-style then, though.

bapt edited edge metadata.

Use FreeBSD-bit-checking-style to appease gcc 4.9.1

bapt updated this revision to Diff 1957.

Closed by commit rS272894 (authored by @bapt).