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: Disabling reent support for a new target


Nikolaos,

Please read the header of /libc/include/reent.h There is information about various ways to set up your syscalls. The code in libc/reent are stubs that map the _r function calls internal to newlib to the syscalls you ultimately provide in your libgloss library. If you want, you can start by using the libnosys library (-lnosys) which is a set of syscall stubs. You will need to create a crt0 startup file if you haven't done so already.

-- Jeff J.

Nikolaos Kavvadias wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello newlib'ers


i'm currently in the process of adding support for a small RISC
(s'thing like DLX) processor in the newlib-1.14.0 source tree. I
believe i'm mostly done. One of the last problems regards support for
reentering functions (stuff that goes under /libc/reent/ i suppose).
What i would like to do (as a first hack) is to disable the support
for reents.

Is this possible (e.g. by setting an appropriate configuration)?
Anyway, this is how a typical make behaves for the targeted
processor/system (it will run on a simulator were most OS calls are
supported by being intercepted and serviced by the host system).
Please have a look below for the error messages produced by "make"
when run on a single-file MiBench application (a routing algorithm,
subbed "dijkstra").

risc-elf-gcc -specs=archc -O3 -fno-optimize-sibling-calls
- -fomit-frame-pointer dijkstra_small.c -o dijkstra_small.risc
/l/archc/compilers/risc/lib/gcc/risc-elf/3.4.1/../../../../risc-elf/lib/libc.a(openr.o):
In function `_open_r':
../../../../../newlib-1.14.0/newlib/libc/reent/openr.c:59: undefined
reference to `_open'
/l/archc/compilers/risc/lib/gcc/risc-elf/3.4.1/../../../../risc-elf/lib/libc.a(sbrkr.o):
In function `_sbrk_r':
../../../../../newlib-1.14.0/newlib/libc/reent/sbrkr.c:60: undefined
reference to `_sbrk'
/l/archc/compilers/risc/lib/gcc/risc-elf/3.4.1/../../../../risc-elf/lib/libc.a(readr.o):
In function `_read_r':
../../../../../newlib-1.14.0/newlib/libc/reent/readr.c:58: undefined
reference to `_read'
/l/archc/compilers/risc/lib/gcc/risc-elf/3.4.1/../../../../risc-elf/lib/libc.a(writer.o):
In function `_write_r':
../../../../../newlib-1.14.0/newlib/libc/reent/writer.c:58: undefined
reference to `_write'
/l/archc/compilers/risc/lib/gcc/risc-elf/3.4.1/../../../../risc-elf/lib/libc.a(lseekr.o):
In function `_lseek_r':
../../../../../newlib-1.14.0/newlib/libc/reent/lseekr.c:58: undefined
reference to `_lseek'
/l/archc/compilers/risc/lib/gcc/risc-elf/3.4.1/../../../../risc-elf/lib/libc.a(closer.o):
In function `_close_r':
../../../../../newlib-1.14.0/newlib/libc/reent/closer.c:53: undefined
reference to `_close'
/l/archc/compilers/risc/lib/gcc/risc-elf/3.4.1/../../../../risc-elf/lib/libc.a(fstatr.o):
In function `_fstat_r':
../../../../../newlib-1.14.0/newlib/libc/reent/fstatr.c:62: undefined
reference to `_fstat'
collect2: ld returned 1 exit status
make: *** [dijkstra_small.risc] Error 1

Thank you in advance

Kind regards
Nikolaos Kavvadias

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFFSeUmMPiy0tCWlz4RAtK8AJ43ucC5Qfv8ubzVyfQY+9MqgFwOwgCfX8V/
1wzUSzl5XDKbpIVQhzrXPrk=
=VfDR
-----END PGP SIGNATURE-----




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