Jon Beniston | 17 Oct 13:19 2014

makeinfo --html doesn't split properly if a node is named index

Hi,

I'm using makeinfo to try to build html docs for newlib C library.

When using --no-split, the html file seems to be correctly generated. 

When using any of the split options (--split=chapter|node|section or
--split-size=5000000), the output is corrupted. In the index.html file, what
should be one of the sub-nodes, appears at the top, and many of the
navigation footers on random pages are missing.

I suspect this relates to the node name "index" being used. The node names
are generated based on C function names, and there is an index function.
Changing this name to something else, seems to fix the problem. However, all
of the other doc formats (info/pdf etc) seem ok.

Is this an issue with makeinfo --html, or should " <at> node index" not be used
in the newlib tex files?

Cheers,
Jon

Jon Beniston | 16 Oct 22:35 2014

Building newlib PDFs and HTML

Hi,

I'm having some trouble building PDFs and HTML. For PDFs, the same problem
was reported nearly two years ago here:

http://sourceware.org/ml/newlib/2013/msg00057.html

But I can't see a resolution in the thread. It seems as though it was
related to texinfo 5 or a then recent version of texlive. Does anyone have
any idea how to fix this?

For make html, I get the following failure:

make[4]: Entering directory
'/home/Jon/t/esirisc/gcc/trunk/build/esirisc-elf/libgloss/doc'
makeinfo --split-size=5000000 --split-size=5000000 --html -I
../../../../gcc/libgloss/doc -o porting.html
../../../../gcc/libgloss/doc/porting.texi
../../../../gcc/libgloss/doc/porting.texi:73:  <at> menu seen before first  <at> node
../../../../gcc/libgloss/doc/porting.texi:73: perhaps your  <at> top node should
be wrapped in  <at> ifnottex rather than  <at> ifinfo?
../../../../gcc/libgloss/doc/porting.texi:83: Prev reference to nonexistent
`Top'
../../../../gcc/libgloss/doc/porting.texi:83: Up reference to nonexistent
`Top'
../../../../gcc/libgloss/doc/porting.texi:350: warning: unreferenced node
`GCC'
../../../../gcc/libgloss/doc/porting.texi:350: Up reference to nonexistent
`Top'
../../../../gcc/libgloss/doc/porting.texi:458: warning: unreferenced node
(Continue reading)

Sebastian Huber | 16 Oct 13:37 2014
Picon

[PATCH v2] Fix resource leak in getcwd()

The fix is similar to the code in the current FreeBSD sources which
fixed this bug in 1997.

newlib/ChangeLog
2014-10-16  Sebastian Huber  <sebastian.huber <at> embedded-brains.de>

	* libc/unix/getcwd.c (getcwd): Close directory also in case of
	an error.
---
 newlib/libc/unix/getcwd.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/newlib/libc/unix/getcwd.c b/newlib/libc/unix/getcwd.c
