This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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: [discuss] Problem building cross compiler for x86_64


Thanks Dan,
        your mail prevented me from doing the whole stuff again. got
rid of the GPL issue. One last trouble for you guys.......when I just
copied the whole RESULT_TOP directory to a different 32 bit machine to
test if everything is working fine i ended up with errors.

[root@nasrh4vm1 bin]# ./mygcc -m32 -o hello-32 hello.c
[root@nasrh4vm1 bin]# ./hello-32
Hello world
[root@nasrh4vm1 bin]# ./mygcc -m64 -o hello-64 hello.c
/tmp/katiyar/x86_64-unknown-linux-gnu/bin/../lib/gcc-lib/x86_64-unknown-linux-gnu/3.3.3/../../../../x86_64-unknown-linux-gnu/bin/ld:
crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
[root@nasrh4vm1 bin]# cat mygcc
#!/bin/sh
#Test if -m64 option has been specified else use -m32 by default
cpp_cmd=" "$*
echo \"$cpp_cmd\"|grep " \-m64 " 2>/dev/null 1>&2
if [ $? -eq 1 ];then
   GCC=gcc
else
   GCC=x86_64-unknown-linux-gnu-gcc
fi
exec $GCC $*


I tried creating the rpms using the cross tool. The source rpm was
created successfully

[katiyar@nasvm SRPMS]$ rpm -qp crosstool-gcc-3.3.3-glibc-2.3.2-0.38-1.src.rpm -l
binutils-2.15.tar.gz
crosstool-0.38.tar.gz
crosstool-gcc-3.3.3-glibc-2.3.2.spec
gcc-3.3.3.tar.gz
glibc-2.3.2.tar.gz
glibc-linuxthreads-2.3.2.tar.gz
linux-2.4.26.tar.gz

But when I tried creating the binaries , after doing lot of builds it
ended up with errors as

RPM build errors:
    Symlink points to BuildRoot:
/usr/crosstool/gcc-3.3.3-glibc-2.3.2/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/sys-root/lib
-> /var/tmp/crosstool-gcc-3.3.3-glibc-2.3.2-0.38-1-root/usr/crosstool/gcc-3.3.3-glibc-2.3.2/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/sys-root/lib64
    Symlink points to BuildRoot:
/usr/crosstool/gcc-3.3.3-glibc-2.3.2/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/sys-root/usr/lib
-> /var/tmp/crosstool-gcc-3.3.3-glibc-2.3.2-0.38-1-root/usr/crosstool/gcc-3.3.3-glibc-2.3.2/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/sys-root/usr/lib64
  1>   %{_target}^macros:/etc/rpm/macros.*:/etc/rpm/macros:/etc/rpm...
  1<   i386-linux
  1>   %{_target}^macros:~/.rpmmacros
  1<   i386-linux
  0< /usr/lib/rpm/macros:/usr/lib/rpm/i386-linux/macros:/etc/rpm/macros.*:/etc/rpm/macros:/etc/rpm/i386-linux/macros:~/.rpmmacros
  0< /usr/lib/rpm/rpmrc
  1>   %{_target}^macros:/etc/rpm/macros.*:/etc/rpm/macros:/etc/rpm...
  1<   i386-linux
  1>   %{_target}^macros:~/.rpmmacros
  1<   i386-linux
  0< /usr/lib/rpm/macros:/usr/lib/rpm/i386-linux/macros:/etc/rpm/macros.*:/etc/rpm/macros:/etc/rpm/i386-linux/macros:~/.rpmmacros
  1>   %{_target}^macros:/usr/lib/rpm/redhat/macros:/etc/rpm/macros...
  1<   i386-linux
  1>   %{_target}^macros:~/.rpmmacros
  1<   i386-linux
  0< /usr/lib/rpm/macros:/usr/lib/rpm/i386-linux/macros:/usr/lib/rpm/redhat/macros:/etc/rpm/macros.*:/etc/rpm/macros:/etc/rpm/i386-linux/macros:~/.rpmmacros
  1>   %{_target_cpu}^
  1<   i386
  0< i386
  1>   %{_target_os}^
  1<   linux
  0< linux


My lead is OK if I can give him in a tar ball. So if you guys can just
help me to figure out which files do i need to tar to make the
compiler working on a different 32 bit machine, then I dont need to
create a rpm else please tell me where am i making mistake in creating
binary rpm.


--
Thanks & Regards,
********************************************
Manish Katiyar
***********************************************

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.org


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