public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/14666] New: Crossing from GNU/Linux to MinGW requires SEVERAL hacks
@ 2004-03-21  3:33 stl at caltech dot edu
  2004-03-21  3:41 ` [Bug target/14666] " pinskia at gcc dot gnu dot org
                   ` (14 more replies)
  0 siblings, 15 replies; 19+ messages in thread
From: stl at caltech dot edu @ 2004-03-21  3:33 UTC (permalink / raw)
  To: gcc-bugs

When crossing from GNU/Linux to MinGW, I can successfully build cross 
binutils, cross gcc, and crossed-native gcc, but doing so requires a number of 
individual hacks, none of which I think should be necessary. (Building cross 
binutils requires no hacks - this is not a binutils bug.)

cross.sh which I run on GNU/Linux:


#!/bin/sh

echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
echo @ Initializing script.
echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
read dummy

CROSS_ROOT=/home/stl/cross
BU_SRC=$CROSS_ROOT/binutils-src
BU_BUILD=$CROSS_ROOT/binutils-build
XGCC_SRC=$CROSS_ROOT/xgcc-src
XGCC_BUILD=$CROSS_ROOT/xgcc-build
XGCC_DEST=$CROSS_ROOT/xgcc-dest
WINGCC_SRC=$CROSS_ROOT/wingcc-src
WINGCC_BUILD=$CROSS_ROOT/wingcc-build
WINGCC_DEST=$CROSS_ROOT/wingcc-dest

CONFIGURY1='--build=i686-pc-linux-gnu --target=mingw32 --enable-
languages=c,c++'
CONFIGURY2='--disable-nls --disable-debug --disable-shared --disable-win32-
registry'
CONFIGURY3='--without-newlib --enable-threads=win32 --enable-sjlj-exceptions'
CONFIGURY4='--with-gnu-as --with-gnu-ld --with-gcc'

export CC=gcc
export CXX=g++
export AS=as
export LD=ld
export AR=ar
export CFLAGS='-O3 -fomit-frame-pointer -ffast-math'
export CXXFLAGS=$CFLAGS
export LIBCFLAGS=$CFLAGS
export LIBCXXFLAGS=$CFLAGS
export BOOT_CFLAGS=$CFLAGS
export LDFLAGS='-s'

mkdir -p $BU_BUILD $XGCC_BUILD $XGCC_DEST/mingw32 $WINGCC_BUILD \
    $WINGCC_DEST/mingw32 $WINGCC_DEST/include

cd $CROSS_ROOT

echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
echo @ Dump mingw-runtime-3.2.tar and w32api-2.5.tar into CROSS_ROOT.
echo @ They must be binaries that extract to bin, include, lib.
echo @
echo @ Dump gcc-3.3.3-truemingw.tar into CROSS_ROOT.
echo @ It must be source that extracts to gcc-3.3.3-truemingw.
echo @
echo @ Dump binutils-2.15.90-20040222-1-src.tar into CROSS_ROOT.
echo @ It must be source that extracts to binutils-2.15.90-20040222-1.
echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
read dummy

echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
echo @ Extracting.
echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
read dummy

tar xf mingw-runtime-3.2.tar -C $XGCC_DEST/mingw32
tar xf w32api-2.5.tar -C $XGCC_DEST/mingw32
tar xf mingw-runtime-3.2.tar -C $WINGCC_DEST/mingw32
tar xf w32api-2.5.tar -C $WINGCC_DEST/mingw32
tar xf gcc-3.3.3-truemingw.tar

echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
echo @ Hacking.
echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
read dummy

