lange@chello.at | 2 Feb 11:04 2015
Picon

Fwd: Re: Newlib nano

Hi Bin,

> ---------- Urspr√ľngliche Nachricht ----------
> Von: "Bin.Cheng" <amker.cheng <at> gmail.com>
> An: "lange <at> chello.at" <lange <at> chello.at>
> Cc: newlib ml <newlib <at> sourceware.org>
> Datum: 2. Februar 2015 um 03:00
> Betreff: Re: Newlib nano
>
> On Thu, Jan 29, 2015 at 7:26 PM, lange <at> chello.at <lange <at> chello.at> wrote:
> > Hello,
> >
> > We are using newlib at work, and are using different CPUs. We have one Arm9
> > with
> > lotsa RAM and some Cortex M3/4 with rather paltry amounts of RAM.
> > Im currently trying to fit a toolchain to serve both of them and thus want
> > the
> > nano-variants optimized for space.
> >
> > The issue I have is that some options affect the standard headers, notably
> > _REENT_GLOBAL_ATEXIT and _WANT_REENT_SMALL. Since there is only one Header
> > for
> > both variants, this can result in problems if the reent struct is different
> > than
> > the linked library.
>
>
> Hi lange,
> Yes, we once had that problem when developing Nano in our toolchain
> release "GNU Tools for ARM Embedded Processors". In that we compiled
(Continue reading)

lange@chello.at | 29 Jan 12:26 2015
Picon

Newlib nano

Hello,

We are using newlib at work, and are using different CPUs. We have one Arm9 with
lotsa RAM and some Cortex M3/4 with rather paltry amounts of RAM.
Im currently trying to fit a toolchain to serve both of them and thus want the
nano-variants optimized for space.

The issue I have is that some options affect the standard headers, notably
_REENT_GLOBAL_ATEXIT and _WANT_REENT_SMALL. Since there is only one Header for
both variants, this can result in problems if the reent struct is different than
the linked library.

1) Is there some guide on which switches are allowed to differ? I only did some
grep -R <Macro> to see if its used outside of newlib.h and found the two above
so far.
Atleast for the board support you would need to have the correct newlib.h
available.

2) I think about providing both newlib.h files (renamed) and defining a macro
via the specs file to pick the right one via a stub. Im completely unused to
specs files so I would be gratefull if someone could comment if thats a good
solution.

Kind Regards,
Norbert Lange

Christian Eggers | 28 Jan 21:45 2015
Picon
Picon

[patch] sys/time.h - include sys/cdefs.h

Using the definition __BSD_VISIBLE requires inclusion of <sys/cdefs.h>.

2015-01-28  Christian Eggers  <ceggers <at> gmx.de>

	* libc/include/sys/time.h: #include <sys/cdefs.h> for __BSD_VISIBLE.

Index: libc/include/sys/time.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/sys/time.h,v
retrieving revision 1.19
diff -r1.19 time.h
8a9
> #include <sys/cdefs.h>

Nick Clifton | 27 Jan 22:16 2015
Picon

RFA: wcstold implementation for ! LDBL_EQ_DBL

Hi Guys,

  I would like permission to apply the patch below to add an
  implementation of wcstold() for targets where long double is not the
  same as double.  This version does not support reentrancy because
  there is no _strtold_r() function available in newlib.  If/when one
  does become available however it will be relatively easy to update
  this patch.

  OK to apply ?

Cheers
  Nick

newlib/ChangeLog
2015-01-27  Nick Clifton  <nickc <at> redhat.com>

	* libc/stdlib/wcstold.c (wcstold): Add implementation for when
	long double is not the same as double.

Index: newlib/libc/stdlib/wcstold.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdlib/wcstold.c,v
retrieving revision 1.3
diff -u -3 -p -r1.3 wcstold.c
--- newlib/libc/stdlib/wcstold.c	26 Nov 2013 17:21:01 -0000	1.3
+++ newlib/libc/stdlib/wcstold.c	27 Jan 2015 21:07:51 -0000
 <at>  <at>  -29,14 +29,83  <at>  <at>  POSSIBILITY OF SUCH DAMAGE.
 */

(Continue reading)

lange@chello.at | 27 Jan 19:46 2015
Picon

nosys.specs in newlib 2.2.0

 Hello,

I am trying to use the nosys.specs, but they appear to be adding a library group
instead of replacing the default. This apparently means that some symbols arent
resolved (_kill could not be resolved in one of my projects), I really cant
follow why.

The target "link_gcc_c_sequence" is nothing gcc understands and it should be lib
instead. I suppose the simple solution of renaming it wouldnt work together with
nano.specs.

I get the following output for these commands (test.c consists of an empty main
function):

arm-none-eabi-gcc -O2 -v test.c
/prefix/libexec/gcc/arm-none-eabi/4.8.4/collect2 -X
/prefix/lib/gcc/arm-none-eabi/4.8.4/crti.o
/prefix/lib/gcc/arm-none-eabi/4.8.4/crtbegin.o
/prefix/lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/crt0.o
-L/prefix/lib/gcc/arm-none-eabi/4.8.4
-L/prefix/lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib
/tmp/cclh9vw4.o
--start-group -lgcc -lc --end-group
/prefix/lib/gcc/arm-none-eabi/4.8.4/crtend.o
/prefix/lib/gcc/arm-none-eabi/4.8.4/crtn.o

arm-none-eabi-gcc -O2 -v --specs=nosys.specs test.c
/prefix/libexec/gcc/arm-none-eabi/4.8.4/collect2 -X
/prefix/lib/gcc/arm-none-eabi/4.8.4/crti.o
/prefix/lib/gcc/arm-none-eabi/4.8.4/crtbegin.o
(Continue reading)

