public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Need help building combined gcc/binutils/newlib
@ 2007-12-01  2:14 Rick Mann
  2007-12-02 14:45 ` Rask Ingemann Lambertsen
  0 siblings, 1 reply; 6+ messages in thread
From: Rick Mann @ 2007-12-01  2:14 UTC (permalink / raw)
  To: gcc-help

I've looked at several archive messages, and many OLD instructions,  
and I still can't quite figure out how to do a combined build of GCC  
targeting xscale-elf.

I need to do this from release tars. I downloaded gcc-4.2.1,  
binutils-2.18, and newlib-1.15.

I extract these all into one dir:

gccbuild/
   binutils-1.15/
   gcc-4.2.1/
   newlib-1.15/


Then I wasn't sure how to use the symlink-tree script, so I tried this:

cd gccbuild
mkdir src
cd src
../binutils-2.18/symlink-tree ../binutils-2.18
../binutils-2.18/symlink-tree ../newlib-1.15
../binutils-2.18/symlink-tree ../gcc-4.2.1

Then

cd ..
mkdir build
cd build
../src/configure  --prefix=/usr/local/gcctest \
                   --target=xscale-elf \
                   --enable-languages=c,c++ \
                   --with-newlib --disable-nls \
                   --disable-libssp --with-float=soft

It did a short configure, then I tried "make all".

It ran for a while, then got into a seemingly endless series of  
messages like this:

> Fatal configuration error.  See the libtool docs for more information.
> : ltconfig version `' does not match ltmain.sh version `1.4a-GCC3.0'



I suspect part of my problem is the order in which I'm running symlink- 
tree. But I could just be way off target.

Can someone please explain to me the process (or point me to a  
resource that does)? Thank you very much!

-- 
Rick

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Need help building combined gcc/binutils/newlib
  2007-12-01  2:14 Need help building combined gcc/binutils/newlib Rick Mann
@ 2007-12-02 14:45 ` Rask Ingemann Lambertsen
  2007-12-04 22:12   ` Rick Mann
  0 siblings, 1 reply; 6+ messages in thread
From: Rask Ingemann Lambertsen @ 2007-12-02 14:45 UTC (permalink / raw)
  To: Rick Mann; +Cc: gcc-help

On Fri, Nov 30, 2007 at 06:14:05PM -0800, Rick Mann wrote:
> I've looked at several archive messages, and many OLD instructions,  
> and I still can't quite figure out how to do a combined build of GCC  
> targeting xscale-elf.
>
> I need to do this from release tars. I downloaded gcc-4.2.1,  
> binutils-2.18, and newlib-1.15.

   First, read <URL:http://gcc.gnu.org/ml/gcc-help/2007-06/msg00230.html>.
When running the "ln -s" commands, you want to start with the newest of the
packages; perhaps check the file "configure" in each package, because the
packages gcc, binutils, newlib, gdb, etc. keep the common files and
directories in sync. In this particular case, I think the order should be
binutils-2.18, gcc-4.2.1 and newlib-1.15.

> It ran for a while, then got into a seemingly endless series of  
> messages like this:
> 
> >Fatal configuration error.  See the libtool docs for more information.
> >: ltconfig version `' does not match ltmain.sh version `1.4a-GCC3.0'

   The files related to libtool were upgraded between binutils-2.17 and
binutils-2.18, but the change first appears in GCC in 4.3.0 (which has not
been released yet). You may have to try with binutils-2.17 instead.
Alternatively, use a GCC 4.3 snapshot. If none of the above works or you're
desparate enough to get the combination of binutils-2.18, gcc-4.2.1 and
newlib-1.15 working, it is necessary to use the libtool version from
gcc-4.2.1 and the libiberty version from binutils-2.18. I.e.

...
$ mkdir combined
$ cd combined
$ ln -s ../gcc-4.2.1/* .
$ rm libiberty include
$ ln -s ../binutils-2.18/* .
$ ln -s ../newlib-1.15.0/* .
...

-- 
Rask Ingemann Lambertsen
Danish law requires addresses in e-mail to be logged and stored for a year

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Need help building combined gcc/binutils/newlib
  2007-12-02 14:45 ` Rask Ingemann Lambertsen
@ 2007-12-04 22:12   ` Rick Mann
  2007-12-04 23:55     ` Rask Ingemann Lambertsen
  0 siblings, 1 reply; 6+ messages in thread
From: Rick Mann @ 2007-12-04 22:12 UTC (permalink / raw)
  To: Rask Ingemann Lambertsen; +Cc: gcc-help


On Dec 2, 2007, at 6:45 AM, Rask Ingemann Lambertsen wrote:

> On Fri, Nov 30, 2007 at 06:14:05PM -0800, Rick Mann wrote:
>> I've looked at several archive messages, and many OLD instructions,
>> and I still can't quite figure out how to do a combined build of GCC
>> targeting xscale-elf.
>>
>> I need to do this from release tars. I downloaded gcc-4.2.1,
>> binutils-2.18, and newlib-1.15.
>
>   First, read <URL:http://gcc.gnu.org/ml/gcc-help/2007-06/msg00230.html 
> >.
> When running the "ln -s" commands, you want to start with the newest  
> of the
> packages; perhaps check the file "configure" in each package,  
> because the
> packages gcc, binutils, newlib, gdb, etc. keep the common files and
> directories in sync. In this particular case, I think the order  
> should be
> binutils-2.18, gcc-4.2.1 and newlib-1.15.

Thank you, seeing that message was very helpful.

>   The files related to libtool were upgraded between binutils-2.17 and
> binutils-2.18, but the change first appears in GCC in 4.3.0 (which  
> has not
> been released yet). You may have to try with binutils-2.17 instead.
> Alternatively, use a GCC 4.3 snapshot. If none of the above works or  
> you're
> desparate enough to get the combination of binutils-2.18, gcc-4.2.1  
> and
> newlib-1.15 working, it is necessary to use the libtool version from
> gcc-4.2.1 and the libiberty version from binutils-2.18. I.e.

binutils-2.17 is fine. So, I downloaded that and tried again, and got  
MUCH farther, but still ran into some errors:

gcc -g -O2   -c -o flat_bl.o ../../combined/gprof/flat_bl.m
../../combined/gprof/flat_bl.m:2: error: syntax error before ‘%’ token
make[4]: *** [flat_bl.o] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-gprof] Error 2
make: *** [all] Error 2


I'm not sure what a .m file is. For Mac OS X, .m is an Objective-C  
file. However, this file does not look like Objective-C to me. Not  
sure what it's supposed to be. There is a .c file with the same name  
in the same dir.

I ran configure with:

$ ../combined/configure --prefix=/usr/local/xscale-gcc-test -- 
target=xscale-elf --enable-languages=c,c++ --disable-nls --with-newlib

My tools' versions (Mac OS X's Xcode 3.0):

$ gcc -v
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5465~16/src/configure --disable- 
checking -enable-werror --prefix=/usr --mandir=/share/man --enable- 
languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/ 
$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/ 
lib --build=i686-apple-darwin9 --with-arch=apple --with-tune=generic -- 
host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5465)


$ automake --version
automake (GNU automake) 1.10
Written by Tom Tromey <tromey@redhat.com>
        and Alexandre Duret-Lutz <adl@gnu.org>.

Copyright 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There  
is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR  
PURPOSE.


$ autoconf --version
autoconf (GNU Autoconf) 2.61
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software.  You may redistribute copies of it under the  
terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.

Written by David J. MacKenzie and Akim Demaille.


Thanks again for all your help so far!

-- 
Rick


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Need help building combined gcc/binutils/newlib
  2007-12-04 22:12   ` Rick Mann
@ 2007-12-04 23:55     ` Rask Ingemann Lambertsen
  2007-12-05  0:02       ` Rick Mann
  0 siblings, 1 reply; 6+ messages in thread
From: Rask Ingemann Lambertsen @ 2007-12-04 23:55 UTC (permalink / raw)
  To: Rick Mann; +Cc: gcc-help

On Tue, Dec 04, 2007 at 02:12:38PM -0800, Rick Mann wrote:
> binutils-2.17 is fine. So, I downloaded that and tried again, and got  
> MUCH farther, but still ran into some errors:
> 
> gcc -g -O2   -c -o flat_bl.o ../../combined/gprof/flat_bl.m
> ../../combined/gprof/flat_bl.m:2: error: syntax error before ‘%’ token
> make[4]: *** [flat_bl.o] Error 1
> make[3]: *** [all-recursive] Error 1
> make[2]: *** [all] Error 2
> make[1]: *** [all-gprof] Error 2
> make: *** [all] Error 2
> 
> I'm not sure what a .m file is. For Mac OS X, .m is an Objective-C  
> file. However, this file does not look like Objective-C to me. Not  
> sure what it's supposed to be. There is a .c file with the same name  
> in the same dir.
> 
> My tools' versions (Mac OS X's Xcode 3.0):

   Hmm, notice that gprof/Makefile.am says:

----
# This empty rule is a hack against gmake patched by Apple.
%.o:%.m

.m.c:
        awk -f $(srcdir)/gen-c-prog.awk > ./$*.c \
            FUNCTION=`(echo $*|sed -e 's,.*/,,g' -e 's/_bl//')`_blurb \
            FILE=$*.m $(srcdir)/$*.m
----

   It looks like the hack doesn't work. If you don't need gprof, deleting
combined/gprof is probably the easiest way around that problem.

-- 
Rask Ingemann Lambertsen
Danish law requires addresses in e-mail to be logged and stored for a year

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Need help building combined gcc/binutils/newlib
  2007-12-04 23:55     ` Rask Ingemann Lambertsen
@ 2007-12-05  0:02       ` Rick Mann
  2007-12-05  0:39         ` Rask Ingemann Lambertsen
  0 siblings, 1 reply; 6+ messages in thread
From: Rick Mann @ 2007-12-05  0:02 UTC (permalink / raw)
  To: Rask Ingemann Lambertsen; +Cc: gcc-help


On Dec 4, 2007, at 3:54 PM, Rask Ingemann Lambertsen wrote:

>   It looks like the hack doesn't work. If you don't need gprof,  
> deleting
> combined/gprof is probably the easiest way around that problem.

I'll consider that. In the meantime, I just deleted the three *.m  
files and it seemed to build fine after that.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Need help building combined gcc/binutils/newlib
  2007-12-05  0:02       ` Rick Mann
@ 2007-12-05  0:39         ` Rask Ingemann Lambertsen
  0 siblings, 0 replies; 6+ messages in thread
From: Rask Ingemann Lambertsen @ 2007-12-05  0:39 UTC (permalink / raw)
  To: Rick Mann; +Cc: gcc-help

On Tue, Dec 04, 2007 at 04:02:14PM -0800, Rick Mann wrote:
> 
> I'll consider that. In the meantime, I just deleted the three *.m  
> files and it seemed to build fine after that.

   I'm sorry, I forgot that you mentioned having the .c files to go with the
.m files because I'm looking at a CVS checkout which doesn't have the .c files.

-- 
Rask Ingemann Lambertsen
Danish law requires addresses in e-mail to be logged and stored for a year

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-12-05  0:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-01  2:14 Need help building combined gcc/binutils/newlib Rick Mann
2007-12-02 14:45 ` Rask Ingemann Lambertsen
2007-12-04 22:12   ` Rick Mann
2007-12-04 23:55     ` Rask Ingemann Lambertsen
2007-12-05  0:02       ` Rick Mann
2007-12-05  0:39         ` Rask Ingemann Lambertsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).