This is the mail archive of the gcc-patches@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]

Re: (6/6): i386-pc-interix support -- gcc


Thank you for getting to this.  This is Mumit's patch, but I don't know how
quickly Mumit will respond, so I'll touch on a few items, below.

Donn

Jeffrey A Law wrote:
> 
>   In message <Pine.SUN.3.93.990127003056.4622G-101000@modi.xraylith.wisc.edu>yo
> u write:
>   > The following patch adds support for i386-pc-interix. Diffs against dev
>   > snapshot 1999-01-17.
>   >
>   > Paperwork from patch co-author Donn Terry of Interix should be on the
>   > way if not there already.
>   >
>   > These patches, against egcs-1997-01-17, add basic support for i386-interix.
>   > Interix specific files are pretty self-explanatory; however, some of the
>   > other changes require a bit of explanation:
>   >
>   > - gcc.c: Interix lacks a single-rooted filesystem, and hence GCC
>   >   as is can't figure out where the system includes/libraries/etc
>   >   are. The changes here are interim until Interix release the
>   >   support for single-rooted FS. There are two changes:
>   >
>   >   * add %$ENV_VAR handling in specs.
>   >     Although specifically neeed for Interix, this feature is generally
>   >     useful: consider allowing the setting of environment variables
>   >     to control compile or link flags, as well as dynamically controlling
>   >     search paths.  Hopefully it will become a general feature.
>   >
>   >     See LIB_SPEC for an example use of this feature.
>   >
>   >   * explicitly add $INTERIX_ROOT/usr/lib to the startfile_prefixes.
>   >     This is interim until future Interix release.
>   >
>   >   Both are guarded by __INTERIX macro.
>   >
>   > - c-parse.y: This is a general fix for parsing the following declaration:
>   >
>   >   extern int  __attribute__((__cdecl_))
>   >     atexit(void (__attribute__((__cdecl_)) *)(void));
>   >
>   > - i386.{c,md}: Interix uses __GLOBAL_OFFSET_TABLE instead of a single
>   >   leading underscore. Again, guarded by __INTERIX macro.
>   >
> OK.  This one is going to take a little work.  It really should have been
> split into a few pieces so that we could have dealt with the obvious stuff
> immediately.

(Is "one" here referring to the specific item above, or to the whole patch?
I'm presuming the latter in this response.)

> The patch had a change to gcc/config.sub.  gcc/config.sub is gone, and the
> toplevel config.sub has interix support, so that part of the patch is
> obsolete.

That was seridipitous.
> 
>   > ==========================================================================
>   >
>   > Wed Jan 20 19:14:09 1999  Mumit Khan  <khan@xraylith.wisc.edu>
>   >                       Donn Terry  <donn@interix.com>
>   >
>   >     * configure.in: Add i386-pc-interix support.
>   >     * configure: Regenerate.
> These should basically be OK.  Though they may need tweaking depending
> on what we do with some changes (see below).
> 
>   >     * crti.c: New file.
> Why do you need a new file for c-runtime startup?  I'd prefer not to add
> another ctor/dtor scheme if we don't have to.  I'd be a little suprised if
> we don't already have ways to solve whatever problem you're trying to solve.

This is a tricky interaction with ld having to do with placing the ___CTOR_LIST___
and ___DTOR_LIST___ symbols correctly in the PE environment along with some 
other changes that are not yet submitted.  This change can be reasonably
deferred until the rest of the package comes along, if that makes life
simpler.

> 
>   >     * fixinc.interix: New file.
>   >     * config/interix.h: New file.
>   >     * config/x-interix: New file.
>   >     * config/xm-interix.h: New file.
>   >     * i386/interix.h: New file.
>   >     * i386/interix.c: New file.
>   >     * i386/t-interix: New file.
> Does interix run on multiple cpus?    If it's just x86 based, then why
> bother putting anything into config?  Why not put everything into
> config/i386?

It also runs on the Alpha; above you indicated a preference for bite-sized
chunks, and holding the Alpha until later was for exactly that reason.
(There are several more patches to follow on once this set of 6 get into
place; I guess Mumit and I didn't get the pieces small enough.)

> The fixinc.interix change is probably OK.
> 
>   >     * i386/i386.c (load_pic_register): Use __GLOBAL_OFFSET_TABLE on
>   >     Interix.
>   >     * i386/i386.md (prologue_get_pc_and_set_got): Likewise.

This is an Alpha interaction (Alpha on NT doesn't use the leading underscore
convention). Can defer until it forces the issue, but alternatives welcome.

>   >     * gcc.c (main): Add specs handling for environment variables.
>   >     Add $INTERIX_ROOT/usr/lib/ etc to startfiles_prefixes.

Interix specific and guarded.

>   >
>   >     * sdbout.c (syms.h): Don't include on Interix.
>   >
>   >     * protoize.c (abspath): Preserve multiple leading slashes.
>   >
>   >     * toplev.c (main): No sbrk on Interix.
>   >
>   >     * c-parse.y (absdcl1): Allow attributes in explicit typespecs.
>   >     (%expect): Update.
>   >     * c-parse.h: Regenerate.
>   >     * c-parse.c: Likewise.
> We'll resolve these once we've resolved the basic config patches.  We
> should go after them one by one.

I presume you'd like the ones between sdbout and c-parse.c as separate
chunks.

Specifically what action is required at this time?  Are you going to apply
the easy ones above, or do you need a new bundle with just those, plus
a series of smaller patches for the more controversial ones?  (Just so we
know precisely what you require.)

Donn

-- 

===================================================
Donn Terry                  mailto:donn@interix.com
Softway Systems, Inc.        http://www.interix.com
2850 McClelland Dr, Ste. 1800   Ft.Collins CO 80525
Tel: +1-970-204-9900           Fax: +1-970-204-9951
===================================================


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