# HG changeset patch # User Eli Zaretskii # Date 1166828755 0 # Node ID bdb161691a87a3f53efa943c54df4273282e2acc # Parent 058e08ed672acae9d7537e95fb7b11b5ffd0bd00 Add support for NetBSD. diff -r 058e08ed672a -r bdb161691a87 src/m/amdx86-64.h --- a/src/m/amdx86-64.h Fri Dec 22 22:58:05 2006 +0000 +++ b/src/m/amdx86-64.h Fri Dec 22 23:05:55 2006 +0000 @@ -125,12 +125,16 @@ #undef LIB_STANDARD #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o +#elif defined(__NetBSD__) + +/* LIB_STANDARD and START_FILES set correctly in s/netbsd.h */ + #elif defined(sun) #undef START_FILES #undef LIB_STANDARD -#else /* !__OpenBSD__ && !__FreeBSD__ && !sun */ +#else /* !__OpenBSD__ && !__FreeBSD__ && !__NetBSD__ && !sun */ #undef START_FILES #ifdef HAVE_X86_64_LIB64_DIR diff -r 058e08ed672a -r bdb161691a87 src/m/hp800.h --- a/src/m/hp800.h Fri Dec 22 22:58:05 2006 +0000 +++ b/src/m/hp800.h Fri Dec 22 23:05:55 2006 +0000 @@ -174,6 +174,14 @@ #define rindex strrchr #endif /* __hpux */ + +/* Systems with GCC don't need to lose. */ +#ifdef __NetBSD__ +# ifdef __GNUC__ +# define alloca __builtin_alloca +# define HAVE_ALLOCA +# endif /* __GNUC__ */ +#endif /* __NetBSD__ */ /* arch-tag: 809436e6-1645-4b92-b40d-2de5d6e7227c (do not change this comment) */