This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


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

Re: How to build H8 compiler?


Bob Paddock wrote:
> 
> I just found out about this list so for give me if this is
> some palace I didn't see (Didn't see the FAQ, or see a
> archive of this list any place).
> 
> I've installed RedHat 5.2 Linux on my machine.
> 
> I've built and installed the egcs-1.1.1 compiler, based on
> the egcs-core source files (no c++, or objc).
> 
> Now I'm trying to build the h8300 cross compiler.
> 
> This is what I've done:
> 
> Placed egcs-1.1.1 sources in /usr/local/src/egcs-1.1.1.
> 
> Made a build directory /usr/local/src/e111.
> 
> In /e111 I've tried:
> 
> ../egcs-1.1.1/configure --target=h8300
> 
> The above doesn't give me any errors but doesn't build the
> compiler, just seems to build the binutils.
> 
> This one complains that it doesn't know how to configure LANGUAGES:
> ../egcs-1.1.1/configure --target=h8300-hms LANGUAGES="c"
> 
> ../egcs-1.1.1/configure --target=h8300-hms
> ../egcs-1.1.1/configure --target=h8300-hms --enable-language=c
> 
> Those stop saying "No target for c++ needed by native".
> 
> If I edit Makefile to take out the building of "c++" then it
> goes on some then complains that '"bra." is not a 386
> instruction'.
> 
> What am I doing wrong here?
> 
> --
> For information on any of the following check out my WEB site at:
>                    http://www.biogate.com/bpaddock/
> Chemical Free Air Conditioning/No CFC's, Chronic Pain Relief, Echofone,
> Electromedicine, Electronics, Explore!, Free Energy, Full Disclosure,
> KeelyNet, Matric Limited, Neurophone, Oil City PA, Philadelphia Experiment.
>                          http://www.uCOS-II.com

There's a problem with the newer linux system include files for
building the linux host portions of the cross compiler.
(in /usr/include)
Specifically, in unistd.h, there are declarations for llseek which
freak out the cross compiler build; and in bytesex.h, which #error's out
if the target processor code is being built for isn't explicitly
declared,
the H8 isn't.

Unified diff's which can be used with patch to fix those two files for
building an h8300 compiler follow:

===================================================================
diff -u -r1.1 unistd.h
--- unistd.h    1999/01/08 22:43:40     1.1
+++ unistd.h    1999/01/08 22:46:54
@@ -131,10 +131,12 @@
 extern __off_t __lseek __P ((int __fd, __off_t __offset, int
__whence));
 extern __off_t lseek __P ((int __fd, __off_t __offset, int __whence));
 
-#if defined(__USE_MISC) && defined(__GNUC__) &&
!defined(__STRICT_ANSI__)
+#ifdef __linux__
+#      if defined(__USE_MISC) && defined(__GNUC__) &&
!defined(__STRICT_ANSI__)
 /* This is for Linux. */
 extern __loff_t __llseek __P ((int __fd, __loff_t __offset, int
__whence));
 extern __loff_t llseek __P ((int __fd, __loff_t __offset, int
__whence));
+#      endif
 #endif
 
 /* Close the file descriptor FD.  */

===================================================================

diff -u -r1.1 bytesex.h
--- bytesex.h   1999/01/08 22:38:08     1.1
+++ bytesex.h   1999/01/08 22:40:25
@@ -9,6 +9,8 @@
 #elif defined(__mc68000__) || defined (__sparc__) || defined (__PPC__)
\
        || (defined(__mips__) && (defined(MIPSEB) || defined
(__MIPSEB__)))
 # define __BYTE_ORDER  4321
+#elif defined(__H8300__)
+# define __BYTE_ORDER  4321
 #else
 # error architecture not supported by the Linux C library
 #endif

===================================================================

good luck,
randall


-- 
|\/|
|/\|  randall@elgar.com
|\/|  rsl@zanshinsys.com http://www.zanshinsys.com
_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.