Skip to content

Commit

Permalink
/
Browse files Browse the repository at this point in the history
        * configure.in: Remove target-libstdc++-v3 from noconfigdirs for
        *-*-netware, but add target-libmudflap.
        Consolidate *-*-netware targets (of which really only i?86 exists)
        into a single entry.
        * configure: Likewise.
gcc/
        * config.gcc: Resurrect NetWare as a target. Handle special case of
        Novell linker to be used (specified through --with-ld=) and threading
        model of either Posix (default) or NKS.
        * config/i386/i386.c (ix86_return_pops_args): Conditionalize popping
        of incoming hidden argument on KEEP_AGGREGATE_RETURN_POINTER.
        * config/i386/i386.h (KEEP_AGGREGATE_RETURN_POINTER): New.
        * config/i386/netware.c, config/i386/netware.h: New.
        * config/i386/nwld.c, config/i386/nwld.h: New.
        * config/i386/netware-crt0.c: New.
        * config/i386/netware-libgcc.c: New.
        * config/i386/netware-libgcc.def: New.
        * config/i386/netware-libgcc.exp: New.
        * config/i386/t-netware, config/i386/t-nwld: New.
        * gthr-nks.h: New.
        * doc/install.texi: Document NKS threading model.
gcc/cp/
        * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
        than "-lm".
gcc/testsuite/
        * g++.dg/abi/bitfield5.C: Use -mno-ms-bitfields.
        * g++.old-deja/g++.jason/thunk2.C: xfail for NetWare.
        * g++.old-deja/g++.law/profile1.C: xfail for NetWare.
        * g++.old-deja/g++.other/store-expr1.C: xfail for NetWare.
        * gcc.c-torture/compile/20001109-1.c: xfail for NetWare.
        * gcc.c-torture/compile/20001109-2.c: xfail for NetWare.
        * gcc.c-torture/execute/multi-ix.c: Use __builtin_bzero rather than
        the non-portable bzero.
        * gcc.dg/20010912-1.c: xfail for NetWare.
        * gcc.dg/20020426-2.c: xfail for NetWare.
        * gcc.dg/20021014-1.c: xfail for NetWare.
        * gcc.dg/20021018-1.c: xfail for NetWare.
        * gcc.dg/20030213-1.c: xfail for NetWare.
        * gcc.dg/20030225-1.c: xfail for NetWare.
        * gcc.dg/20030708-1.c: xfail for NetWare.
        * gcc.dg/builtins-config.h: Also exclude NetWare.
        * gcc.dg/format/format.h: Define restrict only if not already defined.
        * gcc.dg/nest.c: xfail for NetWare.
        * gcc.dg/special/gcsec-1.c: Don't pass -static for NetWare.
        * lib/target-supports.exp (check_visibility_available): Exclude
        NetWare.
fixincludes/
        * inclhack.def: Suppress exception_structure and math_exception
        for NetWare headers.
        * fixincl.x: Regenerate.
libstdc++-v3/
        * crossconfig.m4: Add NetWare as a target.
        * configure: Regenerate.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87040 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
rth committed Sep 3, 2004
1 parent 7469aed commit 634f7a1
Show file tree
Hide file tree
Showing 47 changed files with 4,048 additions and 22 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2004-09-03 Jan Beulich <jbeulich@novell.com>

* configure.in: Remove target-libstdc++-v3 from noconfigdirs for
*-*-netware, but add target-libmudflap.
Consolidate *-*-netware targets (of which really only i?86 exists)
into a single entry.
* configure: Likewise.

2004-09-01 Paolo Bonzini <bonzini@gnu.org>

