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]

Re: couldn't build cross newlib, please help


Tian Ling wrote:
> 
> Hello,
> 
> I was trying to build cross complier on my linux host. I built cross binutils and cross gcc, and I guess they worked because I was able to do a "TARGET-gcc -c".
> 
> However, it seems that I just couldn't build newlib for my target. Following are some details:
> 
> 0. Directories:
> newlib-1.9.0/ build-newlib/
> 
> 1. Variables:
> target=sparc-sun-sunos4.1.1
> prefix=/usr/local
> 
> 2. Actions:
> # cd build-newlib
> # ../newlib-1.9.0/configure --target=$target --prefix=$prefix -v
> # make all install
> 
> 3. Messages:
> 3.1. After "configure":
> Configuring for a i586-pc-linux-gnu host.
> *** This configuration is not supported in the following subdirectories:
> target-newlib target-libgloss
> (Any other directories should still work fine.)
> Created "Makefile" in /root/install/GNU/build-newlib
> Configuring texinfo...
> No configuration information in texinfo
> Configuring etc...
> creating cache ../config.cache
> checking for a BSD compatible install... /usr/bin/install -c
> updating cache ../config.cache
> creating ./config.status
> creating Makefile
> 
> 3.2 After "make"
> make[1]: Entering directory `/root/install/GNU/build-newlib/etc'
> make[1]: Nothing to be done for `all'.
> make[1]: Leaving directory `/root/install/GNU/build-newlib/etc'
> /bin/sh ../newlib-1.9.0/mkinstalldirs /usr/local /usr/local
> make[1]: Entering directory `/root/install/GNU/build-newlib/etc'
> make[1]: Nothing to be done for `install'.
> make[1]: Leaving directory `/root/install/GNU/build-newlib/etc'
> 
> I have looked at the generated Makefile in build-newlib/etc. There is indeed not too many things in there for the make to do. I am confused. It looks to me like I didn't do the configure right. But what could be wrong? I am trying a new target to see what will happen.
> 
> Your help and time will be great appreciated! Thanks.
> 

Tian,

  The problem is that there is a restriction in the top level configure.in that prevents building
target-newlib and target-libgloss for sparc-*-sunos4* (it adds them to the noconfigdirs list). 
There is code in newlib to handle the configuration but it likely hasn't been tested because of the
top level restriction which has been in place since 1996.  To get around the problem, I would advise
you to delete your build tree and either reconfigure with --with-newlib added as a configuration
option or else apply the patch I am attaching and then reconfigure.

-- Jeff J.
Index: configure.in
===================================================================
RCS file: /cvs/src/src/configure.in,v
retrieving revision 1.31
diff -u -r1.31 configure.in
--- configure.in	2001/01/15 00:19:42	1.31
+++ configure.in	2001/02/26 23:25:45
@@ -890,7 +890,7 @@
     ;;
   sparc-*-sunos4*)
     if [ x${is_cross_compiler} != xno ] ; then
-           noconfigdirs="$noconfigdirs gdb gdbtest target-newlib target-libgloss"
+           noconfigdirs="$noconfigdirs gdb gdbtest"
     else
            use_gnu_ld=no
     fi

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