From: Marek Vasut Date: Thu, 28 Jan 2016 03:13:13 +0000 (+0100) Subject: Altera NIOS2 support X-Git-Tag: gc7_6_0~63 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2571df0e30b4976d7a12dbc6fbec4f1c4027924d;p=gc Altera NIOS2 support Add simple nios2 configuration support. * include/private/gcconfig.h (NIOS2): New macro. * include/private/gcconfig.h (mach_type_known, CPP_WORDSZ, MACH_TYPE, OS_TYPE, DYNAMIC_LOADING, _end, __data_start, DATASTART, DATAEND, ALIGNMENT, HBLKSIZE, HBLKSIZE, LINUX_STACKBOTTOM, NO_GETCONTEXT): Define for NIOS2. --- diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index c467c260..92d47277 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -188,6 +188,10 @@ # endif # define mach_type_known # endif +# if defined(__NIOS2__) || defined(__NIOS2) || defined(__nios2__) +# define NIOS2 /* Altera NIOS2 */ +# define mach_type_known +# endif # if defined(__or1k__) # define OR1K /* OpenRISC/or1k */ # define mach_type_known @@ -1729,6 +1733,24 @@ # endif # endif +# ifdef NIOS2 +# define CPP_WORDSZ 32 +# define MACH_TYPE "NIOS2" +# ifdef LINUX +# define OS_TYPE "LINUX" +# define DYNAMIC_LOADING + extern int _end[]; + extern int __data_start[]; +# define DATASTART ((ptr_t)(__data_start)) +# define DATAEND ((ptr_t)(_end)) +# define ALIGNMENT 4 +# ifndef HBLKSIZE +# define HBLKSIZE 4096 +# endif +# define LINUX_STACKBOTTOM +# endif /* Linux */ +# endif + # ifdef OR1K # define CPP_WORDSZ 32 # define MACH_TYPE "OR1K" @@ -2800,7 +2822,7 @@ #if ((defined(UNIX_LIKE) && (defined(DARWIN) || defined(HURD) \ || defined(OPENBSD) || defined(ARM32) \ || defined(MIPS) || defined(AVR32) \ - || defined(OR1K))) \ + || defined(OR1K) || defined(NIOS2))) \ || (defined(LINUX) && !defined(__gnu_linux__)) \ || (defined(RTEMS) && defined(I386)) || defined(PLATFORM_ANDROID)) \ && !defined(NO_GETCONTEXT)