This is the mail archive of the newlib@sources.redhat.com 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: About porting newlib to arm...


Yen-Ting Chen wrote:
Dear all,

Could anyone tell me what is the difference between these directories,
and what I can make use of from these directories?

1) newlib-<version>/libgloss/arm/
2) newlib-<version>/newlib/libc/machine/arm/
3) newlib-<version>/newlib/libc/sys/arm

If I want to port newlib to arm, should I modify
newlib-<version>/newlib/libc/syscalls/*.c or just
newlib-<version>/newlib/libc/sys/arm/syscalls.c ?
And do I need to do with newlib-<version>/libgloss/arm ??

Thanks in advance.

Newlib is already ported to arm. I assume that you want to port to a specific board.


You should be modifying libgloss/arm. Syscall code should be placed in libgloss. In the past, syscall code was sometimes placed in libc/sys, but this is historical and we are working to fix this.

Add your own .ld script etc.. to the libgloss/arm directory. To properly avoid the use of the old default libc/sys/arm code, newlib must be configured with the --disable-newlib-supplied-syscalls configuration option.

The end-user would then specify -T{your_ld_script} when compiling/linking.

-- Jeff J.


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