This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: i370 port - constructing compile script


"Paul Edwards" <mutazilah@gmail.com> writes:

>> * Configure gcc as a cross-compiler.
>
> So this would not be considered a Canadian Cross after all,
> and with configure I only change the target, not the host?

The end result is a Canadian Cross, but the first step in a typical
build of a Canadian Cross is a cross-compiler.


>> * Write a cross-assembler and cross-linker.
>
> Sure, and that's what I'm trying to avoid.  I have a perfectly working
> assembler and linker on MVS already.  It's been working for several
> decades.

There are many advantages of a cross-assembler and cross-linker, but,
whatever.


>> * Copy header files and libraries from the host (MVS).
>
> That's fine.  And use the --with-root option of configure to get
> them used?

--with-sysroot, yes.


>> (Note that you mention fork, but as you probably know the gcc code
>> never actually calls fork.  It calls the pexecute routines in
>> libiberty.  Those routines have been ported to several different
>> hosts, including MS-DOS.  If you port them to MVS, then you don't have
>> to worry about fork.)
>
> I spent several minutes going through the config.h looking at the
> "detected" functions to find a good example.  Maybe I should I
> have getrlimit or getrusage or fputs_unlocked instead.

fputs_unlocked is only used for systems which provide it.  On systems
which don't, gcc uses fputs.

Similarly, getrlimit and getrusage are entirely optional.  They are
used if available, otherwise not.


I've been discussing this under the assumption that you want to
contribute your port back to gcc.  If you don't, then I think I will
step out.  You can pursue whatever path you like.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]