(6/6): i386-pc-interix support -- gcc
Jeffrey A Law
law@cygnus.com
Mon Mar 22 00:31:00 GMT 1999
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.
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.
> ==========================================================================
>
> 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.
> * 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?
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.
>
> * gcc.c (main): Add specs handling for environment variables.
> Add $INTERIX_ROOT/usr/lib/ etc to startfiles_prefixes.
>
> * 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.
jeff
More information about the Gcc-patches
mailing list