Re: aix crosscompiler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2012/1/24 Kai Ruottu <kai.ruottu@xxxxxxxxxxx>:
> 24.1.2012 9:33, Jędrzej Dudkiewicz kirjoitti:
>
>> Hi,
>>
>> I'm still trying to build crosscompiler for AIX (build on Solaris 11
>> for AIX 4.3). I'm building binutils using the following:
>>
>> ../../src/binutils-2.22/configure --prefix=/opt/xgcc/aix-4.3/binutils
>> --target=rs6000-ibm-aix4.3 --with-sysroot=/root/xcomp/src/sysroot/
>>
>> and gcc using:
>>
>> ../../src/gcc-trunk-2012-01-23/configure
>> --prefix=/opt/xgcc/aix-4.3/gcc-4.7
>
> As you can see the $prefix used with binutils was different!  The
> rule is that they must be same, or otherwise one must somehow fix
> this error so that the right binutils will be found...

Somehow I completely missed it, although NOW it seems obvious.

> In the same way the '--with-sysroot=/root/xcomp/src/sysroot/' would
> be expected here, both '--with-sysroot='s pointing to the same place!
>
>> --with-headers=/root/xcomp/src/sysroot/usr/include/
>
> If one uses the '--with-sysroot=' then the '--with-headers=' should
> not be used to tell where the standard headers for the target will
> be copied! No copying at all, what is in the (in your case) :
>
>  /root/xcomp/src/sysroot/usr/include/
>
> is enough...

Ok, I changed it.

> Why on earth you cannot first try the configure and build with the
> rules aimed for the newbies but are trying these special configure
> options?

Hubris and ignorance, I guess :)

Anyway!

Thanks to your input and after following your advice and stuff in last
comment from here:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47907
(but there was no need to substitute SITE_CONFIG variable, creating
config.site and copying it to "${DIR_PREFIX}/share/" was enough)

I were able to obtain a working C compiler. Yay. Now I'm going to
check how to run test suite with resulting compiler, any help will be
appreciated. If all goes well, adding fix from this bug report to gcc
sources would be great.

Sources used were: gcc from svn, revision 183510 (future 4.7.0, I
guess), binutils 2.22, mpc 0.8.2, mpfr 2.4.2 and gmp 4.3.2.

Winning configure commands were:

../../src/binutils-2.22/configure --prefix="${DIR_PREFIX}" \
    --target=rs6000-ibm-aix4.3 \
    --with-sysroot="${DIR_SYSROOT}"

../../src/gcc-$VERSION/configure \
    --prefix="${DIR_PREFIX}" \
    --enable-static \
    --disable-multilib \
    --disable-nls \
    --disable-shared \
    --with-sysroot="${DIR_SYSROOT}" \
    --with-gnu-as \
    --with-gnu-ld \
    --enable-languages=${LANGS} \
    --target=rs6000-ibm-aix4.3 \
    --with-cpu=powerpc

with variables set to:

DIR_PREFIX=/opt/xgcc-aix-4.3.0.0-47_c
LANGS=c

and DIR_SYSROOT pointing to sysroot. Switch "--with-cpu=powerpc" was
added, as otherwise build system targets some other architecture - I'm
not sure which.

Unfortunately, libstdc++ still fails to built with error:

gmake[4]: Entering directory
`/root/xcomp/build/gcc-build-4.7.0_c_cxx/rs6000-ibm-aix4.3/libstdc++-v3/include'
mkdir -p ./rs6000-ibm-aix4.3/bits/stdc++.h.gch
/root/xcomp/build/gcc-build-4.7.0_c_cxx/./gcc/xgcc -shared-libgcc
-B/root/xcomp/build/gcc-build-4.7.0_c_cxx/./gcc -nostdinc++
-L/root/xcomp/build/gcc-build-4.7.0_c_cxx/rs6000-ibm-aix4.3/libstdc++-v3/src
-L/root/xcomp/build/gcc-build-4.7.0_c_cxx/rs6000-ibm-aix4.3/libstdc++-v3/src/.libs
-B/opt/xgcc-aix-4.3.0.0-4.7.0_c_cxx/rs6000-ibm-aix4.3/bin/
-B/opt/xgcc-aix-4.3.0.0-4.7.0_c_cxx/rs6000-ibm-aix4.3/lib/ -isystem
/opt/xgcc-aix-4.3.0.0-4.7.0_c_cxx/rs6000-ibm-aix4.3/include -isystem
/opt/xgcc-aix-4.3.0.0-4.7.0_c_cxx/rs6000-ibm-aix4.3/sys-include    -x
c++-header -nostdinc++ -g -O2
-I/root/xcomp/build/gcc-build-4.7.0_c_cxx/rs6000-ibm-aix4.3/libstdc++-v3/include/rs6000-ibm-aix4.3
-I/root/xcomp/build/gcc-build-4.7.0_c_cxx/rs6000-ibm-aix4.3/libstdc++-v3/include
-I/root/xcomp/src/gcc-4.7.0/libstdc++-v3/libsupc++ -O2 -g -std=gnu++0x
/root/xcomp/src/gcc-4.7.0/libstdc++-v3/include/precompiled/stdc++.h \
        -o rs6000-ibm-aix4.3/bits/stdc++.h.gch/O2ggnu++0x.gch
In file included from
/root/xcomp/build/gcc-build-4.7.0_c_cxx/rs6000-ibm-aix4.3/libstdc++-v3/include/bits/atomic_base.h:37:0,
                 from
/root/xcomp/build/gcc-build-4.7.0_c_cxx/rs6000-ibm-aix4.3/libstdc++-v3/include/atomic:41,
                 from
/root/xcomp/src/gcc-4.7.0/libstdc++-v3/include/precompiled/stdc++.h:100:
/root/xcomp/build/gcc-build-4.7.0_c_cxx/./gcc/include/stdint.h:72:29:
error: conflicting declaration 'typedef short int int_fast16_t'
In file included from
/root/xcomp/build/gcc-build-4.7.0_c_cxx/./gcc/include-fixed/sys/types.h:64:0,
                 from /root/xcomp/src/sysroot//usr/include/sys/lc_core.h:36,
                 from /root/xcomp/src/sysroot//usr/include/sys/localedef.h:43,
                 from
/root/xcomp/build/gcc-build-4.7.0_c_cxx/./gcc/include-fixed/ctype.h:131,
                 from
/root/xcomp/build/gcc-build-4.7.0_c_cxx/rs6000-ibm-aix4.3/libstdc++-v3/include/cctype:44,
                 from
/root/xcomp/src/gcc-4.7.0/libstdc++-v3/include/precompiled/stdc++.h:36:
/root/xcomp/src/sysroot//usr/include/sys/inttypes.h:143:18: error:
'int_fast16_t' has a previous declaration as 'typedef int32_t
int_fast16_t'
In file included from
/root/xcomp/build/gcc-build-4.7.0_c_cxx/rs6000-ibm-aix4.3/libstdc++-v3/include/bits/atomic_base.h:37:0,
                 from
/root/xcomp/build/gcc-build-4.7.0_c_cxx/rs6000-ibm-aix4.3/libstdc++-v3/include/atomic:41,
                 from
/root/xcomp/src/gcc-4.7.0/libstdc++-v3/include/precompiled/stdc++.h:100:
/root/xcomp/build/gcc-build-4.7.0_c_cxx/./gcc/include/stdint.h:75:29:
error: conflicting declaration 'typedef unsigned char uint_fast8_t'
In file included from
/root/xcomp/build/gcc-build-4.7.0_c_cxx/./gcc/include-fixed/sys/types.h:64:0,
                 from /root/xcomp/src/sysroot//usr/include/sys/lc_core.h:36,
                 from /root/xcomp/src/sysroot//usr/include/sys/localedef.h:43,
                 from
/root/xcomp/build/gcc-build-4.7.0_c_cxx/./gcc/include-fixed/ctype.h:131,
                 from
/root/xcomp/build/gcc-build-4.7.0_c_cxx/rs6000-ibm-aix4.3/libstdc++-v3/include/cctype:44,
                 from
/root/xcomp/src/gcc-4.7.0/libstdc++-v3/include/precompiled/stdc++.h:36:
/root/xcomp/src/sysroot//usr/include/sys/inttypes.h:145:18: error:
'uint_fast8_t' has a previous declaration as 'typedef uint32_t
uint_fast8_t'
In file included from
/root/xcomp/build/gcc-build-4.7.0_c_cxx/rs6000-ibm-aix4.3/libstdc++-v3/include/bits/atomic_base.h:37:0,
                 from
/root/xcomp/build/gcc-build-4.7.0_c_cxx/rs6000-ibm-aix4.3/libstdc++-v3/include/atomic:41,
                 from
/root/xcomp/src/gcc-4.7.0/libstdc++-v3/include/precompiled/stdc++.h:100:
/root/xcomp/build/gcc-build-4.7.0_c_cxx/./gcc/include/stdint.h:76:30:
error: conflicting declaration 'typedef short unsigned int
uint_fast16_t'
In file included from
/root/xcomp/build/gcc-build-4.7.0_c_cxx/./gcc/include-fixed/sys/types.h:64:0,
                 from /root/xcomp/src/sysroot//usr/include/sys/lc_core.h:36,
                 from /root/xcomp/src/sysroot//usr/include/sys/localedef.h:43,
                 from
/root/xcomp/build/gcc-build-4.7.0_c_cxx/./gcc/include-fixed/ctype.h:131,
                 from
/root/xcomp/build/gcc-build-4.7.0_c_cxx/rs6000-ibm-aix4.3/libstdc++-v3/include/cctype:44,
                 from
/root/xcomp/src/gcc-4.7.0/libstdc++-v3/include/precompiled/stdc++.h:36:
/root/xcomp/src/sysroot//usr/include/sys/inttypes.h:146:18: error:
'uint_fast16_t' has a previous declaration as 'typedef uint32_t
uint_fast16_t'
gmake[4]: *** [rs6000-ibm-aix4.3/bits/stdc++.h.gch/O2ggnu++0x.gch] Error 1
gmake[4]: Leaving directory
`/root/xcomp/build/gcc-build-4.7.0_c_cxx/rs6000-ibm-aix4.3/libstdc++-v3/include'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory
`/root/xcomp/build/gcc-build-4.7.0_c_cxx/rs6000-ibm-aix4.3/libstdc++-v3'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory
`/root/xcomp/build/gcc-build-4.7.0_c_cxx/rs6000-ibm-aix4.3/libstdc++-v3'
gmake[1]: *** [all-target-libstdc++-v3] Error 2
gmake[1]: Leaving directory `/root/xcomp/build/gcc-build-4.7.0_c_cxx'
gmake: *** [all] Error 2


Which is (almost?) identical to my previous report. You wrote in your
other post that I should check file
"/root/xcomp/build/gcc-trunk-20120123/./gcc/include/stdint.h", which
now became "/root/xcomp/build/gcc-build-47_c/./gcc/include/stdint.h".
It doesn't contain any preambles similar to yours. There are no
"include" directives, only a lot of defines and typedefs.
-- 
Jędrzej Dudkiewicz

I really hate this damn machine, I wish that they would sell it.
It never does just what I want, but only what I tell it.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux