public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/53662] New: Cannot build static gcc on i686 linux gnu with -m64 support.
@ 2012-06-13 20:56 krejzi at email dot com
  2012-06-13 21:13 ` [Bug c/53662] " redi at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: krejzi at email dot com @ 2012-06-13 20:56 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53662

             Bug #: 53662
           Summary: Cannot build static gcc on i686 linux gnu with -m64
                    support.
    Classification: Unclassified
           Product: gcc
           Version: 4.6.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: krejzi@email.com


Hello there. I am not sure if something is wrong with my setup, but I am unable
to build gcc multilib compiler.

I have pure 32bit system built from scratch (Linux From Scratch), but I would
like to have multilib compiler so I can compile 64bit kernel in 32bit userland
(not cross-compile).

Long story short, I am unable to bootstrap gcc to support -m64.

~/src/build/prev-gcc$ ./xgcc -v
Using built-in specs.
COLLECT_GCC=./xgcc
Target: i686-pc-linux-gnu
Configured with: ../src/configure --prefix=/usr/gcc --libdir=/usr/gcc/lib
--libexecdir=/usr/gcc/lib --without-headers --with-newlib --disable-shared
--disable-nls --disable-decimal-float --disable-libgomp --disable-libmudflap
--disable-libquadmath --disable-libssp --disable-threads --without-ppl
--without-cloog --enable-targets=i686-pc-linux-gnu,x86_64-unknown-linux-gnu
--with-mpfr-include=/home/armin/src/src/mpfr/src
--with-mpfr-lib=/home/armin/src/build/mpfr/.libs --enable-multilib
--with-multilib-list=m32,m64,mx32 --enable-bootstrap --enable-languages=c
Thread model: single
gcc version 4.6.3 (GCC) 

~/src/build/prev-gcc$ ./cc1 --help
...
  -m32                                [enabled]
  -m3dnow                             [disabled]
  -m64                                [disabled]
...

These are from stage2 and remain same after stage3, even when installed. It
just says "Sorry, 64bit mode not implemented" or whatever when I try to compile
something with gcc -m64.

I have built binutils with --enable-multilib support already, so I am not
really sure what I've done wrong. Shared gcc libraries require 64bit glibc and
since I don't have multilib compiler, I can't compile it ... So I am in catch22
situation. It looks like you need multilib compiler to compile multilib
compiler.

Also, I have tried without --with-multilib-lists, without --enable-targets, it
was same. Just when I used --enable-targets=all, it failed saying that 64bit
mode is unimplemeted after stage1 xgcc has been built.

Also, I have tried with system gmp, mpfr and mpc libraries which are same
versions as ones that are in gcc source tree (source dirs renamed into mpfr,
gmp and mpc respectively).

This is configure output from stage1 libgcc when using --enable-targets=all

checking whether ln -s works... yes
checking for i686-pc-linux-gnu-gcc... /home/armin/src/build/./gcc/xgcc
-B/home/armin/src/build/./gcc/ -B/usr/gcc/i686-pc-linux-gnu/bin/
-B/usr/gcc/i686-pc-linux-gnu/lib/ -isystem /usr/gcc/i686-pc-linux-gnu/include
-isystem /usr/gcc/i686-pc-linux-gnu/sys-include  -m64
checking for suffix of object files... configure: error: in
`/home/armin/src/build/i686-pc-linux-gnu/64/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.

and config.log says this:

Assembler messages:
Fatal error: no compiled in support for x86_64
configure:3058: $? = 1

So, is this really a problem in gcc bootstrap or my setup? And how else I am
able to build multilib compiler just from pure 32bit system? There must be a
way right?


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

* [Bug c/53662] Cannot build static gcc on i686 linux gnu with -m64 support.
  2012-06-13 20:56 [Bug c/53662] New: Cannot build static gcc on i686 linux gnu with -m64 support krejzi at email dot com