mkdir -p $CROSS_ROOT/gcc-3.3.3-truemingw/libstdc++-v3/config/config/os/newlib
cp $CROSS_ROOT/gcc-3.3.3-truemingw/libstdc++-v3/config/os/mingw32/* \
   $CROSS_ROOT/gcc-3.3.3-truemingw/libstdc++-v3/config/config/os/newlib

echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
echo @ Hacking.
echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
read dummy

cd $CROSS_ROOT/gcc-3.3.3-truemingw
patch -p1 < $CROSS_ROOT/crossfix.patch
cd $CROSS_ROOT

echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
echo @ Extracting.
echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
read dummy

cp -r gcc-3.3.3-truemingw $XGCC_SRC
mv gcc-3.3.3-truemingw $WINGCC_SRC
tar xf binutils-2.15.90-20040222-1-src.tar
mv binutils-2.15.90-20040222-1 $BU_SRC
chmod 700 $BU_SRC/configure $XGCC_SRC/configure $WINGCC_SRC/configure

echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
echo @ Configuring binutils.
echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
read dummy

cd $BU_BUILD
$BU_SRC/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu \
    --target=mingw32 --prefix=$XGCC_DEST --disable-nls --disable-shared \
    --disable-debug --enable-threads=win32

echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
echo @ Making binutils.
echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
read dummy

make

echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
echo @ Installing binutils.
echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
read dummy

make install

echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
echo @ Configuring xgcc.
echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
read dummy

export PATH=$XGCC_DEST/bin:$PATH
cd $XGCC_BUILD
$XGCC_SRC/configure --prefix=$XGCC_DEST --host=i686-pc-linux-gnu \
    $CONFIGURY1 $CONFIGURY2 $CONFIGURY3 $CONFIGURY4

echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
echo @ Making xgcc.
echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
read dummy

make

echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
echo @ Installing xgcc.
echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
read dummy

make install

echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
echo @ Configuring wingcc.
echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
read dummy

export CC=$XGCC_DEST/bin/mingw32-gcc
export CXX=$XGCC_DEST/bin/mingw32-g++
export AS=$XGCC_DEST/bin/mingw32-as
export LD=$XGCC_DEST/bin/mingw32-ld
export AR=$XGCC_DEST/bin/mingw32-ar
export LDFLAGS='-s -Wl,--stack=0x00800000'
cd $WINGCC_BUILD
$WINGCC_SRC/configure --prefix=$WINGCC_DEST --host=mingw32 --with-as=$AS \
    --with-ld=$LD $CONFIGURY1 $CONFIGURY2 $CONFIGURY3 $CONFIGURY4

echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
echo @ Hacking.
echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
read dummy

cp $WINGCC_BUILD/gcc/auto-host.h $WINGCC_BUILD/gcc/auto-build.h

echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
echo @ Making wingcc.
echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
read dummy

make

echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
echo @ Installing wingcc.
echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
read dummy

make install

echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
echo @ Finished! The final product is in WINGCC_DEST.
echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@


See the notes that say "Hacking." If the first hack is not performed, building 
the cross gcc fails with a complaint about missing headers.  If the second 
hack, which uses crossfix.patch:

diff -aur gcc-3.3.3-truemingw/libstdc++-v3/include/bits/char_traits.h gcc-
3.3.3-truemingw-new/libstdc++-v3/include/bits/char_traits.h
--- gcc-3.3.3-truemingw/libstdc++-v3/include/bits/char_traits.h	2003-10-07 
18:15:05.000000000 -0700
+++ gcc-3.3.3-truemingw-new/libstdc++-v3/include/bits/char_traits.h	2004-
03-19 20:26:29.000000000 -0800
@@ -181,7 +181,7 @@
   };
 
 
-#if defined (_GLIBCPP_USE_WCHAR_T) || defined (_GLIBCPP_USE_WSTRING)
+#if 0
   /// 21.1.3.2  char_traits specializations
   template<>
     struct char_traits<wchar_t>

is not performed, building the cross gcc fails with a complaint about missing 
functions. See http://gcc.gnu.org/ml/gcc/2004-03/msg01182.html , where Gabriel 
Dos Reis says,

> As you probably know, in the nutshell, native builds on MinGW or
> Cygwin do not have support for wchar_t so correponding support in
> libstdc++ is disabled.  It looks like when building the cross, you did
> -not- take that fact into consideration and somehow requested support
> for wchar_t while the underlying C functions are missing.

I didn't request any such support (you can see the configure lines right 
there), so something in gcc is misbehaving.  The later suggestion to configure 
with --disable-c-mbchar did not affect the problem, only the #if 0 eliminated 
it.

If the third hack is not performed, building the crossed-native fails with a 
complaint about "no rule to make auto-build.h". By looking into the configure 
scripts, I guessed that auto-build.h was a copy of auto-host.h.

Finally, a fourth hack:

cp $WINGCC_DEST/mingw32/lib/crt2.o $WINGCC_DEST/lib/gcc-
lib/mingw32/3.3.3/crt2.o

is necessary, otherwise crt2.o cannot be found when compiling C or C++ 
programs.

All of these hacks seem to work, but I'd feel a lot better if they were not 
necessary.

I don't remember having to perform any of these hacks when crossing the 3.3 I 
currently use (in particular I know I didn't have to do the fourth one), so 
these are probably all regressions.

-- 
           Summary: Crossing from GNU/Linux to MinGW requires SEVERAL hacks
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: stl at caltech dot edu
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: mingw32
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: mingw32


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


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

* [Bug target/14666] Crossing from GNU/Linux to MinGW requires SEVERAL hacks
  2004-03-21  3:33 [Bug target/14666] New: Crossing from GNU/Linux to MinGW requires SEVERAL hacks stl at caltech dot edu
@ 2004-03-21  3:41 ` pinskia at gcc dot gnu dot org
  2004-03-21  3:43 ` ian at wasabisystems dot com
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-21  3:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-21 03:41 -------
For the first part, it is a configure bug, can you attach the config.log for libstdc++?

-- 


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


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

* [Bug target/14666] Crossing from GNU/Linux to MinGW requires SEVERAL hacks
  2004-03-21  3:33 [Bug target/14666] New: Crossing from GNU/Linux to MinGW requires SEVERAL hacks stl at caltech dot edu
  2004-03-21  3:41 ` [Bug target/14666] " pinskia at gcc dot gnu dot org
@ 2004-03-21  3:43 ` ian at wasabisystems dot com
  2004-03-21  4:12 ` stl at caltech dot edu
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: ian at wasabisystems dot com @ 2004-03-21  3:43 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ian at wasabisystems dot com


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


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

* [Bug target/14666] Crossing from GNU/Linux to MinGW requires SEVERAL hacks
  2004-03-21  3:33 [Bug target/14666] New: Crossing from GNU/Linux to MinGW requires SEVERAL hacks stl at caltech dot edu
  2004-03-21  3:41 ` [Bug target/14666] " pinskia at gcc dot gnu dot org
  2004-03-21  3:43 ` ian at wasabisystems dot com
@ 2004-03-21  4:12 ` stl at caltech dot edu
  2004-03-21  4:17 ` pinskia at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: stl at caltech dot edu @ 2004-03-21  4:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From stl at caltech dot edu  2004-03-21 04:12 -------
Created an attachment (id=5953)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5953&action=view)
$XGCC_BUILD/gcc/config.log


-- 


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


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

* [Bug target/14666] Crossing from GNU/Linux to MinGW requires SEVERAL hacks
  2004-03-21  3:33 [Bug target/14666] New: Crossing from GNU/Linux to MinGW requires SEVERAL hacks stl at caltech dot edu
                   ` (2 preceding siblings ...)
  2004-03-21  4:12 ` stl at caltech dot edu
@ 2004-03-21  4:17 ` pinskia at gcc dot gnu dot org
  2004-03-21  5:16 ` stl at caltech dot edu
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-21  4:17 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-21 04:17 -------
That is the wrong config.log, the one I would like is in $XGCC_BUILD/mingw32-*/libstdc++.

