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)
Tue, Nov 5, 2:23 PM
Unknown Object (File)
Oct 4 2024, 5:03 AM
Unknown Object (File)
Sep 27 2024, 7:19 PM
Unknown Object (File)
Sep 25 2024, 12:26 AM
Unknown Object (File)
Sep 19 2024, 8:20 AM
Unknown Object (File)
Sep 9 2024, 3:00 AM
Unknown Object (File)
Sep 9 2024, 1:58 AM
Unknown Object (File)
Sep 8 2024, 4:40 PM
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
No Lint Coverage
Unit
No Test Coverage

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).