public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* installing GCC 3.4.4 on cygwin targeting AIX-4.3.3
@ 2005-09-16 14:21 James.Parker
  2005-09-16 19:20 ` David Edelsohn
  0 siblings, 1 reply; 4+ messages in thread
From: James.Parker @ 2005-09-16 14:21 UTC (permalink / raw)
  To: gcc-help

Hi all,

I've been attempting to build the GCC 3.4.4 in my cygwin environment to 
target the UNIX platform rs6000-ibm-aix4.3.3.0
I have built binutils (20050610-1) sucessfully but building GCC is 
failing.

Here's some of my environment:

export host=i686-pc-cygwin
export build=i686-pc-cygwin
export target=rs6000-ibm-aix4.3.3.0
export prefix=/usr/local/cross-tools
export PATH=$PATH:$prefix/bin

I made binutils like this:

> configure --host=$host --build=$build --target=$target --prefix=$prefix 
--enable-threads=aix
> make
> make install

>>> everything up to here seems to work fine. I have 
$prefix/bin/$target-<cmds> files installed, e.g. rs6000-ibm-aix4.3.3.0-as. 

My path includes $prefix/bin so these new commands are now all on the 
path.

Now I attempt to make GCC

> configure --host=$host --build=$build --target=$target --prefix=$prefix 
--enable-threads=aix --with-sysroot=/cygdrive/r
> make

NOTE: I have the root of my AIX system mapped to R: on my windoze box i.e. 
afa Cygwin is concerned, /cygdrive/r point to the root of my UNIX box.

I get the following failure:

/usr/src/BUILD/gcc/gcc/xgcc -B/usr/src/BUILD/gcc/gcc/ 
-B/usr/local/cross-tools/rs6000-ibm-aix4.3.3.0/bin/ 
-B/usr/local/cross-tools/rs6000-ibm-aix4.3.3.0/lib/ -isystem 
/usr/local/cross-tools/rs6000-ibm-aix4.3.3.0/include -isystem 
/usr/local/cross-tools/rs6000-ibm-aix4.3.3.0/sys-include -O2  -DIN_GCC 
-DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes 
-Wmissing-prototypes -Wold-style-definition  -isystem ./include   -g 
-DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -I. -I. 
-I/usr/src/gcc-3.4.4/gcc -I/usr/src/gcc-3.4.4/gcc/. 
-I/usr/src/gcc-3.4.4/gcc/../include   -mcpu=power -DL_divdi3 -c 
/usr/src/gcc-3.4.4/gcc/libgcc2.c -fexceptions -fnon-call-exceptions -o 
libgcc/power/_divdi3.o
/cygdrive/c/DOCUME~1/jamesp/LOCALS~1/Temp/ccTJkgP2.s: Assembler messages:
/cygdrive/c/DOCUME~1/jamesp/LOCALS~1/Temp/ccTJkgP2.s:822: Error: 
Unrecognized opcode: `mfcr'
make[2]: *** [libgcc/power/_divdi3.o] Error 1
make[2]: Leaving directory `/usr/src/BUILD/gcc/gcc'
make[1]: *** [stmp-multilib] Error 2
make[1]: Leaving directory `/usr/src/BUILD/gcc/gcc'
make: *** [all-gcc] Error 2

It looks like an assembler error, how do I know if my make script is using 
correct assembler? 

what is xgcc? (is that cross-gcc? i.e. cross compiler gcc?)

Maybe this helps:

$ /usr/src/BUILD/gcc/gcc/xgcc -v
Using built-in specs.
Configured with: /usr/src/gcc-3.4.4/configure --host=i686-pc-cygwin 
--build=i686
-pc-cygwin --target=rs6000-ibm-aix4.3.3.0 --prefix=/usr/local/cross-tools 
--enab
le-threads=aix --with-sysroot=/cygdrive/r
Thread model: aix
gcc version 3.4.4

Any help would be greatly appreciated! Thanks.


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

* Re: installing GCC 3.4.4 on cygwin targeting AIX-4.3.3
  2005-09-16 14:21 installing GCC 3.4.4 on cygwin targeting AIX-4.3.3 James.Parker
@ 2005-09-16 19:20 ` David Edelsohn
  2005-09-19 10:24   ` James.Parker
  0 siblings, 1 reply; 4+ messages in thread
From: David Edelsohn @ 2005-09-16 19:20 UTC (permalink / raw)
  To: James.Parker; +Cc: gcc-help

> I have $prefix/bin/$target-<cmds> files installed,
> e.g. rs6000-ibm-aix4.3.3.0-as. 
> 
> My path includes $prefix/bin so these new commands are now all on the 
> path.

	You should have the tools installed in two locations.  One as
$prefix/bin/$target-<cmds> and another as something like
$prefix/$target/bin/<cmds> .

> It looks like an assembler error, how do I know if my make script is using 
> correct assembler?

	You can invoke the command manually and add the "-v" option.  This
will print out information about the commands that the "gcc" driver
program is invoking.

