Re: pmc changes break kernels w/makeoptions "COPTS=-Os"

2017-07-14 Thread Patrick Welche
On Thu, Jul 13, 2017 at 02:11:16PM -0500, John D. Baker wrote: > While I can follow the logic in "pmc.c", GCC with "-Os" cannot. Would > the following patch be appropriate for appeasing GCC? Would asserting that pmc_ncounters>0 help? (even in theory?) Cheeers, Patrick

Re: pmc changes break kernels w/makeoptions "COPTS=-Os"

2017-07-13 Thread John D. Baker
On Thu, 13 Jul 2017, John D. Baker wrote: > On Thu, 13 Jul 2017, John D. Baker wrote: > > > Would the following patch be appropriate for appeasing GCC? > > [snip] > > It allows compilation to succeed. Will test run-time soon. A quick > look suggests CPU capability/feature detection is

Re: pmc changes break kernels w/makeoptions "COPTS=-Os"

2017-07-13 Thread John D. Baker
On Thu, 13 Jul 2017, John D. Baker wrote: > Would the following patch be appropriate for appeasing GCC? [snip] It allows compilation to succeed. Will test run-time soon. A quick look suggests CPU capability/feature detection is sufficient to render the pmc code inactive on the net4501. --

pmc changes break kernels w/makeoptions "COPTS=-Os"

2017-07-13 Thread John D. Baker
Kernel configs like "NET4501" routinely include: makeoptions "COPTS=-Os" This causes GCC to emit warnings (treated as errors) if it thinks a variable might be used uninitialized. For example, the following: # compile NET4501_JDB/pmc.o /r1/build/current/tools/amd64/bin/i486--netbsdelf-gcc