[PATCH v2] Fix -Os related build and test failures.

Joseph Myers joseph@codesourcery.com
Fri Oct 28 14:17:00 GMT 2016


On Fri, 28 Oct 2016, Carlos O'Donell wrote:

> - Fix math/test-nan-overflow.c which uses malloc but doesn't include
>   stdlib.h.

I don't know what's including <stdlib.h> but not for -Os, but this fix 
should be separate (and committed as obvious).

> - Define DIAG_IGNORE_Ox_NEEDS_COMMENT and DIAG_IGNORE_Os_NEEDS_COMMENT
>   for use with diagnostics which should be ignored only when optimizing,
>   or when optimizing for size. If we need *Ox* to be finer grained, then
>   we'll have to setup something more complicated, but for now we don't
>   need it.

I don't think we need the -Ox version.  glibc is always built with 
optimization, and if we fix things (for better debugging) so that only a 
few bits need to be built with optimization and the rest is correct 
without, it's harmess for the pragmas to be in effect with -O0 even if not 
needed in that case.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list