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: can't build for z8k-coff


Christian Groessler wrote:
If you didn't specify an option like -i on the build, then check which make
you are using and if there are any updates available.  You can set up a small
test case to reproduce the problem and if still present you should open a bug.

I'm using gmake 3.81. I didn't specify -i. According to the man page of gmake return code 1 should only happen if I specify -q, which I didn't. I will check with gmake 3.80 to see if it happens there too.


Christian, I should clarify my earlier statements regarding error code. I was referring to the typical percolation I expect to see on a newlib compile error. I have an example below for mn10300-elf whereby I simply added a non-existent type to the file:


/home/jjohnstn/sourceware/src/newlib/libc/argz/argz_insert.c: In function ‘argz_insert’:
/home/jjohnstn/sourceware/src/newlib/libc/argz/argz_insert.c:25: error: ‘blahblah’ undeclared (first use in this function)
/home/jjohnstn/sourceware/src/newlib/libc/argz/argz_insert.c:25: error: (Each undeclared identifier is reported only once
/home/jjohnstn/sourceware/src/newlib/libc/argz/argz_insert.c:25: error: for each function it appears in.)
/home/jjohnstn/sourceware/src/newlib/libc/argz/argz_insert.c:25: error: expected ‘;’ before ‘k’
make[7]: *** [lib_a-argz_insert.o] Error 1
make[7]: Leaving directory `/notnfs/jjohnstn/sourceware/mn10300/mn10300-elf/am33/newlib/libc/argz'
make[6]: *** [all-recursive] Error 1
make[6]: Leaving directory `/notnfs/jjohnstn/sourceware/mn10300/mn10300-elf/am33/newlib/libc'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/notnfs/jjohnstn/sourceware/mn10300/mn10300-elf/am33/newlib'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/notnfs/jjohnstn/sourceware/mn10300/mn10300-elf/am33/newlib'
make[3]: *** [multi-do] Error 1
make[3]: Leaving directory `/notnfs/jjohnstn/sourceware/mn10300/mn10300-elf/newlib'
make[2]: *** [all-multi] Error 2
make[2]: Leaving directory `/notnfs/jjohnstn/sourceware/mn10300/mn10300-elf/newlib'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/notnfs/jjohnstn/sourceware/mn10300/mn10300-elf/newlib'
make: *** [all-target-newlib] Error 2


The error 1 code for lib_a-argz_insert.o from gcc is expected. It should have percolated up to [all] with Error 2 unless you specified -i or -k.

It is likely that I gummed this up when I brought the code in originally and
modified it to work for newlib.  Obviously, this new code has never been
compiled on the z8k.  I've made up a proposed patch to fix this. Try it out
and let me know.

It works. But in order for the compile to succeed, I had to do another change (appended). It is also a variable declaration in the middle of a function. I think there is no parameter to tell current gcc to report an error for such things, even with -std=c89 :-( This is very annoying...


Thanks, will check in the patch.


-- Jeff J.

regards,
chris

Index: ldtoa.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdlib/ldtoa.c,v
retrieving revision 1.11
diff -u -r1.11 ldtoa.c
--- ldtoa.c 16 May 2007 19:59:40 -0000 1.11
+++ ldtoa.c 6 Jun 2007 18:15:18 -0000
@@ -2868,9 +2868,6 @@
LDPARMS rnd;
LDPARMS *ldp = &rnd;
-rnd.rlast = -1;
-rnd.rndprc = NBITS;
-
union uconv du;
du.d = *d;
#if LDBL_MANT_DIG == 24
@@ -2883,6 +2880,9 @@
e113toe( &du.pe, e, ldp );
#endif
+rnd.rlast = -1;
+rnd.rndprc = NBITS;
+
if( (e[NE-1] & 0x7fff) == 0x7fff )
{
#ifdef NANS




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