* Makefile.tpl (sorry): Remove.
Expand Down
9 changes: 3 additions & 6 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -1203,8 +1203,8 @@ case "${target}" in
;;
esac
;;
*-*-netware)
noconfigdirs="$noconfigdirs target-libstdc++-v3 target-newlib target-libiberty target-libgloss ${libgcj}"
*-*-netware*)
noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj} target-libmudflap"
;;
*-*-rtems*)
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
Expand Down Expand Up @@ -2636,10 +2636,7 @@ extra_nmflags_for_target=
extra_ranlibflags_for_target=
target_makefile_frag=/dev/null
case "${target}" in
i[3456789]86-*-netware*)
target_makefile_frag="config/mt-netware"
;;
powerpc-*-netware*)
*-*-netware*)
target_makefile_frag="config/mt-netware"
;;
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
Expand Down
9 changes: 3 additions & 6 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,8 @@ case "${target}" in
;;
esac
;;
*-*-netware)
noconfigdirs="$noconfigdirs target-libstdc++-v3 target-newlib target-libiberty target-libgloss ${libgcj}"
*-*-netware*)
noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj} target-libmudflap"
;;
*-*-rtems*)
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
Expand Down Expand Up @@ -1441,10 +1441,7 @@ extra_nmflags_for_target=
extra_ranlibflags_for_target=
target_makefile_frag=/dev/null
case "${target}" in
i[[3456789]]86-*-netware*)
target_makefile_frag="config/mt-netware"
;;
powerpc-*-netware*)
*-*-netware*)
target_makefile_frag="config/mt-netware"
;;
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
Expand Down
6 changes: 6 additions & 0 deletions fixincludes/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2004-09-03 Jan Beulich <jbeulich@novell.com>

* inclhack.def: Suppress exception_structure and math_exception
for NetWare headers.
* fixincl.x: Regenerate.

2004-08-31 Paolo Bonzini <bonzini@gnu.org>

* .cvsignore: New.
Expand Down
4 changes: 2 additions & 2 deletions fixincludes/fixincl.x
Original file line number Diff line number Diff line change
Expand Up @@ -1812,7 +1812,7 @@ tSCC zException_StructureSelect0[] =
* content bypass pattern - skip fix if pattern found
*/
tSCC zException_StructureBypass0[] =
"matherr.*(struct exception|__MATH_EXCEPTION)";
"matherr.*(struct exception|__MATH_EXCEPTION|[ \\t]*__FP_EXCEPTION[ \\t]*\\*[ \\t]*)";

#define EXCEPTION_STRUCTURE_TEST_CT 2
static tTestDesc aException_StructureTests[] = {
Expand Down Expand Up @@ -3503,7 +3503,7 @@ tSCC zMath_ExceptionSelect0[] =
* content bypass pattern - skip fix if pattern found
*/
tSCC zMath_ExceptionBypass0[] =
"We have a problem when using C\\+\\+";
"We have a problem when using C\\+\\+|for C\\+\\+, _[a-z0-9A-Z_]+_exception; for C, exception";

#define MATH_EXCEPTION_TEST_CT 2
static tTestDesc aMath_ExceptionTests[] = {
Expand Down
4 changes: 2 additions & 2 deletions fixincludes/inclhack.def
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,7 @@ fix = {
files = math.h;

/* If matherr has a prototype already, the header needs no fix. */
bypass = 'matherr.*(struct exception|__MATH_EXCEPTION)';
bypass = 'matherr.*(struct exception|__MATH_EXCEPTION|[ \t]*__FP_EXCEPTION[ \t]*\*[ \t]*)';
select = matherr;

c_fix = wrap;
Expand Down Expand Up @@ -1950,7 +1950,7 @@ fix = {
* exception either. So currently we bypass only for glibc, based on a
* comment in the fixed glibc header. Ick.
*/
bypass = 'We have a problem when using C\+\+';
bypass = 'We have a problem when using C\+\+|for C\+\+, _[a-z0-9A-Z_]+_exception; for C, exception';
c_fix = wrap;

c_fix_arg = "#ifdef __cplusplus\n"
Expand Down
18 changes: 18 additions & 0 deletions gcc/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@
is only one reg.
(ia64_function_value): Ditto.

2004-09-03 Jan Beulich <jbeulich@novell.com>

* config.gcc: Resurrect NetWare as a target. Handle special case of
Novell linker to be used (specified through --with-ld=) and threading
model of either Posix (default) or NKS.
* config/i386/i386.c (ix86_return_pops_args): Conditionalize popping
of incoming hidden argument on KEEP_AGGREGATE_RETURN_POINTER.
* config/i386/i386.h (KEEP_AGGREGATE_RETURN_POINTER): New.
* config/i386/netware.c, config/i386/netware.h: New.
* config/i386/nwld.c, config/i386/nwld.h: New.
* config/i386/netware-crt0.c: New.
* config/i386/netware-libgcc.c: New.
* config/i386/netware-libgcc.def: New.
* config/i386/netware-libgcc.exp: New.
* config/i386/t-netware, config/i386/t-nwld: New.
* gthr-nks.h: New.
* doc/install.texi: Document NKS threading model.

2004-09-03 Jan Beulich <jbeulich@novell.com>

PR c/7054
Expand Down
19 changes: 19 additions & 0 deletions gcc/config.gcc
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,25 @@ i[34567]86-*-lynxos*)
gnu_ld=yes
gas=yes
;;
i[3456x]86-*-netware*)
tm_file="${tm_file} i386/unix.h i386/att.h elfos.h svr4.h tm-dwarf2.h i386/netware.h"
tmake_file=i386/t-netware
extra_objs=netware.o
case /${with_ld} in
*/nwld)
extra_objs="$extra_objs nwld.o"
tm_file="${tm_file} i386/nwld.h"
tmake_file="${tmake_file} i386/t-nwld"
extra_parts="crt0.o libgcc.def libc.def libcpre.def posixpre.def"
;;
esac
case x${enable_threads} in
x | xyes | xposix) thread_file='posix';;
xnks) thread_file='nks';;
xno) ;;
*) echo 'Unknown thread configuration for NetWare' >&2; exit 1;;
esac
;;
i[34567]86-*-nto-qnx*)
tm_file="${tm_file} i386/att.h dbxelf.h tm-dwarf2.h elfos.h svr4.h i386/unix.h i386/nto.h"
tmake_file=i386/t-nto
Expand Down
3 changes: 2 additions & 1 deletion gcc/config/i386/i386.c
Original file line number Diff line number Diff line change
Expand Up @@ -1875,7 +1875,8 @@ ix86_return_pops_args (tree fundecl, tree funtype, int size)

