Re: Compiling llvm-gcc on amd64 with 32 bits: assembler still carps

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Compiling llvm-gcc on amd64 with 32 bits: assembler still carps

Anton Korobeynikov
Hello, Joachim.

> What's wrong?
Looks like, it uses 64-bit assembler. Could you please check installed
binutils?

--
With best regards, Anton Korobeynikov.

Faculty of Mathematics & Mechanics, Saint Petersburg State University.


_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Compiling llvm-gcc on amd64 with 32 bits: assembler still carps

Joachim Durchholz

Am Sonntag, den 30.03.2008, 19:16 +0400 schrieb Anton Korobeynikov:
> Hello, Joachim.
>
> > What's wrong?
> Looks like, it uses 64-bit assembler.

That was my assumption as well.

>  Could you please check installed binutils?

$ llvm-as -version
Low Level Virtual Machine (http://llvm.org/):
  llvm version 2.3svn
  Optimized build with assertions.

$ as --version
GNU assembler (GNU Binutils for Ubuntu) 2.18
Copyright 2007 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms
of the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `x86_64-linux-gnu'.

I'm using --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu
--target=i686-pc-linux-gnu as configure options though, so it *should*
assemble in 32-bit mode. (Unless configure or the makefiles got
something wrong and aren't determining the right options from
--build/host/target.)

Regards,
Jo

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Compiling llvm-gcc on amd64 with 32 bits: assembler still carps

Anton Korobeynikov
In reply to this post by Anton Korobeynikov
Hello, Joachim

> This assembler was configured for a target of `x86_64-linux-gnu'.
Hrm, try to check, how 'as' is invoked by llvm-gcc, you need jut to run
the mentioned cmdline 'by hands':

./xgcc -B./ -B/home/jo/i686-pc-linux-gnu/bin/
-isystem /home/jo/i686-pc-linux-gnu/include
-isystem /home/jo/i686-pc-linux-gnu/sys-include
-L/home/jo/llvm-gcc-wrk/gcc/../ld -O2  -DIN_GCC    -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition  -isystem ./include  -I. -I.
-I/home/jo/llvm-gcc-src/gcc -I/home/jo/llvm-gcc-src/gcc/.
-I/home/jo/llvm-gcc-src/gcc/../include
-I/home/jo/llvm-gcc-src/gcc/../libcpp/include
-I/home/jo/llvm-gcc-src/gcc/../libdecnumber -I../libdecnumber  -g0
-finhibit-size-directive -fno-inline-functions -fno-exceptions
-fno-zero-initialized-in-bss -fno-toplevel-reorder
-fno-omit-frame-pointer \
          -c /home/jo/llvm-gcc-src/gcc/crtstuff.c -DCRT_BEGIN \
          -o crtbegin.o

plus, add '-v' option to see, what is really executed.

--
With best regards, Anton Korobeynikov.

Faculty of Mathematics & Mechanics, Saint Petersburg State University.


_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Compiling llvm-gcc on amd64 with 32 bits: assembler still carps

Joachim Durchholz

Am Sonntag, den 30.03.2008, 21:51 +0400 schrieb Anton Korobeynikov:
> Hello, Joachim
>
> > This assembler was configured for a target of `x86_64-linux-gnu'.
> Hrm, try to check, how 'as' is invoked by llvm-gcc, you need jut to run
> the mentioned cmdline 'by hands':
> [...]
> plus, add '-v' option to see, what is really executed.

This *is* interesting. Turns out it's calling

  /home/jo/llvm-gcc-wrk/./gcc/as --traditional-format -V -Qy
  -o crtbegin.o /tmp/ccFNX5fN.s

... but the assembler is reporting

  GNU assembler version 2.18 (x86_64-linux-gnu) using BFD version (GNU
  Binutils for Ubuntu) 2.18

anyway, strange...
... ah, turns out /home/jo/llvm-gcc-wrk/./gcc/as is just a shell script
that execs /usr/bin/as, which of course is just the preinstalled 64-bit
as.
I still don't understand why it isn't getting a --32 or -m32 option,
somewhere in the configure-makefile-gcc chain there *should* be
something that's responsible for translating --build/host/target to one
of these options.

Now off to trying Tanya's approach :-)

Regards
Jo

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev