-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

OK, it's getting better with --enable-multilib, BOOT_CFLAGS="-m32" and
XGCC_FLAGS_FOR_TARGET="-m32". But the internal xg++ still tries to
pick up 64-bit libraries (see below). The question is how to make him
switch to the */32/* multilib libraries path.

$
/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/BUILD/gcc-4.8-20130912/build/./prev-gcc/xg++
-
-B/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/BUILD/gcc-4.8-20130912/build/./prev-gcc/
-
-B/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/BUILDROOT/x86_64-unknown-linux-gnu/bin/
- -nostdinc++
-
-B/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/BUILD/gcc-4.8-20130912/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs
-
-B/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/BUILD/gcc-4.8-20130912/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs
-
-I/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/BUILD/gcc-4.8-20130912/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu
-
-I/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/BUILD/gcc-4.8-20130912/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include
-
-I/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/BUILD/gcc-4.8-20130912/libstdc++-v3/libsupc++
-
-L/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/BUILD/gcc-4.8-20130912/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs
-
-L/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/BUILD/gcc-4.8-20130912/build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs
  -m32 -gtoggle -DIN_GCC   -fno-exceptions -fno-rtti
- -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
- -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long
- -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H
- -static-libstdc++ -static-libgcc  -o gfortran gcc.o ggc-none.o
gfortranspec.o driver-i386.o  libcommon-target.a libcommon.a
../libcpp/libcpp.a   ../libbacktrace/.libs/libbacktrace.a
../libiberty/libiberty.a ../libdecnumber/libdecnumber.a
../../gcc/vec.h:1303: error: undefined reference to 'operator
new(unsigned int)'
collect2: error: ld returned 1 exit status

On 10/24/2013 07:51 AM, Dmitry Mikushin wrote:
> Ian,
> 
> I'm NOT using --build/--host/--target:
> 
> + CC=gcc -m32  CXX=g++ -m32  FC=gfortran -m32  F77=gfortran -m32 
> ../configure --enable-build-with-cxx - 
> --prefix=/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/BUILDROOT/
>
> 
- --program-prefix=kernelgen- --enable-languages=fortran,c++
> - 
> --with-mpfr-include=/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/INSTALL/include/
>
> 
- -
> --with-mpfr-lib=/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/INSTALL/lib
>
> 
- -
> --with-gmp-include=/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/INSTALL/include/
>
> 
- -
> --with-gmp-lib=/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/INSTALL/lib
>
> 
- -
> --with-mpc-include=/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/INSTALL/include/
>
> 
- -
> --with-mpc-lib=/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/INSTALL/lib
>
> 
- --enable-plugin --enable-gold=default --disable-ld
> - 
> --with-ld=/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/INSTALL/bin/kernelgen-ld
>
> 
- --disable-multilib
> - 
> --libdir=/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/BUILDROOT/lib
>
>  But I get:
> 
> checking dynamic linker characteristics... configure: error: Link 
> tests are not allowed after GCC_NO_EXECUTABLES.
> 
> Or actually even earlier than that there is
> 
> configure:2934: checking for C compiler default output file name 
> configure:2956: 
> /home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/BUILD/gcc-4.8-20130912/build/./prev-gcc/xgcc
>
> 
- -
> -B/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/BUILD/gcc-4.8-20130912/build/./prev-gcc/
>
> 
- -
> -B/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/BUILDROOT/x86_64-unknown-linux-gnu/bin/
>
> 
- -
> -B/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/BUILDROOT/x86_64-unknown-linux-gnu/bin/
>
> 
- -
> -B/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/BUILDROOT/x86_64-unknown-linux-gnu/lib/
>
> 
- -isystem
> /home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/BUILDROOT/x86_64-unknown-linux-gnu/include
>
> 
- -isystem
> /home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/BUILDROOT/x86_64-unknown-linux-gnu/sys-include
>
> 
- -m32 -gtoggle  -static-libstdc++ -static-libgcc  conftest.c  >&5
> /home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/INSTALL/bin/kernelgen-ld:
>
> 
error:
> /home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/BUILD/gcc-4.8-20130912/build/./prev-gcc/crtbegin.o:
>
> 
incompatible target
> /home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/INSTALL/bin/kernelgen-ld:
>
> 
error:
> /home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/BUILD/gcc-4.8-20130912/build/./prev-gcc/crtend.o:
>
> 
incompatible target
> collect2: error: ld returned 1 exit status
> 
> So, crtbegin.o/crtend.o are still ELF64.
> 
> On 10/24/2013 07:07 AM, Ian Lance Taylor wrote:
>> On Wed, Oct 23, 2013 at 9:59 PM, Dmitry Mikushin 
>> <dmi...@kernelgen.org> wrote:
>>> Still all sorts of problems:
>>> 
>>> with BOOT_CFLAGS="-m32" and CFLAGS_FOR_TARGET="-m32" I get a 
>>> number of compilation errors e.g. "error: unknown type name 
>>> 'UTItype'" with BOOT_CFLAGS="-m32" only I get "configure:
>>> error: Link tests are not allowed after GCC_NO_EXECUTABLES."
> 
> 
>> Should have said this last time: please reply to the mailing
>> list, not just to me.  Thanks.
> 
>> I would not expect to see the "Link tests" error unless you are 
>> still using the --build/--host/--target configure arguments.  I 
>> was suggesting that you omit those.
> 
>> Ian
> 
>>> 2013/10/24 Ian Lance Taylor <i...@google.com>
>>>> 
>>>> 
>>>> On Oct 23, 2013 8:27 PM, "Dmitry Mikushin" 
>>>> <dmi...@kernelgen.org> wrote:
>>>>> 
>>>>> Dear Ian,
>>>>> 
>>>>> I started exactly with adding -m32 options as you
>>>>> mentioned, but in this case the resulting toolchain
>>>>> executables are ELF64.
>>>> 
>>>> You'll probably also have to set BOOT_CFLAGS or something
>>>> like that--see the install instructions.
>>>> 
>>>> Ian
>>>> 
>>>>> 2013/10/21 Ian Lance Taylor <i...@google.com>
>>>>>> 
>>>>>> On Sun, Oct 20, 2013 at 10:04 PM, Dmitry Mikushin 
>>>>>> <dmi...@kernelgen.org> wrote:
>>>>>>> 
>>>>>>> I'm trying to build a GCC toolchain (4.8-20130912 
>>>>>>> snapshot) targeting x86-64 multiarch on i686 host,
>>>>>>> using x86-64 builder:
>>>>>>> 
>>>>>>> + cd
>>>>>>> 
>>>>>>> /home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/BUILD/gcc-4.8-20130912
>>>>>>>
>>>>>>>
>
>>>>>>> 
+ mkdir build
>>>>>>> + cd build/ + CC=gcc -m32  CXX=g++ -m32  FC=gfortran
>>>>>>> -m32 F77=gfortran -m32 ../configure
>>>>>>> --enable-build-with-cxx -
>>>>>>> 
>>>>>>> --prefix=/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/BUILDROOT/
>>>>>>>
>>>>>>>
>
>>>>>>> 
- - --program-prefix=kernelgen- --enable-languages=fortran,c++
>>>>>>> -
>>>>>>> 
>>>>>>> --with-mpfr-include=/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/INSTALL/include/
>>>>>>>
>>>>>>>
>
>>>>>>> 
- -
>>>>>>> 
>>>>>>> --with-mpfr-lib=/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/INSTALL/lib
>>>>>>>
>>>>>>>
>
>>>>>>> 
- -
>>>>>>> 
>>>>>>> --with-gmp-include=/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/INSTALL/include/
>>>>>>>
>>>>>>>
>
>>>>>>> 
- -
>>>>>>> 
>>>>>>> --with-gmp-lib=/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/INSTALL/lib
>>>>>>>
>>>>>>>
>
>>>>>>> 
- -
>>>>>>> 
>>>>>>> --with-mpc-include=/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/INSTALL/include/
>>>>>>>
>>>>>>>
>
>>>>>>> 
- -
>>>>>>> 
>>>>>>> --with-mpc-lib=/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/INSTALL/lib
>>>>>>>
>>>>>>>
>
>>>>>>> 
- - --enable-plugin --enable-gold=default --disable-ld
>>>>>>> -
>>>>>>> 
>>>>>>> --with-ld=/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/INSTALL/bin/kernelgen-ld
>>>>>>>
>>>>>>>
>
>>>>>>> 
- - --disable-multilib
>>>>>>> -
>>>>>>> 
>>>>>>> --libdir=/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/BUILDROOT/lib
>>>>>>>
>>>>>>>
>
>>>>>>> 
- - --build=x86_64-linux-gnu --host=i686-linux-gnu
>>>>>>> --target=x86_64-linux-gnu
>>>>>>> 
>>>>>>> + cd
>>>>>>> 
>>>>>>> /home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/BUILD/gcc-4.8-20130912/build
>>>>>>>
>>>>>>>
>
>>>>>>> 
+ CC=gcc -m32  CXX=g++ -m32  FC=gfortran -m32  F77=gfortran -m32
>>>>>>> 
>>>>>>> CPLUS_INCLUDE_PATH=/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/INSTALL/include:/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/INSTALL/include/libelf
>>>>>>>
>>>>>>>
>
>>>>>>> 
KERNELGEN_FALLBACK=1 make -j24 CFLAGS=-g -O0 CXXFLAGS=-g -O0
>>>>>>> 
>>>>>>> The build fails with
>>>>>>> 
>>>>>>> cc   -g -O2 -O2  -g -O2 -DIN_GCC 
>>>>>>> -DCROSS_DIRECTORY_STRUCTURE - -DNATIVE_CROSS  -W -Wall 
>>>>>>> -Wno-narrowing -Wwrite-strings -Wcast-qual - 
>>>>>>> -Wstrict-prototypes -Wmissing-prototypes 
>>>>>>> -Wold-style-definition - -isystem ./include   -fpic 
>>>>>>> -mlong-double-80 -g -DIN_LIBGCC2 - -fbuilding-libgcc 
>>>>>>> -fno-stack-protector -Dinhibit_libc  -fpic - 
>>>>>>> -mlong-double-80 -I. -I. -I../.././gcc
>>>>>>> -I../../../libgcc - -I../../../libgcc/.
>>>>>>> -I../../../libgcc/../gcc - 
>>>>>>> -I../../../libgcc/../include 
>>>>>>> -I../../../libgcc/config/libbid - 
>>>>>>> -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS  -DUSE_TLS -o
>>>>>>>  morestack_s.o - -MT morestack_s.o -MD -MP -MF 
>>>>>>> morestack_s.dep -DSHARED -c - -xassembler-with-cpp 
>>>>>>> ../../../libgcc/config/i386/morestack.S sed -e 
>>>>>>> 's/__PFX__/__/g' \ -e 's/__FIXPTPFX__/__/g' < 
>>>>>>> ../../../libgcc/libgcc-std.ver.in > libgcc-std.ver 
>>>>>>> dest=../.././gcc/include/tmp$$-unwind.h; \ cp unwind.h 
>>>>>>> $dest; \ chmod a+r $dest; \ sh 
>>>>>>> ../../../libgcc/../move-if-change $dest 
>>>>>>> ../.././gcc/include/unwind.h echo timestamp > 
>>>>>>> libgcc_tm.stamp cc1: error: unrecognized command line 
>>>>>>> option '-mlong-double-80' cc1: error: unrecognized 
>>>>>>> command line option '-mlong-double-80' cc1: error: 
>>>>>>> unrecognized command line option '-fbuilding-libgcc'
>>>>>>> cc1: warning: unrecognized command line option 
>>>>>>> "-Wno-narrowing" [enabled by default]
>>>>>>> 
>>>>>>> What's wrong here?
>>>>>> 
>>>>>> You're trying to do a fairly complex Canadian Cross.  To 
>>>>>> make this work you must first build the build-x-target
>>>>>> and host-x-target compilers, and put them on your PATH.
>>>>>> 
>>>>>> Basically "cc" in this command needs to be a
>>>>>> build-x-target compiler built from the same sources that
>>>>>> you are using to build your Canadian Cross.
>>>>>> 
>>>>>> By the way I'm not sure exactly what you are trying to
>>>>>> do but it might would work more easily if you omitted
>>>>>> the --build, --host, and --target options from your
>>>>>> configure line and simply set CC="gcc -m32" CXX="g++
>>>>>> -m32" when building.
>>>>>> 
>>>>>> Ian
>>>>> 
>>>>> 
>>> 
>>> 
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQEcBAEBAgAGBQJSaN1QAAoJENwm3+sbf/pMGrQH/jHZvd/dschVHeF7+e1h3b5z
SIjVhUsnvi+WJ/nsIghrDH9IFA2h085QWfLGTMqB2CrS5Ex+pJg9eioMhRShQ46b
NPRBRTZcHqOwqtIHnWoLhmaq/9QOlSZIWMRaXHoaLS6iVJfmezRIhdgGwVxn1014
S2Jjw+DAQMxAYIjS2kH9u6I4avpiBeISp/gUxlSSMSzcTdQD+ynTQQryTxb3LkzM
ASDU7h52Kf+0KN8ryx0KJmH7PJBCWrKfgfge9YL2M2BGgJXQYCvqMVcVPfB51Qff
SNnFXnBr0YjmpSR1sE+2LWcDb+1sdFdsbZs+a95IXxjAFOz1ZDft6ZPdm7qIH2M=
=32X2
-----END PGP SIGNATURE-----

Reply via email to