index 92f1b20..63f3424 100644
--- a/newlib/libc/unix/getcwd.c
+++ b/newlib/libc/unix/getcwd.c
 <at>  <at>  -57,7 +57,7  <at>  <at>  getcwd (pt, size)
      size_t size;
 {
   register struct dirent *dp;
-  register DIR *dir;
+  register DIR *dir = NULL;
   register dev_t dev;
   register ino_t ino;
   register int first;
 <at>  <at>  -237,6 +237,7  <at>  <at>  getcwd (pt, size)
       bpt -= strlen (dp->d_name);
       bcopy (dp->d_name, bpt, strlen (dp->d_name));
       (void) closedir (dir);
+      dir = NULL;
(Continue reading)

Sebastian Huber | 16 Oct 12:36 2014
Picon

[PATCH] Fix resource leak in getcwd()

The fix is similar to the code in the current FreeBSD sources which
fixed this bug in 1997.

newlib/ChangeLog
2014-10-16  Sebastian Huber  <sebastian.huber <at> embedded-brains.de>

	* libc/unix/getcwd.c (getcwd): Close directory also in case of
	an error.
---
 newlib/libc/unix/getcwd.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/newlib/libc/unix/getcwd.c b/newlib/libc/unix/getcwd.c
index 92f1b20..7292445 100644
--- a/newlib/libc/unix/getcwd.c
+++ b/newlib/libc/unix/getcwd.c
 <at>  <at>  -57,7 +57,7  <at>  <at>  getcwd (pt, size)
      size_t size;
 {
   register struct dirent *dp;
-  register DIR *dir;
+  register DIR *dir = NULL;
   register dev_t dev;
   register ino_t ino;
   register int first;
 <at>  <at>  -163,6 +163,8  <at>  <at>  getcwd (pt, size)
       *bup = '\0';

       /* Open and stat parent directory. */
+      if (dir)
(Continue reading)

Randy Yates | 14 Oct 14:36 2014

newlib for baremetal m68k coldfire v2 isa-aplus:emac microarchitecture

I am trying to build newlib for a baremetal Coldfire V2, namely, the
MCF52235CAL60. This is to match the m68k-unknown-elf tools I've recently
built using crosstool-ng.

I built the "vanilla" baremetal m68k toolchain with crosstool-ng using
the unaltered sample, which builds for the cpu32 microarchitecture.
However, I am compiling my code with the -mcpu=52235 option to gcc,
which generates Coldfire V2 code.

I am also doing a fairly "vanilla" newlib configure for the m68k (see
the attached make file).

The problem is that newlib generates code (libc.a and libm.a) for the
cpu32 microarchitecture, while I need the isa-aplus:emac
microarchitecture:

-*- mode: compilation; default-directory:
"/home/hvp630-src/nmm-original/Applications/uTaskerV1.4/GNU_ColdFire/" -*-
Compilation started at Mon Oct 13 19:48:27

  make -f utaskerv1p4.mak 
  /home/yates/x-tools/m68k-unknown-elf/bin/m68k-unknown-elf-gcc
-mcpu=52235 -nostartfiles -Wall -Wstrict-prototypes
-I/home/yates/x-tools/m68k-unknown-elf/include
-I/home/hvp630-src/nmm-original/Applications/uTaskerV1.4 -L
/home/yates/x-tools/m68k-unknown-elf/lib/ -D _GNU -D _M5223X -g -Os
-Wl,-Map=uTaskerV1.4.map -Tm5225XUSB-rom.ld -o uTaskerV1.4.elf
Build/application.o Build/debug.o Build/webInterface.o Build/KeyScan.o
Build/GLCD.o Build/LCD.o Build/NetworkIndicator.o
Build/usb_application.o Build/MODBUS.o Build/modbus_app.o
(Continue reading)

Sebastian Huber | 9 Oct 16:08 2014
Picon

[PATCH] Introduce <sys/_intsup.h>

Do not rely on Newlib <stdint.h> provided __have_longlong64,
__have_long64 and __have_long32 in <inttypes.h> since in case GCC
<stdint.h> is used these defines are not available.  Instead use new
file <sys/_intsup.h>.  Use it also for <stdint.h>.

newlib/ChangeLog
2014-10-09  Sebastian Huber  <sebastian.huber <at> embedded-brains.de>

	* libc/include/stdint.h: Include <sys/_intsup.h>.
	(__STDINT_EXP): Delete.
	(__have_long32): Likewise.
	(__have_long64): Likewise.
	(__have_longlong64): Likewise.
	* libc/include/sys/_intsup.h: New file.
	(__STDINT_EXP): Move from libc/include/stdint.h.
	(__have_long32): Likewise.
	(__have_long64): Likewise.
	(__have_longlong64): Likewise.
	* libc/include/inttypes.h: Include <sys/_intsup.h>.
	(__INTTYPES_EXP): Delete and use __STDINT_EXP() instead.
---
 newlib/libc/include/inttypes.h    | 15 +++------------
 newlib/libc/include/stdint.h      | 23 +----------------------
 newlib/libc/include/sys/_intsup.h | 36 ++++++++++++++++++++++++++++++++++++
 3 files changed, 40 insertions(+), 34 deletions(-)
 create mode 100644 newlib/libc/include/sys/_intsup.h

diff --git a/newlib/libc/include/inttypes.h b/newlib/libc/include/inttypes.h
index 1631e21..2470b09 100644
--- a/newlib/libc/include/inttypes.h
(Continue reading)

Dave McGuire | 8 Oct 18:36 2014

Re: first post, perplexed by printf()

On 10/07/2014 09:07 AM, Jonathan Roelofs wrote:
>>> If I do printf("%d\n", 1); everything works fine.  If I do
>>> printf("%d\n", 10);, my processor hangs.  (again with no debugging
>
> Pointed question: where did you get your implementation of __aeabi_divmod?

  Well I certainly didn't write it. ;)  Isn't that in libgcc?

               -Dave

--

-- 
Dave McGuire, AK4HZ/3
New Kensington, PA

Randy Yates | 8 Oct 04:18 2014

Existing Target Inquiry

Does anyone know if newlib has been ported to a Freescale Coldfire V2
processor, namely, the MCF52235CAL60?

I am currently building the binutils and gcc with the triple m68k-none-elf.
--

-- 
Randy Yates
Digital Signal Labs
http://www.digitalsignallabs.com

Dave McGuire | 3 Oct 05:42 2014

first post, perplexed by printf()


  Hi folks.  New list member here; I'm sure I'll see some familiar names.

  I've been using newlib for several years on a few different ARM7
platforms, primarily the NXP LPC family, with great results. (thanks!)
I'm just getting stuff running on my first CortexM3-based system now,
and printf() has me stymied.

  I'm hoping this is a simple thing that someone else has run into.  I
don't have any reasonable way to get a debugger running on my board just
yet, so I figured I'd just ask here to see if someone pipes up and says
"Oh!  It's just <xyz>."

  If I do printf("%d\n", 1); everything works fine.  If I do
printf("%d\n", 10);, my processor hangs.  (again with no debugging
support just yet, I don't know where)  In other words, as soon as I try
to format an integer with more than one digit, it hangs.  I can add
characters to the format string, and it works.  I've given it ever more
stack, no change. (I'm aware of printf()'s appetite for memory)

  I'm using the 2.1.0 snapshot of newlib, standard multilib config, with
GCC v4.9.1 on an Energy Micro/SiLabs EFM32GG-series processor.  Same
toolchain and newlib build as I have working on lots of designs with
non-Cortex ARM7 processors.

  Before I dig any deeper, does this ring a bell for anyone?

                Thanks,
                -Dave

(Continue reading)

Steve Ellcey | 2 Oct 22:49 2014

[Patch] Replace MIPS strcmp.c with assembly language version.


I would like to replace the MIPS C strcmp.c with an assembly language
version that is a bit faster.  Both versions load 4 bytes at a time on
aligned strings but the assembly version has the advantage of being
scheduled by hand and having some loop unrolling to be a bit faster.
This version is already checked in to glibc.  It has been tested by
hand and by running the GCC testsuite.

OK for checkin?

Steve Ellcey
sellcey <at> mips.com

2014-10-02  Steve Ellcey  <sellcey <at> mips.com>

	* newlib/libc/machine/mips/strcmp.c: Remove.
	* newlib/libc/machine/mips/strcmp.S: New.
	* newlib/libc/machine/mips/Makefile.am (lib_a_SOURCES):
	Replace strcmp.c with strcmp.S
	* newlib/libc/machine/mips/Makefile.in: Regenerate.

diff --git a/newlib/libc/machine/mips/Makefile.am b/newlib/libc/machine/mips/Makefile.am
index 46b4cc3..1695b18 100644
--- a/newlib/libc/machine/mips/Makefile.am
+++ b/newlib/libc/machine/mips/Makefile.am
 <at>  <at>  -8,7 +8,7  <at>  <at>  AM_CCASFLAGS = $(INCLUDES)

 noinst_LIBRARIES = lib.a

-lib_a_SOURCES = setjmp.S strlen.c strcmp.c strncpy.c memset.S memcpy.S
(Continue reading)

Jonathan Roelofs | 23 Sep 22:33 2014

[libcxx+newlib] nexttoward{f,l,} shims for _LDBL_EQ_DBL systems

Please see the attached patch.

-- 
Jon Roelofs
jonathan <at> codesourcery.com
CodeSourcery / Mentor Embedded
Index: newlib/libc/include/math.h
===================================================================
--- newlib/libc/include/math.h	(revision 439406)
+++ newlib/libc/include/math.h	(working copy)
 <at>  <at>  -420,20 +420,24  <at>  <at> 
 extern long double fmodl _PARAMS((long double, long double));
 extern long double hypotl _PARAMS((long double, long double));
 #endif /* ! defined (__math_68881) */
 #endif /* ! defined (_REENT_ONLY) */
 extern long double copysignl _PARAMS((long double, long double));
 extern long double nanl _PARAMS((const char *));
 extern int ilogbl _PARAMS((long double));
 extern long double asinhl _PARAMS((long double));
 extern long double cbrtl _PARAMS((long double));
 extern long double nextafterl _PARAMS((long double, long double));
+extern float nexttowardf _PARAMS((float, long double));
+extern double nexttoward _PARAMS((double, long double));
+extern long double nexttowardl _PARAMS((long double, long double));
+extern long double logbl _PARAMS((long double));
 extern long double rintl _PARAMS((long double));
 extern long double scalbnl _PARAMS((long double, int));
 extern long double exp2l _PARAMS((long double));
(Continue reading)


Gmane