public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Cross-build for x86_64-pc-mingw32
       [not found] ` <b609cb3b0711301053g178ed7c7pb7f225f3579a4591@mail.gmail.com>
@ 2007-12-01 17:23   ` FX Coudert
  2007-12-01 17:36     ` Brian Dessent
  0 siblings, 1 reply; 8+ messages in thread
From: FX Coudert @ 2007-12-01 17:23 UTC (permalink / raw)
  To: mingw-w64-public; +Cc: gcc-help

OK, thanks to Nightstrike, I've fixed that part of the build. Now,  
I'm trying to build a cross-compiler hosted on i386-pc-mingw32 and  
targetting x86_64-pc-mingw32. I do that by having a directory $HOME/ 
win64 which contains:
   - $HOME/win64/x86_64-pc-mingw32/bin: the binutils targetting win64
   - $HOME/win64/x86_64-pc-mingw32/include: the headers
   - $HOME/win64/x86_64-pc-mingw32/lib: the linker scripts (probably  
not useful)
   - $HOME/win64/x86_64-pc-mingw32/lib64: the CRT

I have also create directory named $HOME/win64/mingw, which is a copy  
of $HOME/win64/x86_64-pc-mingw32 (otherwise, the build dies in  
fixincludes because it's trying to get the target headers from $HOME/ 
win64/x86_64-pc-mingw32/include).

I configure GCC with: ../trunk/configure --prefix=/home/FX/win64 -- 
with-sysroot=/home/FX/win64 --build=i386-pc-mingw32 --target=x86_64- 
pc-mingw32 --enable-languages=c,fortran --with-gmp=/home/FX/local -- 
disable-werror --disable-nls --enable-threads=win32

Now, the strange thing is that this build dies while configure target- 
libgfortran, with:

> checking dependency style of /home/FX/ibin64/./gcc/xgcc -B/home/FX/ 
> ibin64/./gcc/ -L/home/FX/ibin64/x86_64-pc-mingw32/winsup/mingw -L/ 
> home/FX/ibin64/x86_64-pc-mingw32/winsup/w32api/lib -isystem /home/ 
> FX/trunk/winsup/mingw/include -isystem /home/FX/trunk/winsup/w32api/ 
> include -B/home/FX/win64/x86_64-pc-mingw32/bin/ -B/home/FX/win64/ 
> x86_64-pc-mingw32/lib/ -isystem /home/FX/win64/x86_64-pc-mingw32/ 
> include -isystem /home/FX/win64/x86_64-pc-mingw32/sys-include... gcc3
> checking whether symbol versioning is supported... configure:  
> error: Link tests are not allowed after GCC_NO_EXECUTABLES.
> make[1]: *** [configure-target-libgfortran] Error 1
> make[1]: Leaving directory `/home/FX/ibin64'

I know I had this working at some earlier point, so it's probably  
that configure line is not the one I used last time. The most likely  
culprit is, I think, --with-sysroot, so I'm running another build  
without it, but in the meantime I'd appreciate any hint: is it the  
way it should be done? (and thus, an issue with the GCC build system)

FX

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

* Re: Cross-build for x86_64-pc-mingw32
  2007-12-01 17:23   ` Cross-build for x86_64-pc-mingw32 FX Coudert
@ 2007-12-01 17:36     ` Brian Dessent
  2007-12-01 18:39       ` FX Coudert
  0 siblings, 1 reply; 8+ messages in thread
From: Brian Dessent @ 2007-12-01 17:36 UTC (permalink / raw)
  To: FX Coudert; +Cc: mingw-w64-public, gcc-help

FX Coudert wrote:

> > checking dependency style of /home/FX/ibin64/./gcc/xgcc -B/home/FX/
> > ibin64/./gcc/ -L/home/FX/ibin64/x86_64-pc-mingw32/winsup/mingw -L/
> > home/FX/ibin64/x86_64-pc-mingw32/winsup/w32api/lib -isystem /home/
> > FX/trunk/winsup/mingw/include -isystem /home/FX/trunk/winsup/w32api/
> > include -B/home/FX/win64/x86_64-pc-mingw32/bin/ -B/home/FX/win64/
> > x86_64-pc-mingw32/lib/ -isystem /home/FX/win64/x86_64-pc-mingw32/
> > include -isystem /home/FX/win64/x86_64-pc-mingw32/sys-include... gcc3
> > checking whether symbol versioning is supported... configure:
> > error: Link tests are not allowed after GCC_NO_EXECUTABLES.
> > make[1]: *** [configure-target-libgfortran] Error 1
> > make[1]: Leaving directory `/home/FX/ibin64'
> 
> I know I had this working at some earlier point, so it's probably
> that configure line is not the one I used last time. The most likely
> culprit is, I think, --with-sysroot, so I'm running another build
> without it, but in the meantime I'd appreciate any hint: is it the
> way it should be done? (and thus, an issue with the GCC build system)

