[prefix][aix] gcc-4.2.0 doesn't work on ppc-aix

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[prefix][aix] gcc-4.2.0 doesn't work on ppc-aix

Michael Haubenwallner
Hi,

please de-keyword gcc-4.2.0 for "~ppc-aix", there is a problem with
libstdc++[1]. Although this is for gcc-4.2.1, besides some gentoo-caused
build error I've encountered exactly the same with gcc-4.2.0.

[1] http://gcc.gnu.org/ml/gcc-help/2007-09/msg00100.html

For the gentoo-caused build error:

gcc knows it needs "-bbigtoc" linker flag. Unfortunately, gcc_do_make()
(from toolchain.eclass) calls "emake 'LDFLAGS=${LDFLAGS}'", which wipes
out the gcc-preset "-Wl,-bbigtoc", set from gcc-4.2.0/config/mh-ppc-aix:

$ find gcc-4.2.0 -type f | xargs fgrep bbigtoc
gcc-4.2.0/config/mh-ppc-aix:BOOT_LDFLAGS = -Wl,-bbigtoc
gcc-4.2.0/config/mh-ppc-aix:LDFLAGS = `case $(CC) in *gcc*) echo -Wl,-bbigtoc ;; esac;`

My fix to get gcc-4.2.0 compiled (remember: libstdc++ not working) on
aix was to
    append-ldflags -Wl,-bbigtoc
in src_compile() for "${CHOST} == *-aix*".

But maybe this should be done more intelligent by extracting LDFLAGS
from config/mh-ppc-aix ?

I'm thinking here on sth. like this:

    CC=$(tc-getCC) make -s -f - -f ${S}/config/mh-ppc-aix getldflags <<EOF
    getldflags:; echo \$(LDFLAGS)
    EOF

Thoughts ?

Eventually gcc_do_make() should avoid passing LDFLAGS (and others) if
not preset by ebuild (or user) ?

/haubi/

--
[hidden email] mailing list

Reply | Threaded
Open this post in threaded view
|

Re: [prefix][aix] gcc-4.2.0 doesn't work on ppc-aix

Fabian Groffen-2
On 11-09-2007 10:25:23 +0200, Michael Haubenwallner wrote:
> Hi,
>
> please de-keyword gcc-4.2.0 for "~ppc-aix", there is a problem with
> libstdc++[1]. Although this is for gcc-4.2.1, besides some gentoo-caused
> build error I've encountered exactly the same with gcc-4.2.0.

I de-keyworded it for now.  I'm waiting for your long awaited
introduction to the arena such you can fix things yourself.


> [1] http://gcc.gnu.org/ml/gcc-help/2007-09/msg00100.html
>
> For the gentoo-caused build error:
>
> gcc knows it needs "-bbigtoc" linker flag. Unfortunately, gcc_do_make()
> (from toolchain.eclass) calls "emake 'LDFLAGS=${LDFLAGS}'", which wipes
> out the gcc-preset "-Wl,-bbigtoc", set from gcc-4.2.0/config/mh-ppc-aix:
>
> $ find gcc-4.2.0 -type f | xargs fgrep bbigtoc
> gcc-4.2.0/config/mh-ppc-aix:BOOT_LDFLAGS = -Wl,-bbigtoc
> gcc-4.2.0/config/mh-ppc-aix:LDFLAGS = `case $(CC) in *gcc*) echo -Wl,-bbigtoc ;; esac;`
>
> My fix to get gcc-4.2.0 compiled (remember: libstdc++ not working) on
> aix was to
>     append-ldflags -Wl,-bbigtoc
> in src_compile() for "${CHOST} == *-aix*".
>
> But maybe this should be done more intelligent by extracting LDFLAGS
> from config/mh-ppc-aix ?
>
> I'm thinking here on sth. like this:
>
>     CC=$(tc-getCC) make -s -f - -f ${S}/config/mh-ppc-aix getldflags <<EOF
>     getldflags:; echo \$(LDFLAGS)
>     EOF
>
> Thoughts ?
>
> Eventually gcc_do_make() should avoid passing LDFLAGS (and others) if
> not preset by ebuild (or user) ?

--
Fabian Groffen
Gentoo on a different level
--
[hidden email] mailing list