-- 


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


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

* [Bug target/14666] Crossing from GNU/Linux to MinGW requires SEVERAL hacks
  2004-03-21  3:33 [Bug target/14666] New: Crossing from GNU/Linux to MinGW requires SEVERAL hacks stl at caltech dot edu
                   ` (3 preceding siblings ...)
  2004-03-21  4:17 ` pinskia at gcc dot gnu dot org
@ 2004-03-21  5:16 ` stl at caltech dot edu
  2004-03-21  5:40 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: stl at caltech dot edu @ 2004-03-21  5:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From stl at caltech dot edu  2004-03-21 05:16 -------
Created an attachment (id=5954)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5954&action=view)
$XGCC_BUILD/mingw32/libstdc++-v3/config.log


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #5953 is|0                           |1
           obsolete|                            |


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


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

* [Bug target/14666] Crossing from GNU/Linux to MinGW requires SEVERAL hacks
  2004-03-21  3:33 [Bug target/14666] New: Crossing from GNU/Linux to MinGW requires SEVERAL hacks stl at caltech dot edu
                   ` (4 preceding siblings ...)
  2004-03-21  5:16 ` stl at caltech dot edu
@ 2004-03-21  5:40 ` pinskia at gcc dot gnu dot org
  2004-03-21  7:06 ` stl at caltech dot edu
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-21  5:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-21 05:40 -------
The first and second problem is in libstdc++'s configure.in (also in crossconfig.m4 on the 3.4 branch 
and the mainline):
  *-mingw32*)
    AC_CHECK_HEADERS([sys/types.h locale.h float.h])
    GLIBCXX_CHECK_LINKER_FEATURES
    GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
    GLIBCXX_CHECK_WCHAR_T_SUPPORT

It does not match the target which you used.  The first and second problem can be worked around by 
instead using i686-mingw32 or i386-mingw32 instead.

The thrid might be solved by doing the same also but I do not know.

-- 


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


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

* [Bug target/14666] Crossing from GNU/Linux to MinGW requires SEVERAL hacks
  2004-03-21  3:33 [Bug target/14666] New: Crossing from GNU/Linux to MinGW requires SEVERAL hacks stl at caltech dot edu
                   ` (5 preceding siblings ...)
  2004-03-21  5:40 ` pinskia at gcc dot gnu dot org
@ 2004-03-21  7:06 ` stl at caltech dot edu
  2004-03-21  7:12 ` stl at caltech dot edu
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: stl at caltech dot edu @ 2004-03-21  7:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From stl at caltech dot edu  2004-03-21 07:06 -------
If I use i686-pc-mingw32 instead of mingw32, and remove the hacks, making the 
cross gcc fails with:

make[3]: Leaving directory `/home/stl/cross/xgcc-build/i686-pc-
mingw32/libstdc++-v3'
Making all in include
make[3]: Entering directory `/home/stl/cross/xgcc-build/i686-pc-
mingw32/libstdc++-v3/include'
sed -e '/^#/s/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_][ABCDEFGHIJKLMNOPQRSTUVWXYZ_]
*\)/_GLIBCPP_\1/g' \
    -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
    < /home/stl/cross/xgcc-src/libstdc++-v3/../gcc/gthr.h > i686-pc-
mingw32/bits/gthr.h
sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
    -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCPP_\1/g' \
    < /home/stl/cross/xgcc-src/libstdc++-v3/../gcc/gthr-single.h > i686-pc-
mingw32/bits/gthr-single.h
sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
    -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCPP_\1/g' \
    -e 's/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*WEAK\)/_GLIBCPP_\1/g' \
    < /home/stl/cross/xgcc-src/libstdc++-v3/../gcc/gthr-posix.h > i686-pc-
mingw32/bits/gthr-posix.h
sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
    -e 's/\(GCC[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*_H\)/_GLIBCPP_\1/g' \
    -e 's/\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_]*WEAK\)/_GLIBCPP_\1/g' \
    -e 's,^#include "\(.*\)",#include <bits/\1>,g' \
    < /home/stl/cross/xgcc-src/libstdc++-v3/../gcc/gthr-win32.h > i686-pc-
mingw32/bits/gthr-default.h
make[3]: *** No rule to make target `/home/stl/cross/xgcc-src/libstdc++-
v3/config/config/os/newlib/ctype_base.h', needed by `stamp-target'.  Stop.
make[3]: Leaving directory `/home/stl/cross/xgcc-build/i686-pc-
mingw32/libstdc++-v3/include'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/stl/cross/xgcc-build/i686-pc-
mingw32/libstdc++-v3'
make[1]: *** [all-recursive-am] Error 2
make[1]: Leaving directory `/home/stl/cross/xgcc-build/i686-pc-
mingw32/libstdc++-v3'
make: *** [all-target-libstdc++-v3] Error 2

