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: Building newlib for h8300-hms


Thanks again,

I checked it out from cvs again this time with the newlib-1_11_0 tag.
That fixed the compile problems.

Now I just have to figure out why ___mulsi3 is not getting built into libgcc...

Thanks,
Jason

J. Johnston wrote:

childsj6@comcast.net wrote:

Thanks,

That fixes the path wrangling I had to do, but I still get the error with reg_memcpy.S

I looked at
http://sources.redhat.com/ml/newlib/2003/msg00105.html
and found that some of the packages I downloaded are already patched and some are not.


Right now I am working with:
binutils 2.14
gcc 3.3.2
newlib cvs (downloaded last night 11/20/2003)

the newlib i got from cvs does not have the any of following in reg_memcpy.S (even the #ifdef __H8300H__)


This code has been modified a bit lately.


The CVS copy of reg_memcpy.S should be:

#include "setarch.h"

#include "defines.h"

; dst A0
; src A1
; len A2
.global ___reg_memcpy
___reg_memcpy:

MOVP A0P,A3P ; keep copy of result
ADDP A2P,A0P ; point to end of dst
ADDP A2P,A1P ; point to end of src
CMPP A0P,A3P ; see if anything to do
beq quit

loop:
#ifdef __NORMAL_MODE__
sub #1,A1P ; point to byte
#else
subs #1,A1P ; point to byte
#endif
mov.b @A1P,A2L ; get byte
mov.b A2L,@-A0P ; save byte
CMPP A0P,A3P ; at the front again ?
bne loop

; return with A0 pointing to dst
quit: rts

Notice that "setarch.h" is included. It has the defines you are talking about.

I can't help you immediately with the error you are seeing as I don't have an h8300-hms build handy. Perhaps Dhananjay can be of some assistance here.

-- Jeff J.

from patch:
#include "defines.h"

#ifdef __H8300H__
+#ifdef __NORMAL_MODE__
+ .h8300hn
+#else
.h8300h
#endif
+#endif

#ifdef __H8300S__
+#ifdef __NORMAL_MODE__
+ .h8300sn
+#else
.h8300s
+#endif
#endif

so the sections the patch is searching for are not in the files at all.

I got newlib from cvs following the instructions on the newlib webpage. Are there some release tags I need to use as well?

Thanks,
Jason

Jason,

You should be configuring and building from the top level, not the newlib subdirectory. Use /src/configure as opposed to /src/newlib/configure.

-- Jeff J.

childsj6@comcast.net wrote:

Hello,

I am trying to build newlib for the h8300-hms series.
I've come across a few pages that tell you how to do it, but
when i build and install it it installs to <prefix>/i686-pc-linux-gnu.

I started with the following PATH:
/usr/local/h8300-hms/bin:/usr/bin:/bin

from the build-newlib directory I configured as such:
../src/newlib/configure --target=h8300-hms --prefix=/usr/local/h8300-hms


--srcdir=../src/newlib > configure.out

then did a
make CFLAGS="-Os" all

the instructions i followed said that it should then install to:
/usr/local/h8300-hms/h8300-hms, but it installs to


/usr/local/h8300-hms/i686-pc-linux-gnu.

The only thing I can assume is that it is not compiling to the target I
gave it.


Further more I tried the following,
I added to the beginning of my path:
/usr/local/h8300-hms/h8300-hms/bin
which is where the symlinks for the h8300 cross compiler are.

I then removed everything and reran configure as:
../src/newlib/configure --target=h8300-hms --prefix=/usr/local/h8300-hms


--host=h8300-hms --srcdir=../src/newlib > configure.out

then ran make the same as above.

I now run into the following error:

gcc -mh -mn -I/storage/renesas/h8300h/normal/build-newlib/targ-include


-I/storage/renesas/src/newlib/libc/include -DPACKAGE=\"newlib\" -DVERSION=\"1.11.0\" -I. -I../../../../../../src/newlib/libc/machine/h8300 -O2 -DSMALL_DTOA -DSMALL_MEMORY -fno-builtin -Os -mh -mn -c ../../../../../../src/newlib/libc/machine/h8300/reg_memcpy.S

../../../../../../src/newlib/libc/machine/h8300/reg_memcpy.S: Assembler


messages:

../../../../../../src/newlib/libc/machine/h8300/reg_memcpy.S:23: Error: Wrong


size pointer register for architecture.

../../../../../../src/newlib/libc/machine/h8300/reg_memcpy.S:24: Error: Wrong


size pointer register for architecture.


Any pointers would be greatly appreciated.


Thanks,
Jason






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