[coreboot] libpayload: Add -Os to the CFLAGS
jordan.crouse at amd.com
Thu Mar 20 15:51:39 CET 2008
On 20/03/08 04:03 +0100, Segher Boessenkool wrote:
>> Unfortunately, it exposes a strange issue where strcpy() suddenly goes
>> missing - we think that strcpy() is being provided by libgcc, and that
>> for some reason, -Os changes the beahavior.
> strcpy() isn't part of libgcc. What happened is that without -Os, the
> compiler will inline certain invocations of strcpy() as a builtin.
What other builtin functions do we need to be worried about?
>> +char *strcpy(char *d, const char *s)
>> + return strncpy(d, s, strlen(s));
> This doesn't put a terminating 0 on the string.
Oops - he's right. Uwe, can you do a quick fix?
Systems Software Development Engineer
Advanced Micro Devices, Inc.
More information about the coreboot