So it looks like this does NOT affect the need for the first hack.

-- 


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


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

* [Bug target/14666] Crossing from GNU/Linux to MinGW requires SEVERAL hacks
  2004-03-21  3:33 [Bug target/14666] New: Crossing from GNU/Linux to MinGW requires SEVERAL hacks stl at caltech dot edu
                   ` (6 preceding siblings ...)
  2004-03-21  7:06 ` stl at caltech dot edu
@ 2004-03-21  7:12 ` stl at caltech dot edu
  2004-03-29 21:16 ` stl at caltech dot edu
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: stl at caltech dot edu @ 2004-03-21  7:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From stl at caltech dot edu  2004-03-21 07:12 -------
Created an attachment (id=5955)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5955&action=view)
$XGCC_BUILD/i686-pc-mingw32/libstdc++-v3/config.log


-- 


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


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

* [Bug target/14666] Crossing from GNU/Linux to MinGW requires SEVERAL hacks
  2004-03-21  3:33 [Bug target/14666] New: Crossing from GNU/Linux to MinGW requires SEVERAL hacks stl at caltech dot edu
                   ` (7 preceding siblings ...)
  2004-03-21  7:12 ` stl at caltech dot edu
@ 2004-03-29 21:16 ` stl at caltech dot edu
  2004-04-04 19:07 ` neroden at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: stl at caltech dot edu @ 2004-03-29 21:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From stl at caltech dot edu  2004-03-29 21:16 -------
