[discuss] Problem building cross compiler for x86_64

Manish Katiyar mkatiyar@gmail.com
Mon Jan 23 15:37:00 GMT 2006

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
crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
[root@nasrh4vm1 bin]# cat mygcc
#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
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

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:
-> /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:
-> /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

More information about the crossgcc mailing list