
On 9 May 2012 22:19, Cristian Rodríguez <crrodriguez@opensuse.org> wrote:
Hi:
Will be cool if rpmlint could warn when upstream packages attempt to use the -ansi gcc option because it inhibits usage of gcc builtin functions while optimizing (list here --> http://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#Other-Builtins) most recently it caught my attention that it also disables the new "optimize-strlen" pass in gcc 4.7, in particular this:
"for hosted compilations where stpcpy is available in the runtime and headers provide its prototype, e.g.
void foo (char *a, const char *b, const char *c, const char *d) { strcpy (a, b); strcat (a, c); strcat (a, d); }
can be optimized into:
void foo (char *a, const char *b, const char *c, const char *d) { strcpy (stpcpy (stpcpy (a, b), c), d); } "
when -ansi is used and (defined(_GNU_SOURCE) || (_XOPEN_SOURCE >= 700 || _POSIX_C_SOURCE >= 200809L)) is false, there is no stpcpy prototype and hence no optimization.
Thoughts ?
Can you explain to me why in https://build.opensuse.org/package/rdiff?linkrev=base&package=libebml&projec... you added "-D_GNU_SOURCE" to the CFLAGS? I would have thought it was enough removing the use of "-ansi -fno-gnu-keywords". -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org