I should add that dllcrt2.o needs to be copied too in the fourth hack, 
otherwise DLLs can't be created.

As an experiment, I executed -print-search-dirs with bootstrapped vs. crossed 
3.3.3. I replaced the directory that the compiler lives in with WHATEVER/. 
Tidying things up a bit (leaving out "install:" which is apparently 
irrelevant, eliminating non-existent directories, etc.), I get:

[CROSS]
programs:
WHATEVER/lib/gcc-lib/mingw32/3.3.3/
WHATEVER/lib/gcc-lib/
WHATEVER/mingw32/bin/mingw32/3.3.3/
WHATEVER/mingw32/bin/

libraries:
WHATEVER/lib/gcc-lib/mingw32/3.3.3/
WHATEVER/lib/gcc-lib/
WHATEVER/mingw32/lib/mingw32/3.3.3/
WHATEVER/mingw32/lib/

[BOOTSTRAP]
programs:
WHATEVER/lib/gcc-lib/i686-pc-mingw32/3.3.3/
WHATEVER/lib/gcc-lib/
WHATEVER/i686-pc-mingw32/bin/i686-pc-mingw32/3.3.3/
WHATEVER/i686-pc-mingw32/bin/

libraries:
WHATEVER/lib/gcc-lib/i686-pc-mingw32/3.3.3/
WHATEVER/lib/gcc-lib/
WHATEVER/i686-pc-mingw32/lib/i686-pc-mingw32/3.3.3/
WHATEVER/i686-pc-mingw32/lib/
WHATEVER/lib/i686-pc-mingw32/3.3.3/
WHATEVER/lib/

The cross was made with a target of mingw32 instead of i686-pc-mingw32, but 
that is irrelevant here.

Note that the bootstrap has an extra directory in the "libraries:" which is 
not present for the cross:

WHATEVER/lib/

crt2.o and dllcrt2.o live here. If the cross had this directory too, I bet the 
fourth hack would not be necessary.

The crossed 3.3.3 still manages to find WHATEVER/lib/libFOO.a when -lFOO is 
given.

-- 


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


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

* [Bug target/14666] Crossing from GNU/Linux to MinGW requires SEVERAL hacks
  2004-03-21  3:33 [Bug target/14666] New: Crossing from GNU/Linux to MinGW requires SEVERAL hacks stl at caltech dot edu
                   ` (8 preceding siblings ...)
  2004-03-29 21:16 ` stl at caltech dot edu
@ 2004-04-04 19:07 ` neroden at gcc dot gnu dot org
  2004-04-05  8:21 ` stl at caltech dot edu
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: neroden at gcc dot gnu dot org @ 2004-04-04 19:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From neroden at gcc dot gnu dot org  2004-04-04 19:07 -------
Hmm. 
 
Could you try running your build with *just C* and seeing which hacks 
are still needed? That would help diagnose which of the problems are specific 
to building target libraries and which aren't. Then, could you try a build 
with C & f77 -- this would show problems which show up in 'all' target 
libraries vs. ones which show up only in libstdc++. 
 
 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |neroden at gcc dot gnu dot
                   |                            |org


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


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

* [Bug target/14666] Crossing from GNU/Linux to MinGW requires SEVERAL hacks
  2004-03-21  3:33 [Bug target/14666] New: Crossing from GNU/Linux to MinGW requires SEVERAL hacks stl at caltech dot edu
                   ` (9 preceding siblings ...)
  2004-04-04 19:07 ` neroden at gcc dot gnu dot org
@ 2004-04-05  8:21 ` stl at caltech dot edu
  2004-04-05  8:57 ` stl at caltech dot edu
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: stl at caltech dot edu @ 2004-04-05  8:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From stl at caltech dot edu  2004-04-05 08:20 -------
[Nathanael C. Nerode]
> Could you try running your build with *just C* and seeing which hacks
> are still needed?

