Page MenuHomeFreeBSD

Don't add -Wno-class-memaccess with older gcc.
ClosedPublic

Authored by brooks on Aug 8 2019, 11:30 PM.

Details

Reviewers
imp
lwhsu
asomers
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rS350827: Don't add -Wno-class-memaccess with older gcc.
Summary

This is a gcc 8.0+ warning which needed to be silenced on for the riscv build. amd64-xtoolchain-gcc still uses gcc 6.4.0 and does not understand this flag.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

brooks created this revision.Aug 8 2019, 11:30 PM
lwhsu accepted this revision.Aug 8 2019, 11:37 PM
This revision is now accepted and ready to land.Aug 8 2019, 11:37 PM
imp added inline comments.Aug 8 2019, 11:54 PM
tests/sys/fs/fusefs/Makefile
71 ↗(On Diff #60604)

Lose the extra indirection. It's not needed and bogus.
.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} < 50000
is what you want. The extra indirection is valid only in src/Makefile.inc1

imp requested changes to this revision.Aug 8 2019, 11:55 PM
This revision now requires changes to proceed.Aug 8 2019, 11:55 PM

I added that flag to make the riscv build happy. Have you tested your change through a riscv buildworld?

brooks added a comment.Aug 9 2019, 3:56 PM

I completely misunderstood what was going on. The in .. excludes gcc 4.2.1 and this is a gcc 8.0+ warning. The incorrect copy and paste meant it worked by accident for 6.4. I'm testing a new version now...

brooks updated this revision to Diff 60623.Aug 9 2019, 8:35 PM
  • Use the correct expression to add -Wno-class-memaccess.
brooks added a comment.Aug 9 2019, 8:36 PM

I've fixed the expression to exclude gcc < 8 and tested on amd64 and riscv.

brooks retitled this revision from Don't add -Wno-class-memaccess with modern gcc. to Don't add -Wno-class-memaccess with older gcc..Aug 9 2019, 8:38 PM
brooks edited the summary of this revision. (Show Details)
asomers accepted this revision.Aug 9 2019, 8:38 PM

Ok, that looks better.

This revision was not accepted when it landed; it landed in state Needs Review.Aug 9 2019, 11:51 PM
This revision was automatically updated to reflect the committed changes.
Owners added a reviewer: Restricted Owners Package.Aug 9 2019, 11:51 PM
imp added a comment.Aug 10 2019, 12:12 AM

I'm cool with this...