public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* aix gcc question
@ 2002-01-18 14:15 Robert A Nesius
  2002-01-18 15:12 ` Robert A Nesius
  2002-01-24 10:27 ` David Edelsohn
  0 siblings, 2 replies; 4+ messages in thread
From: Robert A Nesius @ 2002-01-18 14:15 UTC (permalink / raw)
  To: gcc-help


I got a build of gcc on aix 4.3.3. to compile.  The same
version of gcc (g++ being the compiler I'm invoking) on
linux compiles the following code:

#include <iostream>

int main() {
    unsigned long long int x = 0;
    std::cout << x << std::endl;
}

BUT, on AIX it does not.  It complains about an ambiguous
overload of the << operator, and lists all the types that
are actually defined on that operator.

I wrote a C program that just declared an unsigned long long int
to see if /usr/bin/cc understood it, and in fact cc (xlc)
did handle the type with no trouble.

So I'm a bit confused as to why g++ can't handle this on
AIX 4.3.3, since it seems the type unsigned long long int
was at least defined in the original system headers.

Any ideas?

Follow up question - might it make sense to build a 64-bit
compiler instead of a 32-bit one?  If so, does anyone have
some advice to offer on how to proceed with that?  I know
how to tell /usr/bin/cc to compile 64bit objects (-q64),
but I've noticed that when I put vendor compiler options
in CFLAGS and then run configure, those same values in
CFLAGS get pased on to the stage 2 and stage3 compilers
which don't understand -q64, and complain.  Can I just
ignore the complaints about "unknown option" or am I
going about things in the wrong way?  I didn't see anything
I could assign to --host-prefix to force configure to
set things up for 64-bit mode...

Thanks for any help/ideas you can offer.

-Rob




-- 
#include <sig.h>
------------------------------------------------------------------
Robert Nesius             rnesius@ichips.intel.com    503.712.2181
DPG Engineering Computing SW Applications Team


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

* Re: aix gcc question
  2002-01-18 14:15 aix gcc question Robert A Nesius
@ 2002-01-18 15:12 ` Robert A Nesius
  2002-01-24 10:27 ` David Edelsohn
  1 sibling, 0 replies; 4+ messages in thread
From: Robert A Nesius @ 2002-01-18 15:12 UTC (permalink / raw)
  To: gcc-help


Sorry..  I didn't say what version of gcc I was using.
I was using a post 3.0.2 snapshot.   If screen dumps
would help I can provide them.

-Rob


On Fri, 18 Jan 2002, Robert A Nesius wrote:

>
> I got a build of gcc on aix 4.3.3. to compile.  The same
> version of gcc (g++ being the compiler I'm invoking) on
> linux compiles the following code:
>
> #include <iostream>
>
> int main() {
>     unsigned long long int x = 0;
>     std::cout << x << std::endl;
> }
>
> BUT, on AIX it does not.  It complains about an ambiguous
> overload of the << operator, and lists all the types that
> are actually defined on that operator.
>
> I wrote a C program that just declared an unsigned long long int
> to see if /usr/bin/cc understood it, and in fact cc (xlc)
> did handle the type with no trouble.
>
> So I'm a bit confused as to why g++ can't handle this on
> AIX 4.3.3, since it seems the type unsigned long long int
> was at least defined in the original system headers.
>
> Any ideas?
>
> Follow up question - might it make sense to build a 64-bit
> compiler instead of a 32-bit one?  If so, does anyone have
> some advice to offer on how to proceed with that?  I know
> how to tell /usr/bin/cc to compile 64bit objects (-q64),
> but I've noticed that when I put vendor compiler options
> in CFLAGS and then run configure, those same values in
> CFLAGS get pased on to the stage 2 and stage3 compilers
> which don't understand -q64, and complain.  Can I just
> ignore the complaints about "unknown option" or am I
> going about things in the wrong way?  I didn't see anything
> I could assign to --host-prefix to force configure to
> set things up for 64-bit mode...
>
> Thanks for any help/ideas you can offer.
>
> -Rob
>
>
>
>
>

-- 
#include <sig.h>
------------------------------------------------------------------
Robert Nesius             rnesius@ichips.intel.com    503.712.2181
DPG Engineering Computing SW Applications Team


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

* Re: aix gcc question
  2002-01-18 14:15 aix gcc question Robert A Nesius
  2002-01-18 15:12 ` Robert A Nesius
@ 2002-01-24 10:27 ` David Edelsohn
  2002-01-24 12:59   ` Robert A Nesius
  1 sibling, 1 reply; 4+ messages in thread
From: David Edelsohn @ 2002-01-24 10:27 UTC (permalink / raw)
  To: Robert A Nesius; +Cc: gcc-help

>>>>> Robert Nesius writes:

[paraphrasing]
| GCC 3.0.2 on AIX complains about an ambiguous overload of the <<operator
| applied to "long long" type, and lists all the types that are actually
| defined on that operator.

	Prior to GCC 3.0.3, the configuration process for libstdc++-v3 had
an error that caused it to fail to provide "long long" support for some
targets.  This is fixed in the GCC 3.0.3 release.  This is a libstdc++-v3
library issue, not a G++ compiler issue.

	The GCC 3.0.4 release will include significant fixes for C++
streams support on AIX in libstdc++-v3, but one will need to use the AIX
-brtl option (-Wl,-brtl in GCC) to link applications against libstdc++
when using streams support.  To build libstdc++.a, one also needs an AIX
assembler fix.  Both of these issues are discussed in the GCC installation
and release notes which will be included in GCC 3.0.4.

[paraphrasing]
| Why not build GCC as a 64-bit application on 64-bit AIX systems?

	GCC might be installed in a common location used on both 32-bit
and 64-bit AIX systems. And, until GCC 3.1 development, the PowerPC port
of GCC would not function correctly in a 64-bit hosted environment.

	The GCC option to compile and link in 64-bit mode is -maix64.

	If one wants to pass an option to just the first stage of the GCC
bootstrap process, one may define the STAGE1_CFLAGS variable when invoking
Make. 

David

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

* Re: aix gcc question
  2002-01-24 10:27 ` David Edelsohn
@ 2002-01-24 12:59   ` Robert A Nesius
  0 siblings, 0 replies; 4+ messages in thread
From: Robert A Nesius @ 2002-01-24 12:59 UTC (permalink / raw)
  To: gcc-help

On Thu, 24 Jan 2002, David Edelsohn wrote:

> >>>>> Robert Nesius writes:

> [paraphrasing]
> | Why not build GCC as a 64-bit application on 64-bit AIX systems?
>
> 	GCC might be installed in a common location used on both 32-bit
> and 64-bit AIX systems.

I'm aware of those concerns.

> And, until GCC 3.1 development, the PowerPC port
> of GCC would not function correctly in a 64-bit hosted environment.

It's not clear to me why that would be.  Is it because the
PowerPC port itself won't be complete until 3.1?

> 	The GCC option to compile and link in 64-bit mode is -maix64.

Interesting.  I didn't ask for a 64-bit build, but there were
a ton of instances of this argument in my build log.  I would
think that if I didn't tell gcc to build 64-bit, it wouldn't
generate any 64-bit objects at all.

<pdxfs32 161> /tmp/gcc/aix43-gcc303 # ggrep -- '-maix64' bootstrap.out | wc -l
    1400

Is it the case that if the gcc build detects 64-bit hardware,
it builds some pieces of gcc 32-bit and 64-bit?

> 	If one wants to pass an option to just the first stage of the GCC
> bootstrap process, one may define the STAGE1_CFLAGS variable when invoking
> Make.

Thanks for that hint.  I've always wondered how to prevent
the build from passing incompatible vendor flags to the second
and third stages.

-Rob


-- 
#include <sig.h>
------------------------------------------------------------------
Robert Nesius             rnesius@ichips.intel.com    503.712.2181
DPG Engineering Computing SW Applications Team



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

end of thread, other threads:[~2002-01-24 20:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-18 14:15 aix gcc question Robert A Nesius
2002-01-18 15:12 ` Robert A Nesius
2002-01-24 10:27 ` David Edelsohn
2002-01-24 12:59   ` Robert A Nesius

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