Doing so now.

The first and second hacks are obviously specific to C++.  I have commented 
out the third and fourth hacks; I'll see if the build fails.

Due to having found a way to work around PR14601, this bug is no longer a 
priority for me; I don't mind if the Powers decide to close it as WONTFIX, 
since building a bootstrap is easier than building a crossed native. On the 
other hand, I don't mind if this bug gets fixed. :->

> Then, could you try a build with C & f77 -- this would show problems which
> show up in 'all' target libraries vs. ones which show up only in libstdc++.

Okay, I can try this (I see your reasoning).

-- 


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


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

* [Bug target/14666] Crossing from GNU/Linux to MinGW requires SEVERAL hacks
  2004-03-21  3:33 [Bug target/14666] New: Crossing from GNU/Linux to MinGW requires SEVERAL hacks stl at caltech dot edu
                   ` (10 preceding siblings ...)
  2004-04-05  8:21 ` stl at caltech dot edu
@ 2004-04-05  8:57 ` stl at caltech dot edu
  2004-04-05  9:57 ` stl at caltech dot edu
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 19+ messages in thread
From: stl at caltech dot edu @ 2004-04-05  8:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From stl at caltech dot edu  2004-04-05 08:57 -------
Hack 1 - Specific to libstdc++.
Hack 2 - Specific to libstdc++.
Hack 3 - Not target library specific. (Occurs when just C is used.)
Crossing again to check out Hack 4.

-- 


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


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

* [Bug target/14666] Crossing from GNU/Linux to MinGW requires SEVERAL hacks
  2004-03-21  3:33 [Bug target/14666] New: Crossing from GNU/Linux to MinGW requires SEVERAL hacks stl at caltech dot edu
                   ` (11 preceding siblings ...)
  2004-04-05  8:57 ` stl at caltech dot edu
@ 2004-04-05  9:57 ` stl at caltech dot edu
  2004-04-07  0:58 ` neroden at gcc dot gnu dot org
  2004-04-07  2:23 ` ian at wasabisystems dot com
  14 siblings, 0 replies; 19+ messages in thread
From: stl at caltech dot edu @ 2004-04-05  9:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From stl at caltech dot edu  2004-04-05 09:57 -------
The fourth hack is also not target library specific, so I will not perform the 
C and F77 build.

-- 


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


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

* [Bug target/14666] Crossing from GNU/Linux to MinGW requires SEVERAL hacks
  2004-03-21  3:33 [Bug target/14666] New: Crossing from GNU/Linux to MinGW requires SEVERAL hacks stl at caltech dot edu
                   ` (12 preceding siblings ...)
  2004-04-05  9:57 ` stl at caltech dot edu
@ 2004-04-07  0:58 ` neroden at gcc dot gnu dot org
  2004-04-07  2:23 ` ian at wasabisystems dot com
  14 siblings, 0 replies; 19+ messages in thread
From: neroden at gcc dot gnu dot org @ 2004-04-07  0:58 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From neroden at gcc dot gnu dot org  2004-04-07 00:57 -------
Thanks for your feedback; I'm going to try to fix the problems which occur 
C-only *first*, which means that I'm sort of going back-to-front.  :-) 
 
The file auto-build.h is supposed to be constructed by gcc/configure for 
crossed natives. 
So could you please run a build up to and including this point, and then stop: 
$WINGCC_SRC/configure --prefix=$WINGCC_DEST --host=mingw32 --with-as=$AS \ 
    --with-ld=$LD $CONFIGURY1 $CONFIGURY2 $CONFIGURY3 $CONFIGURY4 
 
Next, run 'make configure-gcc' if necessary to get files in the 
$WINGCC_BUILD/gcc directory (I think it is). 
 
Then if you could tar up the contents of $WINGCC_BUILD/gcc, I could try to 
figure out why auto-build.h isn't getting made (and where it's failing). 
 
(BTW, this is CVS HEAD, right?...) 
 

-- 


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


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

* [Bug target/14666] Crossing from GNU/Linux to MinGW requires SEVERAL hacks
  2004-03-21  3:33 [Bug target/14666] New: Crossing from GNU/Linux to MinGW requires SEVERAL hacks stl at caltech dot edu
                   ` (13 preceding siblings ...)
  2004-04-07  0:58 ` neroden at gcc dot gnu dot org
@ 2004-04-07  2:23 ` ian at wasabisystems dot com
  14 siblings, 0 replies; 19+ messages in thread