/* Lose any fake structure return argument if it is passed on the stack. */
if (aggregate_value_p (TREE_TYPE (funtype), fundecl)
&& !TARGET_64BIT)
&& !TARGET_64BIT
&& !KEEP_AGGREGATE_RETURN_POINTER)
{
int nregs = ix86_function_regparm (funtype, fundecl);

Expand Down
2 changes: 2 additions & 0 deletions gcc/config/i386/i386.h
Original file line number Diff line number Diff line change
Expand Up @@ -1243,6 +1243,8 @@ do { \
/* This is overridden by <cygwin.h>. */
#define MS_AGGREGATE_RETURN 0

/* This is overridden by <netware.h>. */
#define KEEP_AGGREGATE_RETURN_POINTER 0

/* Define the classes of registers for register constraints in the
machine description. Also define ranges of constants.
Expand Down
77 changes: 77 additions & 0 deletions gcc/config/i386/netware-crt0.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/* Startup routines for NetWare.
Contributed by Jan Beulich (jbeulich@novell.com)
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */

#include <stddef.h>
#include <stdint.h>
#include "unwind-dw2-fde.h"


#define SECTION_DECL(name, decl) decl __attribute__((__section__(name)))

SECTION_DECL(".ctors", void(*const __CTOR_LIST__)(void))
= (void(*)(void))(intptr_t)-1;
SECTION_DECL(".ctors$_", void(*const __CTOR_END__)(void)) = NULL;

SECTION_DECL(".dtors", void(*const __DTOR_LIST__)(void))
= (void(*)(void))(intptr_t)-1;
SECTION_DECL(".dtors$_", void(*const __DTOR_END__)(void)) = NULL;

/* No need to use the __[de]register_frame_info_bases functions since
for us the bases are NULL always anyway. */
void __register_frame_info (const void *, struct object *)
__attribute__((__weak__));
void *__deregister_frame_info (const void *) __attribute__((__weak__));

SECTION_DECL(".eh_frame", /*const*/ uint32_t __EH_FRAME_BEGIN__[]) = { };
SECTION_DECL(".eh_frame$_", /*const*/ uint32_t __EH_FRAME_END__[]) = {0};

int
__init_environment (void *unused __attribute__((__unused__)))
{
void (* const * pctor)(void);
static struct object object;

if (__register_frame_info)
__register_frame_info (__EH_FRAME_BEGIN__, &object);

for (pctor = &__CTOR_END__ - 1; pctor > &__CTOR_LIST__; --pctor)
if (*pctor != NULL)
pctor();

return 0;
}

int
__deinit_environment (void *unused __attribute__((__unused__)))
{
/* This should be static to prevent calling the same destructor
twice (just in case where we get here multiple times). */
static void (* const * pdtor)(void) = &__DTOR_LIST__ + 1;

while (pdtor < &__DTOR_END__)
if (*pdtor++ != NULL)
pdtor[-1] ();

if (__deregister_frame_info)
__deregister_frame_info(__EH_FRAME_BEGIN__);

return 0;
}
59 changes: 59 additions & 0 deletions gcc/config/i386/netware-libgcc.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/* Startup code for libgcc_s.nlm, necessary because we can't allow
libgcc_s to use libc's malloc & Co., which associate allocations
with the NLM owning the current (application) thread.
Contributed by Jan Beulich (jbeulich@novell.com)
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */

#include <netware.h>
#include <stddef.h>
#include <stdlib.h>
#include <windows.h>

static rtag_t allocRTag;

BOOL
DllMain (HINSTANCE libraryId __attribute__ ((__unused__)),
DWORD reason, void *hModule)
{
switch (reason)
{
case DLL_NLM_STARTUP:
allocRTag = AllocateResourceTag (hModule,
"libgcc memory", AllocSignature);
return allocRTag != NULL;
case DLL_NLM_SHUTDOWN:
/* This does not recover resources associated with the tag...
ReturnResourceTag (allocRTag, 0); */
break;
}
return 1;
}

void *
malloc (size_t size)
{
return AllocSleepOK (size, allocRTag, NULL);
}

void
free (void *ptr)
{
Free (ptr);
}
2 changes: 2 additions & 0 deletions gcc/config/i386/netware-libgcc.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
description "gcc runtime and intrinsics support"
copyright "Copyright (C) 1989-2004 Free Software Foundation, Inc."
62 changes: 62 additions & 0 deletions gcc/config/i386/netware-libgcc.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# libgcc_s.nlm exports
(libgcc2),
__absvdi2,
__absvsi2,
__addvdi3,
__addvsi3,
# __ashldi3,
# __ashrdi3,
__clzdi2,
__clzsi2,
__ctzdi2,
__ctzsi2,
__deregister_frame,
__deregister_frame_info,
__deregister_frame_info_bases,
# __divdi3,
__ffsdi2,
__ffssi2,
__fixunsdfdi,
__fixunssfdi,
# __fixunstfdi,
__fixunsxfdi,
__gcc_bcmp,
__gcc_personality_v0,
# __lshrdi3,
# __moddi3,
# __muldi3,
__mulvdi3,
__mulvsi3,
__negvdi2,
__negvsi2,
__paritydi2,
__paritysi2,
__popcountdi2,
__popcountsi2,
__register_frame,
__register_frame_info,
__register_frame_info_bases,
__register_frame_info_table,
__register_frame_info_table_bases,
__register_frame_table,
__subvdi3,
__subvsi3,
# __umoddi3,
# __udivdi3,
_Unwind_Backtrace,
_Unwind_DeleteException,
_Unwind_FindEnclosingFunction,
_Unwind_Find_FDE,
_Unwind_ForcedUnwind,
_Unwind_GetCFA,
_Unwind_GetDataRelBase,
_Unwind_GetGR,
_Unwind_GetIP,
_Unwind_GetLanguageSpecificData,
_Unwind_GetRegionStart,
_Unwind_GetTextRelBase,
_Unwind_RaiseException,
_Unwind_Resume,
_Unwind_Resume_or_Rethrow,
_Unwind_SetGR,
_Unwind_SetIP
Loading

0 comments on commit 634f7a1

Please sign in to comment.