This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: re-establish NetWare as a supported (cross-only) target
- From: "Jan Beulich" <JBeulich at novell dot com>
- To: <rth at redhat dot com>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 08 Jul 2004 09:17:25 +0200
- Subject: Re: re-establish NetWare as a supported (cross-only) target
>> +/* This function is required for all platforms that do not support
the
>> + .init/.fini mechanism of invoking constructors. Still, it's a
dummy
>> + for us since we use a different startup/shutdown approach. */
>> +void __main(void) {}
>
>You should probably be defining HAS_INIT_SECTION. It doesn't
>mean *exactly* that .init/.fini sections are used; several other
>platforms use this define with other startup mechanisms.
This didn't seem to work. I know I first tried doing it that way.
>> + newsym = xmalloc (1 + strlen (asmname) + 1 + 10 + 1);
>> + sprintf (newsym, "%c%s@%d", FASTCALL_PREFIX, asmname,
total/BITS_PER_UNIT);
>> + return IDENTIFIER_POINTER (get_identifier (newsym));
>
>You're leaking memory.
The code originates from config/i386/winnt.c. I supposed that what has
been in there for years should be sufficiently correct. I would guess
that, much like has been done in other places, replacing xmalloc by
ggc_alloc would be the way to go?
>> +# We don't need some of GCC's own include files.
>> +USER_H = $(srcdir)/ginclude/stdarg.h \
>> + $(srcdir)/ginclude/varargs.h \
>> + $(srcdir)/unwind.h \
>> + $(EXTRA_HEADERS) $(LANG_EXTRA_HEADERS)
>
>Hmm? I think removing
>
> $(srcdir)/ginclude/float.h \
> $(srcdir)/ginclude/iso646.h \
> $(srcdir)/ginclude/stdbool.h \
> $(srcdir)/ginclude/stddef.h \
>
>is sure to be a mistake. Indeed, I know for a fact that not
>installing our stddef.h will break.
Why that? As long as special cases for gcc exist in these headers this
should be fine. And, given the structure of the NetWare headers (which I
can influence to a certain degree, but not in the sense of asking to
completely restructure them), using certain gcc headers will break. The
two ones I consider potential candidates for inclusion are float.h and
iso646.h, but stdbool.h and stddef.h unfortunately don't currently fit
in the remaining structure.
>> +++ 2004-07-05.10.09/gcc/config/netware-libgcc.exp 2004-05-10
14:26:31.000000000 +0200
>> @@ -0,0 +1,62 @@
>> +# libgcc_s.nlm exports
>> + (libgcc2),
>> + __absvdi2,
>> + __absvsi2,
>> + __addvdi3,
>> + __addvsi3,
>> +# __ashldi3,
>> +# __ashrdi3,
>
>This is surely i386 specific.
Agreed.
>> +++ 2004-07-05.10.09/gcc/config/t-nwld 2004-06-02
10:06:58.000000000 +0200
>> @@ -0,0 +1,48 @@
>> +CRTSTUFF_T_CFLAGS = -mpreferred-stack-boundary=2
>> +CRT0STUFF_T_CFLAGS = -mpreferred-stack-boundary=2
>
>This is definitely i386 specific.
Also agreed.
>Do *any* of the files you added to config/ really belong there?
>Do you actually plan on supporting anything besides x86?
Indeed, no. And I thought of unifying them into config/i386/. But the
(up to the 3.4 branch) pre-existing sources had them in this way,
despite there never having been NetWare on anything but x86. I'll move
them down, and in the unlikely case that we'll ever want to use them for
something else, this can still be adjusted/split accordingly.
Thanks for looking so closely at this, Jan