On Sat, 27 Oct 2018, Colton Lewis wrote:
> Building the -current source tree with COPTS='-O1' or anything lower 
> than -O2 results in a linker error for several functions.

In general, we do not endevour to support compilation with different 
optimization levels or flags.  The developers don't do it (because we 
don't see a benefit to running such a kernel), so issues like this will 
crop up.


In this case, since the issue is a standards compliance issue, I'm mildly 
inclined towards thinking we should fix it.  For the trivial functions, 
marking them static seems fine; uhci_find_prev_qh() should perhaps just 
drop the 'inline': the compiler can still inline it.


> The problem seems to come from clang using slightly different inline 
> semantics from gcc. [1] This build error can be fixed with a small patch 
> declaring some inline functions static.

'static' should always be placed first in the declaration.  C11 declared 
"placement of a storage-class specifier other than at the beginning of the 
declaration specifiers in a declaration" to be an obsolescent feature.


Philip Guenther

Reply via email to