public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* configuring reentrant syscalls to compile ARM processor programs
       [not found] <1530379179.3822323.1519313817555.ref@mail.yahoo.com>
@ 2018-02-22 15:55 ` Paul Gelencser via gcc-help
  0 siblings, 0 replies; only message in thread
From: Paul Gelencser via gcc-help @ 2018-02-22 15:55 UTC (permalink / raw)
  To: gcc-help


Hello,

Thank you for offering help through this mailing list.  

I'm having some trouble compiling, and was hoping for some guidance.  I'm aware of two paths I could take (maybe there are more), but am not sure what path makes sense.  Help is appreciated.

My application is to compile ARM program files into .elf files to run in a test environment, if that helps.

 The errors are of the type: 
     
  /lib\libc.a(lib_a-exit.o): In function `exit':
      exit.c:(.text.exit+0x2c):  undefined reference to `_exit'
 
  /lib/crt0.o: In function  `_start':
    (.text+0xec): undefined  reference to `main'

  /lib\libc.a(lib_a-sbrkr.o): In function `_sbrk_r':
  sbrkr.c:(.text._sbrk_r+0x18): undefined reference to  `_sbrk'
     
  /lib\libc.a(lib_a-isattyr.o): In function `_isatty_r':
  isattyr.c:(.text._isatty_r+0x18): undefined reference to  `_isatty'

From the error message, one solution I could pursue would be to define two macros, 

    REENTRANT_SYSCALLS_PROVIDED
    MISSING_SYSCALL_NAMES, 

which are used in file,

     ..."7 2017-q4-major\arm-none-eabi\include\reent.h".

There are proper instructions in file "reent.h" for enabling syscalls, but they refer to a file I can't find, "configure.host".  Also, I'm not sure if defining these macros would lead to hitting other errors.

The other path which someone suggested was to assert  "-nostdlib -nostartfiles -ffreestanding", but then I believe I'm on the hook for finding all of the mandatory dependencies of the compiler, which could be a long list of things to find - kind of an Easter egg hunt.

Help is greatly appreciated.

Thanks,
Paul



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-02-22 15:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1530379179.3822323.1519313817555.ref@mail.yahoo.com>
2018-02-22 15:55 ` configuring reentrant syscalls to compile ARM processor programs Paul Gelencser via gcc-help

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).