That error means that something went wrong earlier.  Look upwards at
config.log and you will see somewhere that it tried to do a link test
that fails, typically due to missing or improper crt*.o, and thus it set
the NO_EXECUTABLES flag.  From that point on, the next test that tries
to link something will give that error, but the problem was whatever
test failed originally.  The details should all be in config.log.

Brian

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

* Re: Cross-build for x86_64-pc-mingw32
  2007-12-01 17:36     ` Brian Dessent
@ 2007-12-01 18:39       ` FX Coudert
  2007-12-01 20:50         ` NightStrike
       [not found]         ` <4751c936.073a360a.4d2f.ffffd1bfSMTPIN_ADDED@mx.google.com>
  0 siblings, 2 replies; 8+ messages in thread
From: FX Coudert @ 2007-12-01 18:39 UTC (permalink / raw)
  To: gcc-help; +Cc: mingw-w64-public

> That error means that something went wrong earlier.  Look upwards at
> config.log and you will see somewhere that it tried to do a link test
> that fails, typically due to missing or improper crt*.o, and thus  
> it set
> the NO_EXECUTABLES flag.  From that point on, the next test that tries
> to link something will give that error, but the problem was whatever
> test failed originally.  The details should all be in config.log.

OK, thanks a lot for the explanation. I grepped for gcc_no_link and  
found that crt2.o was not found, because the latest mingw-win64 crt  
puts it in lib64/ while GCC expect it to be in lib/. That brings two  
questions: 1. is the lib64/ choice final, and should GCC be modified  
to find libraries there? 2. has there been any attempt at building a  
multilib -m32/-m64 mingw compiler?

Thanks,
FX

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

* Re: Cross-build for x86_64-pc-mingw32
  2007-12-01 18:39       ` FX Coudert
@ 2007-12-01 20:50         ` NightStrike
       [not found]         ` <4751c936.073a360a.4d2f.ffffd1bfSMTPIN_ADDED@mx.google.com>
  1 sibling, 0 replies; 8+ messages in thread
From: NightStrike @ 2007-12-01 20:50 UTC (permalink / raw)
  To: FX Coudert; +Cc: gcc-help, mingw-w64-public

On Dec 1, 2007 1:38 PM, FX Coudert <fxcoudert@gmail.com> wrote:
> OK, thanks a lot for the explanation. I grepped for gcc_no_link and
> found that crt2.o was not found, because the latest mingw-win64 crt
> puts it in lib64/ while GCC expect it to be in lib/. That brings two
> questions: 1. is the lib64/ choice final, and should GCC be modified
> to find libraries there? 2. has there been any attempt at building a
> multilib -m32/-m64 mingw compiler?

Moving the files from lib64 to lib is easy to do, though I'm not sure
what the correct location is (lib64 or lib).  We will be adding
multilib support soon, so this is a decision that will have impact.
Do we put 64-bit libraries in lib and 32-bit in lib32?  or 32-bit
libraries in lib and 64-bit in lib64?  Or use lib32 and lib64 and put
nothing in lib?  I know how to do each in terms of the build process,
but I don't know which is correct.

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

* Re: Cross-build for x86_64-pc-mingw32
       [not found]         ` <4751c936.073a360a.4d2f.ffffd1bfSMTPIN_ADDED@mx.google.com>