From: ian at wasabisystems dot com @ 2004-04-07  2:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ian at wasabisystems dot com  2004-04-07 02:23 -------
Subject: Re:  Crossing from GNU/Linux to MinGW requires SEVERAL hacks

I was just able to walk through an approximation of this script using
gcc mainline, and I was able to build the native ming32 compiler on
GNU/Linux without requiring any hacks at all.  So this may be fixed on
mainline.


-- 


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


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

* [Bug target/14666] Crossing from GNU/Linux to MinGW requires SEVERAL hacks
       [not found] <bug-14666-6097@http.gcc.gnu.org/bugzilla/>
  2005-10-09  5:34 ` stl at nuwen dot net
@ 2006-09-20  8:01 ` fxcoudert at gcc dot gnu dot org
  1 sibling, 0 replies; 19+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-09-20  8:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from fxcoudert at gcc dot gnu dot org  2006-09-20 08:01 -------
Cross-building for mingw32 now works for me, and this bug has been inactive
long enough that we can close it. If someone has recent data on this, please
reopen!


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fxcoudert at gcc dot gnu dot
                   |                            |org
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME


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


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

* [Bug target/14666] Crossing from GNU/Linux to MinGW requires SEVERAL hacks
       [not found] <bug-14666-6097@http.gcc.gnu.org/bugzilla/>
@ 2005-10-09  5:34 ` stl at nuwen dot net
  2006-09-20  8:01 ` fxcoudert at gcc dot gnu dot org
  1 sibling, 0 replies; 19+ messages in thread
From: stl at nuwen dot net @ 2005-10-09  5:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from stl at nuwen dot net  2005-10-09 05:34 -------
(Massively delayed update.)

I haven't built MinGW by crossing it from GNU/Linux in ages, and I no longer
have the time to figure out what went wrong here. I now build MinGW natively
with profiledbootstrap, which is way more convenient.

This bug can be resolved WONTFIX.


-- 


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


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

* [Bug target/14666] Crossing from GNU/Linux to MinGW requires SEVERAL hacks
       [not found] <20040321033350.14666.stl@nuwen.net>
@ 2004-08-16  0:00 ` giovannibajo at libero dot it
  0 siblings, 0 replies; 19+ messages in thread
From: giovannibajo at libero dot it @ 2004-08-16  0:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-08-16 00:00 -------
Nat, Stephan, what's the status on this bug? Are the required modifications 
already in HEAD?

Stephan, can you test what is the situation at the moment? If the required 
hacks are only libstdc++ specific at this point, I can change the component and 
let the v3 maintainers take care of this.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |giovannibajo at libero dot
                   |                            |it
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-08-16 00:00:41
               date|                            |


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


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

end of thread, other threads:[~2006-09-20  8:01 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-21  3:33 [Bug target/14666] New: Crossing from GNU/Linux to MinGW requires SEVERAL hacks stl at caltech dot edu
2004-03-21  3:41 ` [Bug target/14666] " pinskia at gcc dot gnu dot org
2004-03-21  3:43 ` ian at wasabisystems dot com
2004-03-21  4:12 ` stl at caltech dot edu
2004-03-21  4:17 ` pinskia at gcc dot gnu dot org
2004-03-21  5:16 ` stl at caltech dot edu
2004-03-21  5:40 ` pinskia at gcc dot gnu dot org
2004-03-21  7:06 ` stl at caltech dot edu
2004-03-21  7:12 ` stl at caltech dot edu
2004-03-29 21:16 ` stl at caltech dot edu
2004-04-04 19:07 ` neroden at gcc dot gnu dot org
2004-04-05  8:21 ` stl at caltech dot edu
2004-04-05  8:57 ` stl at caltech dot edu
2004-04-05  9:57 ` stl at caltech dot edu
2004-04-07  0:58 ` neroden at gcc dot gnu dot org
2004-04-07  2:23 ` ian at wasabisystems dot com
     [not found] <20040321033350.14666.stl@nuwen.net>
2004-08-16  0:00 ` giovannibajo at libero dot it
     [not found] <bug-14666-6097@http.gcc.gnu.org/bugzilla/>
2005-10-09  5:34 ` stl at nuwen dot net
2006-09-20  8:01 ` fxcoudert at gcc dot gnu dot 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).