This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Error Building Newlib for arm-none-eabi


On Thu, Feb 22, 2018 at 7:22 AM, Corinna Vinschen <vinschen@redhat.com> wrote:
> On Feb 20 22:33, R0b0t1 wrote:
>> In file included from
>> /home/R0b0t1/devel/toolgen/source/newlib-2.5.0.20171222/newlib/libc/include/ssp/stdio.h:34:0,
>>                  from
>> /home/R0b0t1/devel/toolgen/source/newlib-2.5.0.20171222/newlib/libc/include/stdio.h:800,
>>                  from
>> ../../../../../../../source/newlib-2.5.0.20171222/newlib/libc/stdio/gets.c:62:
>> ../../../../../../../source/newlib-2.5.0.20171222/newlib/libc/stdio/gets.c:97:8:
>> error: expected declaration specifiers or '...' before
>> '__builtin_object_size'
>>  _DEFUN(gets, (buf),
>>         ^
>
> There's no _DEFUN anywhere in the newlib-cygwin repo since commit
> 9087163804df.
>

I just retried from HEAD, same error.

char *

# 96 "../../../../../../source/newlib-3.0.0/newlib/libc/stdio/gets.c" 3 4
__gets_chk(
# 96 "../../../../../../source/newlib-3.0.0/newlib/libc/stdio/gets.c"
char *buf
# 96 "../../../../../../source/newlib-3.0.0/newlib/libc/stdio/gets.c" 3 4
, __builtin_object_size(
# 96 "../../../../../../source/newlib-3.0.0/newlib/libc/stdio/gets.c"
char *buf
# 96 "../../../../../../source/newlib-3.0.0/newlib/libc/stdio/gets.c" 3 4
, 2 > 1))

# 97 "../../../../../../source/newlib-3.0.0/newlib/libc/stdio/gets.c"
{
  return _gets_r (
# 98 "../../../../../../source/newlib-3.0.0/newlib/libc/stdio/gets.c" 3 4
                 _impure_ptr
# 98 "../../../../../../source/newlib-3.0.0/newlib/libc/stdio/gets.c"
                       , buf);
}


The gets definition looks as if it is replaced with the
_FORTIFY_SOURCE expansion. Manually setting _FORTIFY_SOURCE=0 seems to
compile the file.

What is problematic is that running the topmost Makefile does not
properly accept CFLAGS='-D_FORTIFY_SOURCE=0' (which I'd rather not
pass, actually; I don't know what the failure is yet) and I need to go
into the newlib directory to have it passed to compiler invocations.
Any pointers?

Cheers,
     R0b0t1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]