From: "Paul Edwards" <mutazilah@gmail.com>
To: "Ulrich Weigand" <uweigand@de.ibm.com>
Cc: <gcc@gcc.gnu.org>
Subject: Re: i370 port - constructing compile script
Date: Mon, 02 Nov 2009 14:45:00 -0000 [thread overview]
Message-ID: <96C6CE7D07B640A8BBBA81C02C7891EF@Paullaptop> (raw)
I've been having fantastic success building gcc. I have got it
to iterate through the entire build (as far as I can tell) now.
> Then finally I ran into an internal compiler error which I haven't seen
> before. One of the gcc options must have triggered something off.
> Perhaps it was -Wwrite-strings, or maybe the -O2 (I normally use
> -Os for a completely unrelated reason). Either way, I need to find
> out how to switch off those flags. I'll also try to fix the compiler
> internal error in i370.md.
This problem was due to the build being done with 64-bit
long long enabled - something i370.md can't cope with.
I forced it off with these two things:
configure:
main ()
{
! long long int i;
;
return 0;
}
--- 3196,3202 ----
int
main ()
{
! zlong long int i;
hwint.h:
#if !defined HAVE_LONG_LONG
! # if GCC_VERSION >= 3000 && !PUREISO && defined(WANT64)
# define HAVE_LONG_LONG 1
# define SIZEOF_LONG_LONG 8
Now at the end of the build, I can save the output, and do a
grep "^i370-mvspdp-gcc" to get all the source files that need to be
compiled. I could attempt to use the .o files (that are really .s)
directly, but that's not something I really need.
The auto-host.h looks fine, plus I have the generated files.
I still need to clean up the scripts further (the below is a work in
progress), and I need to write the programs that will generate the
compile JCL and then try it out!
Part of the cleanup will hopefully get around the multiple make failures ...
+ make
+ cp gcc/config/i370/dummy_config.h gcc/config.h
+ make
+ cp gcc/config/i370/i370-mvspdp-gcc2 ../mvscross/bin/i370-mvspdp-gcc
+ make
:-)
BFN. Paul.
Index: gccnew/gcc/configure
diff -c gccnew/gcc/configure:1.1.1.1 gccnew/gcc/configure:1.12
*** gccnew/gcc/configure:1.1.1.1 Thu Jul 9 10:25:05 2009
--- gccnew/gcc/configure Fri Oct 30 12:34:44 2009
***************
*** 2463,2470 ****
--- 2463,2472 ----
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
+ #if !defined(__MVS__)
#include <sys/types.h>
#include <sys/stat.h>
+ #endif
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
***************
*** 3194,3200 ****
int
main ()
{
! long long int i;
;
return 0;
}
--- 3196,3202 ----
int
main ()
{
! zlong long int i;
;
return 0;
}
***************
*** 3377,3383 ****
--- 3379,3387 ----
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include "confdefs.h"
+ #if !defined(__MVS__)
#include <sys/types.h>
+ #endif
int
***************
*** 3448,3454 ****
--- 3452,3460 ----
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include "confdefs.h"
+ #if !defined(__MVS__)
#include <sys/types.h>
+ #endif
int
***************
*** 3519,3525 ****
--- 3525,3533 ----
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include "confdefs.h"
+ #if !defined(__MVS__)
#include <sys/types.h>
+ #endif
int
***************
*** 3590,3596 ****
--- 3598,3606 ----
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include "confdefs.h"
+ #if !defined(__MVS__)
#include <sys/types.h>
+ #endif
int
***************
*** 3662,3668 ****
--- 3672,3680 ----
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include "confdefs.h"
+ #if !defined(__MVS__)
#include <sys/types.h>
+ #endif
int
***************
*** 3735,3741 ****
--- 3747,3755 ----
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include "confdefs.h"
+ #if !defined(__MVS__)
#include <sys/types.h>
+ #endif
int
***************
*** 5656,5662 ****
--- 5670,5678 ----
if test $ac_cv_header_time = yes; then
cat >>confdefs.h <<\_ACEOF
+ #if !defined(__MVS__)
#define TIME_WITH_SYS_TIME 1
+ #endif
_ACEOF
fi
***************
*** 6150,6157 ****
--- 6166,6180 ----
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+ #if !defined(__MVS__)
#include <sys/types.h>
#include <sys/param.h>
+ #endif
+ #if defined(__MVS__)
+ #define BIG_ENDIAN 1
+ #define LITTLE_ENDIAN 2
+ #define BYTE_ORDER 1
+ #endif
int
main ()
{
***************
*** 6192,6199 ****
--- 6215,6229 ----
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+ #if !defined(__MVS__)
#include <sys/types.h>
#include <sys/param.h>
+ #endif
+ #if defined(__MVS__)
+ #define BIG_ENDIAN 1
+ #define LITTLE_ENDIAN 2
+ #define BYTE_ORDER 1
+ #endif
int
main ()
{
***************
*** 6731,6738 ****
--- 6761,6770 ----
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+ #if !defined(__MVS__)
#include <sys/types.h>
#include <inttypes.h>
+ #endif
int
main ()
{
***************
*** 6851,6857 ****
--- 6883,6891 ----
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
+ #if !defined(__MVS__)
char $ac_func ();
+ #endif
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
***************
*** 7051,7057 ****
--- 7085,7093 ----
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+ #if !defined(__MVS__)
#include <sys/types.h>
+ #endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
***************
*** 7093,7099 ****
--- 7129,7137 ----
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Thanks to Mike Rendell for this test. */
+ #if !defined(__MVS__)
#include <sys/types.h>
+ #endif
#define NGID 256
#undef MAX
#define MAX(x, y) ((x) > (y) ? (x) : (y))
***************
*** 7303,7311 ****
--- 7341,7351 ----
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+ #if !defined(__MVS__)
#include <sys/types.h>
#include <sys/mman.h>
#include <unistd.h>
+ #endif
#ifndef MAP_ANONYMOUS
#define MAP_ANONYMOUS MAP_ANON
***************
*** 7570,7576 ****
--- 7610,7618 ----
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
+ #if !defined(__MVS__)
char $ac_func ();
+ #endif
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
***************
*** 7644,7650 ****
--- 7686,7694 ----
else
cat >conftest.$ac_ext <<_ACEOF
/* By Ruediger Kuhlmann. */
+ #if !defined(__MVS__)
#include <sys/types.h>
+ #endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
***************
*** 7717,7725 ****
--- 7761,7771 ----
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
#include <stdlib.h>
+ #if !defined(__MVS__)
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
+ #endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
***************
*** 8998,9004 ****
--- 9044,9052 ----
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+ #if !defined(__MVS__)
#include <sys/types.h>
+ #endif
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
Index: gccnew/gcc/hwint.h
diff -c gccnew/gcc/hwint.h:1.1.1.2 gccnew/gcc/hwint.h:1.3
*** gccnew/gcc/hwint.h:1.1.1.2 Thu Jul 9 10:27:21 2009
--- gccnew/gcc/hwint.h Mon Nov 2 20:50:44 2009
***************
*** 22,28 ****
but they're all cross-compile-only.) Just in case, force a
constraint violation if that assumption is incorrect. */
#if !defined HAVE_LONG_LONG
! # if GCC_VERSION >= 3000 && !PUREISO
# define HAVE_LONG_LONG 1
# define SIZEOF_LONG_LONG 8
extern char sizeof_long_long_must_be_8[sizeof(long long) == 8 ? 1 : -1];
--- 22,28 ----
but they're all cross-compile-only.) Just in case, force a
constraint violation if that assumption is incorrect. */
#if !defined HAVE_LONG_LONG
! # if GCC_VERSION >= 3000 && !PUREISO && defined(WANT64)
# define HAVE_LONG_LONG 1
# define SIZEOF_LONG_LONG 8
extern char sizeof_long_long_must_be_8[sizeof(long long) == 8 ? 1 : -1];
Index: gccnew/gcc/config/i370/build1
diff -c /dev/null gccnew/gcc/config/i370/build1:1.2
*** /dev/null Tue Nov 3 00:56:29 2009
--- gccnew/gcc/config/i370/build1 Tue Nov 3 00:43:52 2009
***************
*** 0 ****
--- 1,6 ----
+
./configure --target=i370-mvspdp --prefix=/devel/mvscross --with-sysroot=/devel/mvshead
--enable-languages=c
+ make
+ make install
+ mv ../mvscross/bin/i370-mvspdp-gcc ../mvscross/bin/i370-mvspdp-xxx
+ cp gcc/config/i370/i370-mvspdp-gcc1 ../mvscross/bin/i370-mvspdp-gcc
+ cp gcc/config/i370/i370-mvspdp-ar ../mvscross/bin
Index: gccnew/gcc/config/i370/build2
diff -c /dev/null gccnew/gcc/config/i370/build2:1.2
*** /dev/null Tue Nov 3 00:56:29 2009
--- gccnew/gcc/config/i370/build2 Mon Nov 2 23:11:38 2009
***************
*** 0 ****
--- 1,7 ----
+
./configure --build=i686-linux --host=i370-mvspdp --target=i370-mvspdp --prefix=/devel/mvshost
--enable-languages=c --disable-nls
+
+ make
+ cp gcc/config/i370/dummy_config.h gcc/config.h
+ make
+ cp gcc/config/i370/i370-mvspdp-gcc2 ../mvscross/bin/i370-mvspdp-gcc
+ make
Index: gccnew/gcc/config/i370/dummy_config.h
diff -c /dev/null gccnew/gcc/config/i370/dummy_config.h:1.1
*** /dev/null Tue Nov 3 00:56:29 2009
--- gccnew/gcc/config/i370/dummy_config.h Mon Nov 2 23:11:29 2009
***************
*** 0 ****
--- 1,12 ----
+ #ifndef GCC_CONFIG_H
+ #define GCC_CONFIG_H
+ #ifndef POSIX
+ # define POSIX
+ #endif
+ #include "unixio.h"
+ #include "config/i370/mvspdp.h"
+ #include "auto-host.h"
+ #ifdef IN_GCC
+ # include "ansidecl.h"
+ #endif
+ #endif /* GCC_CONFIG_H */
Index: gccnew/gcc/config/i370/i370-mvspdp-ar
diff -c /dev/null gccnew/gcc/config/i370/i370-mvspdp-ar:1.1
*** /dev/null Tue Nov 3 00:56:29 2009
--- gccnew/gcc/config/i370/i370-mvspdp-ar Tue Nov 3 00:42:23 2009
***************
*** 0 ****
--- 1,2 ----
+ echo ar $*
+ touch $2
Index: gccnew/gcc/config/i370/i370-mvspdp-gcc1
diff -c /dev/null gccnew/gcc/config/i370/i370-mvspdp-gcc1:1.1
*** /dev/null Tue Nov 3 00:56:29 2009
--- gccnew/gcc/config/i370/i370-mvspdp-gcc1 Mon Nov 2 23:08:46 2009
***************
*** 0 ****
--- 1,2 ----
+ i370-mvspdp-xxx -Werror-implicit-function-declaration -DPUREISO -S -I
/devel/mvshead/usr/include $*
+ #i370-mvspdp-xxx -DPUREISO -S -I /devel/mvshead/usr/include $*
Index: gccnew/gcc/config/i370/i370-mvspdp-gcc2
diff -c /dev/null gccnew/gcc/config/i370/i370-mvspdp-gcc2:1.1
*** /dev/null Tue Nov 3 00:56:29 2009
--- gccnew/gcc/config/i370/i370-mvspdp-gcc2 Mon Nov 2 23:08:46 2009
***************
*** 0 ****
--- 1,2 ----
+ #i370-mvspdp-xxx -Werror-implicit-function-declaration -DPUREISO -S -I
/devel/mvshead/usr/include $*
+ i370-mvspdp-xxx -DPUREISO -S -I /devel/mvshead/usr/include $*
Index: gccnew/gcc/config/i370/masterbuild
diff -c /dev/null gccnew/gcc/config/i370/masterbuild:1.1
*** /dev/null Tue Nov 3 00:56:29 2009
--- gccnew/gcc/config/i370/masterbuild Mon Nov 2 23:13:48 2009
***************
*** 0 ****
--- 1,11 ----
+ rm -fr gccnew
+ cvs get gccnew
+ cd gccnew
+ gcc/config/i370/build1
+ cd ..
+
+ rm -fr gccnew
+ cvs get gccnew
+ cd gccnew
+ gcc/config/i370/build2
+ cd ..
Index: gccnew/libiberty/configure
diff -c gccnew/libiberty/configure:1.1.1.1 gccnew/libiberty/configure:1.16
*** gccnew/libiberty/configure:1.1.1.1 Thu Jul 9 10:25:05 2009
--- gccnew/libiberty/configure Sat Oct 24 10:00:20 2009
***************
*** 274,279 ****
--- 274,284 ----
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
+ #include <stdlib.h>
+ #include <time.h>
+ #include <string.h>
+ #include <signal.h>
+ #include <stdarg.h>
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
***************
*** 3110,3117 ****
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
! #include <sys/types.h>
! #include <sys/param.h>
int
main ()
{
--- 3115,3125 ----
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
! /*#include <sys/types.h>
! #include <sys/param.h>*/
! #define BIG_ENDIAN 1
! #define LITTLE_ENDIAN 2
! #define BYTE_ORDER 1
int
main ()
{
***************
*** 3143,3150 ****
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
! #include <sys/types.h>
! #include <sys/param.h>
int
main ()
{
--- 3151,3161 ----
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
! /*#include <sys/types.h>
! #include <sys/param.h>*/
! #define BIG_ENDIAN 1
! #define LITTLE_ENDIAN 2
! #define BYTE_ORDER 1
int
main ()
{
***************
*** 4163,4169 ****
--- 4174,4189 ----
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
+ #if !defined(__MVS__)
char $ac_func ();
+ #else
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <time.h>
+ #include <string.h>
+ #include <signal.h>
+ #include <stdarg.h>
+ #endif
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
***************
*** 4424,4429 ****
--- 4444,4457 ----
libiberty_cv_var_sys_errlist=yes
;;
+ *-*-mvs*)
+ # MVS has no extensions
+ ac_cv_func_vfork_works=no
+ libiberty_cv_var_sys_nerr=no
+ libiberty_cv_var_sys_errlist=no
+ libiberty_cv_var_sys_siglist=no
+ ;;
+
*-*-*vms*)
# Under VMS, vfork works very different than on Unix. The standard
test
# won't work, and it isn't easily adaptable. It makes more sense to
***************
*** 4590,4596 ****
--- 4618,4633 ----
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
+ #if !defined(__MVS__)
char $ac_func ();
+ #else
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <time.h>
+ #include <string.h>
+ #include <signal.h>
+ #include <stdarg.h>
+ #endif
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
***************
*** 4926,4932 ****
--- 4963,4971 ----
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
+ #if !defined(__MVS__)
char $ac_func ();
+ #endif
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
***************
*** 5256,5262 ****
--- 5295,5303 ----
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
+ #if !defined(__MVS__)
char $ac_func ();
+ #endif
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
***************
*** 5555,5561 ****
--- 5596,5611 ----
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
+ #if !defined(__MVS__)
char $ac_func ();
+ #else
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <time.h>
+ #include <string.h>
+ #include <signal.h>
+ #include <stdarg.h>
+ #endif
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
next reply other threads:[~2009-11-02 14:45 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-02 14:45 Paul Edwards [this message]
[not found] <OF0A51B575.29A29744-ON42257656.0067E35B-42257656.00682411@de.ibm.com>
2009-10-22 9:06 ` Paul Edwards
2009-10-22 19:26 ` Ulrich Weigand
2009-10-22 22:04 ` Paul Edwards
2009-10-23 14:36 ` Paul Edwards
2009-10-23 14:58 ` Ian Lance Taylor
2009-10-23 15:16 ` Ulrich Weigand
2009-10-24 0:20 ` Paul Edwards
2009-10-24 4:11 ` Ulrich Weigand
2009-10-27 12:18 ` Paul Edwards
-- strict thread matches above, loose matches on Subject: below --
2009-09-25 15:20 i370 port Ulrich Weigand
2009-09-30 17:24 ` i370 port - constructing compile script Paul Edwards
2009-09-30 17:36 ` Richard Henderson
2009-09-30 21:40 ` Paul Edwards
[not found] ` <mcrpr98x9w8.fsf@dhcp-172-17-9-151.mtv.corp.google.com>
2009-10-01 0:16 ` Joseph S. Myers
2009-10-01 14:00 ` Paul Edwards
2009-10-02 12:41 ` Paul Edwards
2009-10-02 16:00 ` Ian Lance Taylor
2009-10-02 22:53 ` Paul Edwards
2009-10-04 4:11 ` Ian Lance Taylor
2009-10-04 5:14 ` Paul Edwards
2009-10-04 6:04 ` Ian Lance Taylor
2009-10-04 6:50 ` Paul Edwards
2009-10-04 15:38 ` Ulrich Weigand
2009-10-04 22:51 ` Paul Edwards
2009-10-05 13:15 ` Ulrich Weigand
2009-10-06 9:32 ` Paul Edwards
2009-10-06 13:15 ` Ulrich Weigand
2009-10-06 13:38 ` Paul Edwards
2009-10-06 14:01 ` Ulrich Weigand
2009-10-14 14:33 ` Paul Edwards
2009-10-19 14:19 ` Paul Edwards
2009-10-19 17:37 ` Ulrich Weigand
2009-10-20 14:18 ` Paul Edwards
2009-10-20 15:30 ` Ulrich Weigand
2009-11-12 14:03 ` Paul Edwards
2009-11-12 20:06 ` Ralf Wildenhues
2009-11-12 20:56 ` Paul Edwards
2009-11-13 11:43 ` Paul Edwards
2009-11-13 12:01 ` Ulrich Weigand
2009-11-13 12:18 ` Paul Edwards
2009-11-13 12:57 ` Ulrich Weigand
2009-11-14 8:52 ` Paul Edwards
2009-11-14 10:49 ` Ralf Wildenhues
2009-11-14 11:28 ` Paul Edwards
2009-11-22 0:51 ` Paolo Bonzini
2009-11-18 10:51 ` Paul Edwards
2009-11-19 14:27 ` Ulrich Weigand
2009-11-21 13:40 ` Paul Edwards
2009-11-22 0:46 ` Paolo Bonzini
2009-11-13 12:08 ` Ulrich Weigand
2009-10-05 13:17 ` Michael Matz
2009-10-05 13:38 ` Paul Edwards
2009-10-05 13:46 ` Michael Matz
2009-10-01 14:28 ` Paul Brook
2009-10-01 16:00 ` Paul Edwards
2009-10-01 18:36 ` Ian Lance Taylor
2009-10-01 23:43 ` Paul Edwards
2009-10-01 21:10 ` David Edelsohn
2009-10-01 22:22 ` Toon Moene
2009-10-02 0:19 ` Paul Edwards
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=96C6CE7D07B640A8BBBA81C02C7891EF@Paullaptop \
--to=mutazilah@gmail.com \
--cc=gcc@gcc.gnu.org \
--cc=uweigand@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).