@ 2012-06-13 21:13 ` redi at gcc dot gnu.org
  2012-06-13 21:17 ` krejzi at email dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2012-06-13 21:13 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53662

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-06-13 21:12:57 UTC ---
(In reply to comment #0)
> Assembler messages:
> Fatal error: no compiled in support for x86_64
> configure:3058: $? = 1

That means you need a 64-bit capable binutils.

Just a guess, but you might need to use --target=x86_64-unknown-linux-gnu to
make a cross compiler for x86_64, which will be multilib-capable by default. 
To do that you'll need a 64-bit binutils and 64-bit glibc.

This should really be dealt with on the gcc-help mailing list, I don't think
it's a bug.


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

* [Bug c/53662] Cannot build static gcc on i686 linux gnu with -m64 support.
  2012-06-13 20:56 [Bug c/53662] New: Cannot build static gcc on i686 linux gnu with -m64 support krejzi at email dot com
  2012-06-13 21:13 ` [Bug c/53662] " redi at gcc dot gnu.org
@ 2012-06-13 21:17 ` krejzi at email dot com
  2012-06-13 23:12 ` redi at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: krejzi at email dot com @ 2012-06-13 21:17 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53662

--- Comment #2 from Armin K. <krejzi at email dot com> 2012-06-13 21:17:35 UTC ---
(In reply to comment #1)
> 
> That means you need a 64-bit capable binutils.
> 
> Just a guess, but you might need to use --target=x86_64-unknown-linux-gnu to
> make a cross compiler for x86_64, which will be multilib-capable by default. 
> To do that you'll need a 64-bit binutils and 64-bit glibc.
> 
> This should really be dealt with on the gcc-help mailing list, I don't think
> it's a bug.

Sorry, I meant that this might be bug in gcc bootstrap stage. As I said, I have
compiled binutils with --enable-multilib ... I could try --enable-64-bit-bfd
tough. Also, what is gcc-help mailing list address?


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

* [Bug c/53662] Cannot build static gcc on i686 linux gnu with -m64 support.
  2012-06-13 20:56 [Bug c/53662] New: Cannot build static gcc on i686 linux gnu with -m64 support krejzi at email dot com
  2012-06-13 21:13 ` [Bug c/53662] " redi at gcc dot gnu.org
  2012-06-13 21:17 ` krejzi at email dot com
@ 2012-06-13 23:12 ` redi at gcc dot gnu.org
  2012-11-26  4:01 ` bugfeed at online dot de
  2014-06-30 19:33 ` mpolacek at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2012-06-13 23:12 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53662

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-06-13 23:12:16 UTC ---
gcc-help@gcc.gnu.org

See http://gcc.gnu.org/lists.html


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

* [Bug c/53662] Cannot build static gcc on i686 linux gnu with -m64 support.
  2012-06-13 20:56 [Bug c/53662] New: Cannot build static gcc on i686 linux gnu with -m64 support krejzi at email dot com
                   ` (2 preceding siblings ...)
  2012-06-13 23:12 ` redi at gcc dot gnu.org
@ 2012-11-26  4:01 ` bugfeed at online dot de
  2014-06-30 19:33 ` mpolacek at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: bugfeed at online dot de @ 2012-11-26  4:01 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53662

Leif Leonhardy <bugfeed at online dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugfeed at online dot de

--- Comment #4 from Leif Leonhardy <bugfeed at online dot de> 2012-11-26 04:01:07 UTC ---
(In reply to comment #2)
> (In reply to comment #1)
> > 
> > That means you need a 64-bit capable binutils.
> > 
> > Just a guess, but you might need to use --target=x86_64-unknown-linux-gnu to
> > make a cross compiler for x86_64, which will be multilib-capable by default. 
> > To do that you'll need a 64-bit binutils and 64-bit glibc.
> > 
> > This should really be dealt with on the gcc-help mailing list, I don't think
> > it's a bug.
> 
> Sorry, I meant that this might be bug in gcc bootstrap stage. As I said, I have
> compiled binutils with --enable-multilib ... I could try --enable-64-bit-bfd
> tough.

That's not what you /could try/, that's what you *have to* do... ;-)

I.e., configure binutils with '--enable-64-bit-bfd --enable-targets=all'
(e.g.), otherwise the built 'gas' bails out on '--64'.


-leif


P.S.: I'm currently trying to build a "multilib" GCC 4.7.2 on a Pentium4
(a.k.a. i786), i.e., x86 system.  Build goes fine until libquadmath's
'configure' tries to *run* executables built with '-m64' (which of courseTM
cannot work).  No idea why it's attempting that -- probably because
host==build==target==pentium4-linux-gnu and it doesn't notice that we're
"cross-compiling" in the 64/ directory.  The other libs built just fine (e.g.
libssp).


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

* [Bug c/53662] Cannot build static gcc on i686 linux gnu with -m64 support.
  2012-06-13 20:56 [Bug c/53662] New: Cannot build static gcc on i686 linux gnu with -m64 support krejzi at email dot com
                   ` (3 preceding siblings ...)
  2012-11-26  4:01 ` bugfeed at online dot de
@ 2014-06-30 19:33 ` mpolacek at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-06-30 19:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53662

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |mpolacek at gcc dot gnu.org
         Resolution|---                         |INVALID

--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Looks like there's nothing to do, closing.


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

end of thread, other threads:[~2014-06-30 19:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-13 20:56 [Bug c/53662] New: Cannot build static gcc on i686 linux gnu with -m64 support krejzi at email dot com
2012-06-13 21:13 ` [Bug c/53662] " redi at gcc dot gnu.org
2012-06-13 21:17 ` krejzi at email dot com
2012-06-13 23:12 ` redi at gcc dot gnu.org
2012-11-26  4:01 ` bugfeed at online dot de
2014-06-30 19:33 ` mpolacek at gcc dot gnu.org

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).