* -m31 rejected when building libgcc for cross compiler for s390 (31 bit) gcc 4.6.0
@ 2011-05-21 12:22 John P. Hartmann
2011-05-21 17:04 ` Ian Lance Taylor
0 siblings, 1 reply; 8+ messages in thread
From: John P. Hartmann @ 2011-05-21 12:22 UTC (permalink / raw)
To: gcc-help
Building a cross compiler from i686 (the platform of my linux) to s390
I get the following when the bootstrap process is configuring in
s390-ibm-linux/libgcc:
configure:3268: /usr/ports/gcc390/build460/./gcc/xgcc
-B/usr/ports/gcc390/build460/./gcc/
-B/usr/ports/gcc390/inst/s390-ibm-linux/bin/
-B/usr/ports/gcc390/inst/s390-ibm-linux/lib/ -isystem
/usr/ports/gcc390/inst/s390-ibm-linux/include -isystem
/usr/ports/gcc390/inst/s390-ibm-linux/sys-include -c -g -O2
conftest.c >&5
exec: 89: -m31: not found
I configured with:
/usr/src/gcc-4.6.0/configure --prefix=/usr/ports/gcc390/inst
--target=s390-ibm-linux --host=i686-pc-linux-gnu
However, once the directory is in the path, the bootstrap compiler
does work as far as doing
u@ubuntu:~/src/testing$ /usr/ports/gcc390/build460/gcc/xgcc -S x.c
an even
u@ubuntu:~/src/testing$ /usr/ports/gcc390/build460/gcc/xgcc -m31 -S x.c
u@ubuntu:~/src/testing$ /usr/ports/gcc390/build460/gcc/xgcc -m64 -S x.c
and what is more, the two invocations generate the expected assembler
for return 0x1000000.
But the error is reproducible:
u@ubuntu:~/src/testing$ /usr/ports/gcc390/build460/gcc/xgcc x.c
exec: 89: -m31: not found
there is no 89 or c89 in the gcc directory.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: -m31 rejected when building libgcc for cross compiler for s390 (31 bit) gcc 4.6.0
2011-05-21 12:22 -m31 rejected when building libgcc for cross compiler for s390 (31 bit) gcc 4.6.0 John P. Hartmann
@ 2011-05-21 17:04 ` Ian Lance Taylor
2011-05-22 2:00 ` John P. Hartmann
0 siblings, 1 reply; 8+ messages in thread
From: Ian Lance Taylor @ 2011-05-21 17:04 UTC (permalink / raw)
To: John P. Hartmann; +Cc: gcc-help
"John P. Hartmann" <jphartmann@gmail.com> writes:
> Building a cross compiler from i686 (the platform of my linux) to s390
> I get the following when the bootstrap process is configuring in
> s390-ibm-linux/libgcc:
>
> configure:3268: /usr/ports/gcc390/build460/./gcc/xgcc
> -B/usr/ports/gcc390/build460/./gcc/
> -B/usr/ports/gcc390/inst/s390-ibm-linux/bin/
> -B/usr/ports/gcc390/inst/s390-ibm-linux/lib/ -isystem
> /usr/ports/gcc390/inst/s390-ibm-linux/include -isystem
> /usr/ports/gcc390/inst/s390-ibm-linux/sys-include -c -g -O2
> conftest.c >&5
> exec: 89: -m31: not found
This looks like you don't have a cross-assembler. You need to make and
install the GNU binutils first with the same --host, --target, and
--prefix options. Then start again with gcc in a brand new empty build
directory.
Ian
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: -m31 rejected when building libgcc for cross compiler for s390 (31 bit) gcc 4.6.0
2011-05-21 17:04 ` Ian Lance Taylor
@ 2011-05-22 2:00 ` John P. Hartmann
2011-05-22 8:58 ` Ian Lance Taylor
0 siblings, 1 reply; 8+ messages in thread
From: John P. Hartmann @ 2011-05-22 2:00 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: gcc-help
Thanks, Ian. That brought me further, but still no cigar. Does the
following ring a bell?
/usr/ports/gcc390/build460/./gcc/xgcc
-B/usr/ports/gcc390/build460/./gcc/
-B/usr/ports/gcc390/inst/s390-ibm-linux/bin/
-B/usr/ports/gcc390/inst/s390-ibm-linux/lib/ -isystem
/usr/ports/gcc390/inst/s390-ibm-linux/include -isystem
/usr/ports/gcc390/inst/s390-ibm-linux/sys-include -g -O2 -O2 -g
-O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition -isystem ./include -fPIC -g
-DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
-fno-stack-protector -Dinhibit_libc -mlong-double-128 -I. -I.
-I../.././gcc -I/usr/src/gcc-4.6.0/libgcc
-I/usr/src/gcc-4.6.0/libgcc/. -I/usr/src/gcc-4.6.0/libgcc/../gcc
-I/usr/src/gcc-4.6.0/libgcc/../include
-I/usr/src/gcc-4.6.0/libgcc/../libdecnumber/dpd
-I/usr/src/gcc-4.6.0/libgcc/../libdecnumber -DHAVE_CC_TLS -o
decContext.o -MT decContext.o -MD -MP -MF decContext.dep -c
/usr/src/gcc-4.6.0/libgcc/../libdecnumber/decContext.c
/usr/src/gcc-4.6.0/libgcc/../libdecnumber/decContext.c:33:43: fatal
error: string.h: No such file or directory
compilation terminated.
So I looked for string.h in the source:
u@ubuntu:/usr/src/gcc-4.6.0$ find . -name 'string.h'
./libssp/ssp/string.h
./fixincludes/tests/base/string.h
./libstdc++-v3/include/c_compatibility/string.h
On 21 May 2011 16:31, Ian Lance Taylor <iant@google.com> wrote:
> "John P. Hartmann" <jphartmann@gmail.com> writes:
>
>> Building a cross compiler from i686 (the platform of my linux) to s390
>> I get the following when the bootstrap process is configuring in
>> s390-ibm-linux/libgcc:
>>
>> configure:3268: /usr/ports/gcc390/build460/./gcc/xgcc
>> -B/usr/ports/gcc390/build460/./gcc/
>> -B/usr/ports/gcc390/inst/s390-ibm-linux/bin/
>> -B/usr/ports/gcc390/inst/s390-ibm-linux/lib/ -isystem
>> /usr/ports/gcc390/inst/s390-ibm-linux/include -isystem
>> /usr/ports/gcc390/inst/s390-ibm-linux/sys-include -c -g -O2
>> conftest.c >&5
>> exec: 89: -m31: not found
>
> This looks like you don't have a cross-assembler. You need to make and
> install the GNU binutils first with the same --host, --target, and
> --prefix options. Then start again with gcc in a brand new empty build
> directory.
>
> Ian
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: -m31 rejected when building libgcc for cross compiler for s390 (31 bit) gcc 4.6.0
2011-05-22 2:00 ` John P. Hartmann
@ 2011-05-22 8:58 ` Ian Lance Taylor
2011-05-22 9:34 ` Ian Lance Taylor
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Ian Lance Taylor @ 2011-05-22 8:58 UTC (permalink / raw)
To: John P. Hartmann; +Cc: gcc-help
"John P. Hartmann" <jphartmann@gmail.com> writes:
> Thanks, Ian. That brought me further, but still no cigar. Does the
> following ring a bell?
>
> /usr/ports/gcc390/build460/./gcc/xgcc
> -B/usr/ports/gcc390/build460/./gcc/
> -B/usr/ports/gcc390/inst/s390-ibm-linux/bin/
> -B/usr/ports/gcc390/inst/s390-ibm-linux/lib/ -isystem
> /usr/ports/gcc390/inst/s390-ibm-linux/include -isystem
> /usr/ports/gcc390/inst/s390-ibm-linux/sys-include -g -O2 -O2 -g
> -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings
> -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
> -Wold-style-definition -isystem ./include -fPIC -g
> -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
> -fno-stack-protector -Dinhibit_libc -mlong-double-128 -I. -I.
> -I../.././gcc -I/usr/src/gcc-4.6.0/libgcc
> -I/usr/src/gcc-4.6.0/libgcc/. -I/usr/src/gcc-4.6.0/libgcc/../gcc
> -I/usr/src/gcc-4.6.0/libgcc/../include
> -I/usr/src/gcc-4.6.0/libgcc/../libdecnumber/dpd
> -I/usr/src/gcc-4.6.0/libgcc/../libdecnumber -DHAVE_CC_TLS -o
> decContext.o -MT decContext.o -MD -MP -MF decContext.dep -c
> /usr/src/gcc-4.6.0/libgcc/../libdecnumber/decContext.c
>
> /usr/src/gcc-4.6.0/libgcc/../libdecnumber/decContext.c:33:43: fatal
> error: string.h: No such file or directory
> compilation terminated.
string.h has to come from a C library. gcc does not include one.
Since you are trying to build a cross-compiler to a GNU/Linux system,
you may want to look at http://crosstool.org/ .
Ian
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: -m31 rejected when building libgcc for cross compiler for s390 (31 bit) gcc 4.6.0
2011-05-22 8:58 ` Ian Lance Taylor
@ 2011-05-22 9:34 ` Ian Lance Taylor
2011-05-22 9:44 ` Ian Lance Taylor
2011-05-22 12:14 ` John P. Hartmann
2 siblings, 0 replies; 8+ messages in thread
From: Ian Lance Taylor @ 2011-05-22 9:34 UTC (permalink / raw)
To: John P. Hartmann; +Cc: gcc-help
"John P. Hartmann" <jphartmann@gmail.com> writes:
> Thanks, Ian. That brought me further, but still no cigar. Does the
> following ring a bell?
>
> /usr/ports/gcc390/build460/./gcc/xgcc
> -B/usr/ports/gcc390/build460/./gcc/
> -B/usr/ports/gcc390/inst/s390-ibm-linux/bin/
> -B/usr/ports/gcc390/inst/s390-ibm-linux/lib/ -isystem
> /usr/ports/gcc390/inst/s390-ibm-linux/include -isystem
> /usr/ports/gcc390/inst/s390-ibm-linux/sys-include -g -O2 -O2 -g
> -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings
> -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
> -Wold-style-definition -isystem ./include -fPIC -g
> -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
> -fno-stack-protector -Dinhibit_libc -mlong-double-128 -I. -I.
> -I../.././gcc -I/usr/src/gcc-4.6.0/libgcc
> -I/usr/src/gcc-4.6.0/libgcc/. -I/usr/src/gcc-4.6.0/libgcc/../gcc
> -I/usr/src/gcc-4.6.0/libgcc/../include
> -I/usr/src/gcc-4.6.0/libgcc/../libdecnumber/dpd
> -I/usr/src/gcc-4.6.0/libgcc/../libdecnumber -DHAVE_CC_TLS -o
> decContext.o -MT decContext.o -MD -MP -MF decContext.dep -c
> /usr/src/gcc-4.6.0/libgcc/../libdecnumber/decContext.c
>
> /usr/src/gcc-4.6.0/libgcc/../libdecnumber/decContext.c:33:43: fatal
> error: string.h: No such file or directory
> compilation terminated.
string.h has to come from a C library. gcc does not include one.
Since you are trying to build a cross-compiler to a GNU/Linux system,
you may want to look at http://crosstool.org/ .
Ian
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: -m31 rejected when building libgcc for cross compiler for s390 (31 bit) gcc 4.6.0
2011-05-22 8:58 ` Ian Lance Taylor
2011-05-22 9:34 ` Ian Lance Taylor
@ 2011-05-22 9:44 ` Ian Lance Taylor
2011-05-22 12:14 ` John P. Hartmann
2 siblings, 0 replies; 8+ messages in thread
From: Ian Lance Taylor @ 2011-05-22 9:44 UTC (permalink / raw)
To: John P. Hartmann; +Cc: gcc-help
"John P. Hartmann" <jphartmann@gmail.com> writes:
> Thanks, Ian. That brought me further, but still no cigar. Does the
> following ring a bell?
>
> /usr/ports/gcc390/build460/./gcc/xgcc
> -B/usr/ports/gcc390/build460/./gcc/
> -B/usr/ports/gcc390/inst/s390-ibm-linux/bin/
> -B/usr/ports/gcc390/inst/s390-ibm-linux/lib/ -isystem
> /usr/ports/gcc390/inst/s390-ibm-linux/include -isystem
> /usr/ports/gcc390/inst/s390-ibm-linux/sys-include -g -O2 -O2 -g
> -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings
> -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
> -Wold-style-definition -isystem ./include -fPIC -g
> -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
> -fno-stack-protector -Dinhibit_libc -mlong-double-128 -I. -I.
> -I../.././gcc -I/usr/src/gcc-4.6.0/libgcc
> -I/usr/src/gcc-4.6.0/libgcc/. -I/usr/src/gcc-4.6.0/libgcc/../gcc
> -I/usr/src/gcc-4.6.0/libgcc/../include
> -I/usr/src/gcc-4.6.0/libgcc/../libdecnumber/dpd
> -I/usr/src/gcc-4.6.0/libgcc/../libdecnumber -DHAVE_CC_TLS -o
> decContext.o -MT decContext.o -MD -MP -MF decContext.dep -c
> /usr/src/gcc-4.6.0/libgcc/../libdecnumber/decContext.c
>
> /usr/src/gcc-4.6.0/libgcc/../libdecnumber/decContext.c:33:43: fatal
> error: string.h: No such file or directory
> compilation terminated.
string.h has to come from a C library. gcc does not include one.
Since you are trying to build a cross-compiler to a GNU/Linux system,
you may want to look at http://crosstool.org/ .
Ian
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: -m31 rejected when building libgcc for cross compiler for s390 (31 bit) gcc 4.6.0
2011-05-22 8:58 ` Ian Lance Taylor
2011-05-22 9:34 ` Ian Lance Taylor
2011-05-22 9:44 ` Ian Lance Taylor
@ 2011-05-22 12:14 ` John P. Hartmann
2011-05-22 13:12 ` Jeffrey Walton
2 siblings, 1 reply; 8+ messages in thread
From: John P. Hartmann @ 2011-05-22 12:14 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: gcc-help
Thanks Ian.
http://wiki.osdev.org/GCC_Cross-Compiler suggested
--enable-languages=c,c++ --without-headers --disable-nls but that made
no difference. So I gave the target a symbolic link to /usr/include,
and then it failed in linking because of missing object decks. Seems
like the process is building something I didn't ask for, or at least
do not want.
What I am after is in fact a cross compiler to s390 os/360 object
(well, the variety that supports long ESD names--and not the old MVS
attempt.) As I already have a cross assembler, I guess I should
simply take the intermediary xgcc and run.
I did come across crosstool in my googling, as well as a number of
sites bemoaning the quality of documentation of gnu cross compiling.
On 22 May 2011 05:52, Ian Lance Taylor <iant@google.com> wrote:
> "John P. Hartmann" <jphartmann@gmail.com> writes:
>
>> Thanks, Ian. That brought me further, but still no cigar. Does the
>> following ring a bell?
>>
>> /usr/ports/gcc390/build460/./gcc/xgcc
>> -B/usr/ports/gcc390/build460/./gcc/
>> -B/usr/ports/gcc390/inst/s390-ibm-linux/bin/
>> -B/usr/ports/gcc390/inst/s390-ibm-linux/lib/ -isystem
>> /usr/ports/gcc390/inst/s390-ibm-linux/include -isystem
>> /usr/ports/gcc390/inst/s390-ibm-linux/sys-include -g -O2 -O2 -g
>> -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings
>> -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
>> -Wold-style-definition -isystem ./include -fPIC -g
>> -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
>> -fno-stack-protector -Dinhibit_libc -mlong-double-128 -I. -I.
>> -I../.././gcc -I/usr/src/gcc-4.6.0/libgcc
>> -I/usr/src/gcc-4.6.0/libgcc/. -I/usr/src/gcc-4.6.0/libgcc/../gcc
>> -I/usr/src/gcc-4.6.0/libgcc/../include
>> -I/usr/src/gcc-4.6.0/libgcc/../libdecnumber/dpd
>> -I/usr/src/gcc-4.6.0/libgcc/../libdecnumber -DHAVE_CC_TLS -o
>> decContext.o -MT decContext.o -MD -MP -MF decContext.dep -c
>> /usr/src/gcc-4.6.0/libgcc/../libdecnumber/decContext.c
>>
>> /usr/src/gcc-4.6.0/libgcc/../libdecnumber/decContext.c:33:43: fatal
>> error: string.h: No such file or directory
>> compilation terminated.
>
> string.h has to come from a C library. gcc does not include one.
>
> Since you are trying to build a cross-compiler to a GNU/Linux system,
> you may want to look at http://crosstool.org/ .
>
> Ian
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: -m31 rejected when building libgcc for cross compiler for s390 (31 bit) gcc 4.6.0
2011-05-22 12:14 ` John P. Hartmann
@ 2011-05-22 13:12 ` Jeffrey Walton
0 siblings, 0 replies; 8+ messages in thread
From: Jeffrey Walton @ 2011-05-22 13:12 UTC (permalink / raw)
To: John P. Hartmann; +Cc: Ian Lance Taylor, gcc-help
On Sun, May 22, 2011 at 4:14 AM, John P. Hartmann <jphartmann@gmail.com> wrote:
> Thanks Ian.
>
> http://wiki.osdev.org/GCC_Cross-Compiler suggested
> --enable-languages=c,c++ --without-headers --disable-nls but that made
> no difference. So I gave the target a symbolic link to /usr/include,
> and then it failed in linking because of missing object decks. Seems
> like the process is building something I didn't ask for, or at least
> do not want.
>
> What I am after is in fact a cross compiler to s390 os/360 object
> (well, the variety that supports long ESD names--and not the old MVS
> attempt.) As I already have a cross assembler, I guess I should
> simply take the intermediary xgcc and run.
>
> I did come across crosstool in my googling, as well as a number of
> sites bemoaning the quality of documentation of gnu cross compiling.
Information on [modern] cross compiling is horrible. If I recall,
crosstools is terribly out of date (or at least the website). Have you
looked at crosstoolng (http://freshmeat.net/projects/crosstool-ng/)?
An up to date book, including cross-compilation, would be very
welcomed (hint to Ian and Jonathon).
Jeff
[SNIP]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-05-22 8:58 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-21 12:22 -m31 rejected when building libgcc for cross compiler for s390 (31 bit) gcc 4.6.0 John P. Hartmann
2011-05-21 17:04 ` Ian Lance Taylor
2011-05-22 2:00 ` John P. Hartmann
2011-05-22 8:58 ` Ian Lance Taylor
2011-05-22 9:34 ` Ian Lance Taylor
2011-05-22 9:44 ` Ian Lance Taylor
2011-05-22 12:14 ` John P. Hartmann
2011-05-22 13:12 ` Jeffrey Walton
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).