> what is xgcc? (is that cross-gcc? i.e. cross compiler gcc?)

	This is the name of the gcc compiler driver before it is installed
as the Makefile invokes the newly built compiler.

David

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

* Re: installing GCC 3.4.4 on cygwin targeting AIX-4.3.3
  2005-09-16 19:20 ` David Edelsohn
@ 2005-09-19 10:24   ` James.Parker
  2005-09-19 16:21     ` David Edelsohn
  0 siblings, 1 reply; 4+ messages in thread
From: James.Parker @ 2005-09-19 10:24 UTC (permalink / raw)
  To: gcc-help

> > I have $prefix/bin/$target-<cmds> files installed,
> > e.g. rs6000-ibm-aix4.3.3.0-as. 
> > 
> > My path includes $prefix/bin so these new commands are now all on the 
> > path.
> 
>    You should have the tools installed in two locations.  One as
> $prefix/bin/$target-<cmds> and another as something like
> $prefix/$target/bin/<cmds> .

Yes - I have these in both. 

> 
> > It looks like an assembler error, how do I know if my make script is 
using 
> > correct assembler?
> 
>    You can invoke the command manually and add the "-v" option.  This
> will print out information about the commands that the "gcc" driver
> program is invoking.

I observe the following:

--> $prefix/bin/$target-ld -V
GNU ld version 2.16.91 20050610
  Supported emulations:
   aixrs6

--> $prefix/bin/$target-as --version
GNU assembler 2.16.91 20050610
Copyright 2005 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
This assembler was configured for a target of `rs6000-ibm-aix4.3.3.0'.


--> $prefix/$target/bin/ld -V
GNU ld version 2.16.91 20050610
  Supported emulations:
   aixrs6

--> $prefix/$target/bin/as --version
GNU assembler 2.16.91 20050610
Copyright 2005 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
This assembler was configured for a target of `rs6000-ibm-aix4.3.3.0'.

I see that the same original error message was seen by the author of this 
bug:

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

Reading through the bug report it seems that he/she had an incorrect path. 
However, my path is:

/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/IBMDebug/bin:/cygdrive/c
/WINNT/system32:/cygdrive/c/WINNT:/cygdrive/c/WINNT/System32/Wbem:/cygdrive/c/PR
OGRA~1/IBM/CLIENT~1:/cygdrive/c/PROGRA~1/IBM/CLIENT~1/Shared:/cygdrive/c/PROGRA~
1/IBM/CLIENT~1/Emulator:/cygdrive/c/Program Files/Microsoft SQL 
Server/80/Tools/
Binn/:/cygdrive/c/php:/cygdrive/c/Program 
Files/vslick/win:/cygdrive/c/mysql/bin
:/usr/local/cross-tools/bin

so that when I type:

$ which as
/usr/local/bin/as
$ as --version
GNU assembler 2.16.91 20050610
Copyright 2005 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
This assembler was configured for a target of `i686-pc-cygwin'.

When I installed cygwin, I simply got whatever gcc binaries came with it. 
Perhaps I should build gcc for host=target=i686-pc-cygwin before 
attempting to build the cross-compiler?

I notice this also:

$ uname -i
unknown
$ uname -p
unknown

Cygwin doesn't know what hardware platform or op sys I have (?!). Perhaps 
this confuses the configure script for gcc?

Any other thoughts on why this is not working?

Thanks!

(I should build this all on Linux - except for that means going through 
our IT guys to get permission for Linux box which they won't do until they 
can see the benefit - which is why I am attempting to demostrate cross 
compilation to them using cygwin!)

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

* Re: installing GCC 3.4.4 on cygwin targeting AIX-4.3.3
  2005-09-19 10:24   ` James.Parker
@ 2005-09-19 16:21     ` David Edelsohn
  0 siblings, 0 replies; 4+ messages in thread
From: David Edelsohn @ 2005-09-19 16:21 UTC (permalink / raw)
  To: James.Parker; +Cc: gcc-help

	We do not seem to be communicating well.  I suggest that you
invoke the compile command manually with the -v verbose flag and see where
the cross-compiler is finding the assembler.  Not compiler and assembler
print version options.  In other words, go to the build directory and
manually invoke

/usr/src/BUILD/gcc/gcc/xgcc -B/usr/src/BUILD/gcc/gcc/ -B/usr/local/cross-tools/rs6000-ibm-aix4.3.3.0/bin/ ... -mcpu=power -DL_divdi3 -c /usr/src/gcc-3.4.4/gcc/libgcc2.c -fexceptions -fnon-call-exceptions -v

The entire command  It will print the sub-programs that it is invoking and
the options that it is using.  Then you can determine if it is invoking
the wrong assembler or manually invoke the assembler on an assembly file
containing "mfcr" to investigate further.

David

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

end of thread, other threads:[~2005-09-19 16:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-16 14:21 installing GCC 3.4.4 on cygwin targeting AIX-4.3.3 James.Parker
2005-09-16 19:20 ` David Edelsohn
2005-09-19 10:24   ` James.Parker
2005-09-19 16:21     ` David Edelsohn

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