@ 2007-12-01 21:09           ` FX Coudert
  2007-12-02 17:23             ` NightStrike
  0 siblings, 1 reply; 8+ messages in thread
From: FX Coudert @ 2007-12-01 21:09 UTC (permalink / raw)
  To: tprince; +Cc: gcc-help, mingw-w64-public

> Don't linux x86-64 builds of gcc look for 64-bit support in lib64/  
> and 32-bit in lib/ ?  It looks reasonable to me to follow the same  
> plan.

All linux distros except Debian-based ones, IIRC. I think that, since  
current mingw32 has libs in lib/, it would be better to have lib64/  
and lib/.

FX

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

* Re: Cross-build for x86_64-pc-mingw32
  2007-12-01 21:09           ` FX Coudert
@ 2007-12-02 17:23             ` NightStrike
  2007-12-02 17:37               ` FX Coudert
  0 siblings, 1 reply; 8+ messages in thread
From: NightStrike @ 2007-12-02 17:23 UTC (permalink / raw)
  To: FX Coudert; +Cc: tprince, gcc-help, mingw-w64-public

On 12/1/07, FX Coudert <fxcoudert@gmail.com> wrote:
> > Don't linux x86-64 builds of gcc look for 64-bit support in lib64/
> > and 32-bit in lib/ ?  It looks reasonable to me to follow the same
> > plan.
>
> All linux distros except Debian-based ones, IIRC. I think that, since
> current mingw32 has libs in lib/, it would be better to have lib64/
> and lib/.

This is easy enough to do in terms of editing the automake file.  What
is necessary in terms of modifying gcc itself to search those places?

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

* Re: Cross-build for x86_64-pc-mingw32
  2007-12-02 17:23             ` NightStrike
@ 2007-12-02 17:37               ` FX Coudert
  2007-12-23 19:54                 ` NightStrike
  0 siblings, 1 reply; 8+ messages in thread
From: FX Coudert @ 2007-12-02 17:37 UTC (permalink / raw)
  To: NightStrike; +Cc: tprince, gcc-help, mingw-w64-public

> This is easy enough to do in terms of editing the automake file.  What
> is necessary in terms of modifying gcc itself to search those places?

Multilib configurations can be found in gcc/config/i386/t-* ; we  
probably will need to add one similar to gcc/config/i386/t-linux64

FX

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

* Re: Cross-build for x86_64-pc-mingw32
  2007-12-02 17:37               ` FX Coudert
@ 2007-12-23 19:54                 ` NightStrike
  0 siblings, 0 replies; 8+ messages in thread
From: NightStrike @ 2007-12-23 19:54 UTC (permalink / raw)
  To: FX Coudert; +Cc: tprince, gcc-help, mingw-w64-public, Kai Tietz

On 12/2/07, FX Coudert <fxcoudert@gmail.com> wrote:
> > This is easy enough to do in terms of editing the automake file.  What
> > is necessary in terms of modifying gcc itself to search those places?
>
> Multilib configurations can be found in gcc/config/i386/t-* ; we
> probably will need to add one similar to gcc/config/i386/t-linux64

Kai, any input on this?  We should come to a resolution at some point.

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

end of thread, other threads:[~2007-12-23 19:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <19c433eb0711300950r43f1ccffi28ef6b7a2e51548d@mail.gmail.com>
     [not found] ` <b609cb3b0711301053g178ed7c7pb7f225f3579a4591@mail.gmail.com>
2007-12-01 17:23   ` Cross-build for x86_64-pc-mingw32 FX Coudert
2007-12-01 17:36     ` Brian Dessent
2007-12-01 18:39       ` FX Coudert
2007-12-01 20:50         ` NightStrike
     [not found]         ` <4751c936.073a360a.4d2f.ffffd1bfSMTPIN_ADDED@mx.google.com>
2007-12-01 21:09           ` FX Coudert
2007-12-02 17:23             ` NightStrike
2007-12-02 17:37               ` FX Coudert
2007-12-23 19:54                 ` NightStrike

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