Marco Atzeri | 22 Jan 23:13 2015
Picon

math code in libc tree

Could someone clarify why there is the
same file in two places

libc/machine/i386/f_exp.c
libm/machine/i386/f_exp.c

It is not the only case

Regards
Marco

Nick Clifton | 22 Jan 16:11 2015
Picon

wcstold implementation

Hi Corinna, Hi Yaakov,

  What do you think of the attached patch for an implementation of
  wcstold() for sizeof (long double) > sizeof (double) ?  The patch is
  against the devo sources, but it could be adapted for FSF newlib
  easily enough.  One thing that you might not like is that the
  _wcstold_r implementation calls _strtold and not _strtold_r.  I can
  fix this too if you think that it is worth it.

Cheers
  Nick

Index: newlib/libc/include/wchar.h
===================================================================
RCS file: /cvs/cvsfiles/devo/newlib/libc/include/wchar.h,v
retrieving revision 1.28
diff -u -3 -p -r1.28 wchar.h
--- newlib/libc/include/wchar.h	18 Jan 2015 16:58:03 -0000	1.28
+++ newlib/libc/include/wchar.h	22 Jan 2015 15:05:48 -0000
 <at>  <at>  -122,6 +122,7  <at>  <at>  double _EXFUN(_wcstod_r, (struct _reent 
 /* start-sanitize-redhat */
 /* This uses a stub implementation.  It is here so that we can compile the PlumHall tests.  */
 long double _EXFUN(wcstold, (const wchar_t *__restrict, wchar_t **__restrict));
+long double _EXFUN(_wcstold_r, (struct _reent *, const wchar_t *__restrict, wchar_t **__restrict));
 /* end-sanitize-redhat */
 float _EXFUN(wcstof, (const wchar_t *__restrict, wchar_t **__restrict));
 float _EXFUN(_wcstof_r, (struct _reent *, const wchar_t *, wchar_t **));
Index: newlib/libc/stdio/vfwscanf.c
===================================================================
RCS file: /cvs/cvsfiles/devo/newlib/libc/stdio/vfwscanf.c,v
(Continue reading)

Freddie Chopin | 21 Jan 19:11 2015
Picon

Do threads within single process share FILE streams?

Hello!

I know this list is not perfect for such question, but I'm sure you know 
the answer (; I really couldn't find anything definitive on the internet...

Do threads within single process share FILE streams? I know that threads 
share file descriptors, but do they share FILE streams too? Newlib's 
source suggests that FILE streams are _NOT_ shared between threads - 
they are allocated in _reent structure, which is (I assume) per thread. 
But on the other hand - if FILE streams are not shared (implicitly), 
then the locking (with _newlib_flockfile_start() and 
_newlib_flockfile_end()) is mostly pointless and would make sense only 
when you share the FILE streams explicitly by using the same FILE 
variable from multiple threads, right?

Thanks in advance!

Regards,
FCh

Stefan Wallentowitz | 20 Jan 15:53 2015
Picon

[PATCH, OR1K] make newlib build not depend on libgloss installation

Hi all,

the applied patch replaces an inclusion of a libgloss header with an
extern definition. I think this is the easiest way to build libgloss and
newlib in one run, correct?

Bye,
Stefan
Attachment (smime.p7s): application/pkcs7-signature, 6682 bytes
Jonathan Roelofs | 20 Jan 02:03 2015

[PATCH] Add --with-sdkdir flag for controlling target library installation location

The backstory is that I'd like to be able to have newlib install target 
libraries in a directory other than the one named after the target 
triple, so I can customize the layout of my toolchain's sysroots.

2015-01-19  Jonathan Roelofs  <jonathan <at> codesourcery.com>

	* configure.ac: Add new flag: --with-sdkdir=.
	* configure: Regenerate.

-- 
Jon Roelofs
jonathan <at> codesourcery.com
CodeSourcery / Mentor Embedded
diff --git a/configure b/configure
index ae23ce4..e66c3c9 100755
--- a/configure
+++ b/configure
 <at>  <at>  -743,6 +743,7  <at>  <at>  alphaieee_frag
 ospace_frag'
 ac_user_opts='
 enable_option_checking
+with_sdkdir
 with_build_libsubdir
 enable_gold
 enable_ld
 <at>  <at>  -1497,6 +1498,8  <at>  <at>  Optional Features:
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
(Continue reading)

Eric Botcazou | 20 Jan 00:38 2015

Newlib port for the Visium

Hi,

on behalf of Controls and Data Services, AdaCore would like to contribute a
port of Newlib to the Visium.  This is a 32-bit RISC architecture with an 
Extended Arithmetic Module implementing some 64-bit operations and an FPU
designed for embedded systems.  The binutils and compilers port have already 
been contributed and the ultimate goal is to contribute a port of the entire 
toolchain with simulator and debugger.

This is a very basic port but it contains a libsim.a that implements support 
for I/O in the simulator.  It is under the standard BSD license, modulo a 
couple of files (libgloss/visium/io.h and libgloss/visium/io-gdb.c) that are 
copied from the m68k port:

? libgloss/visium/Makefile.in
? libgloss/visium/_exit.c
? libgloss/visium/aclocal.m4
? libgloss/visium/configure
? libgloss/visium/configure.in
? libgloss/visium/crt0.S
? libgloss/visium/gettod.c
? libgloss/visium/io-gdb.c
? libgloss/visium/io-stubs.c
? libgloss/visium/io.h
? libgloss/visium/sbrk.c
? libgloss/visium/serial-inbyte.c
? libgloss/visium/serial-outbyte.c
? libgloss/visium/syscall.h
? libgloss/visium/syscalls.c
? newlib/libc/machine/visium/Makefile.am
(Continue reading)


Gmane