mirror of
https://github.com/systemd/systemd.git
synced 2025-01-27 18:04:05 +03:00
architecture: Add nios2 (#3159)
Add nios2 architecture support. The nios2 is a softcore by Altera.
This commit is contained in:
parent
26ccc1d087
commit
b79660e6ac
@ -121,6 +121,8 @@ int uname_architecture(void) {
|
|||||||
{ "tilegx", ARCHITECTURE_TILEGX },
|
{ "tilegx", ARCHITECTURE_TILEGX },
|
||||||
#elif defined(__cris__)
|
#elif defined(__cris__)
|
||||||
{ "crisv32", ARCHITECTURE_CRIS },
|
{ "crisv32", ARCHITECTURE_CRIS },
|
||||||
|
#elif defined(__nios2__)
|
||||||
|
{ "nios2", ARCHITECTURE_NIOS2 },
|
||||||
#else
|
#else
|
||||||
#error "Please register your architecture here!"
|
#error "Please register your architecture here!"
|
||||||
#endif
|
#endif
|
||||||
@ -171,6 +173,7 @@ static const char *const architecture_table[_ARCHITECTURE_MAX] = {
|
|||||||
[ARCHITECTURE_M68K] = "m68k",
|
[ARCHITECTURE_M68K] = "m68k",
|
||||||
[ARCHITECTURE_TILEGX] = "tilegx",
|
[ARCHITECTURE_TILEGX] = "tilegx",
|
||||||
[ARCHITECTURE_CRIS] = "cris",
|
[ARCHITECTURE_CRIS] = "cris",
|
||||||
|
[ARCHITECTURE_NIOS2] = "nios2",
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFINE_STRING_TABLE_LOOKUP(architecture, int);
|
DEFINE_STRING_TABLE_LOOKUP(architecture, int);
|
||||||
|
@ -57,6 +57,7 @@ enum {
|
|||||||
ARCHITECTURE_M68K,
|
ARCHITECTURE_M68K,
|
||||||
ARCHITECTURE_TILEGX,
|
ARCHITECTURE_TILEGX,
|
||||||
ARCHITECTURE_CRIS,
|
ARCHITECTURE_CRIS,
|
||||||
|
ARCHITECTURE_NIOS2,
|
||||||
_ARCHITECTURE_MAX,
|
_ARCHITECTURE_MAX,
|
||||||
_ARCHITECTURE_INVALID = -1
|
_ARCHITECTURE_INVALID = -1
|
||||||
};
|
};
|
||||||
@ -187,6 +188,9 @@ int uname_architecture(void);
|
|||||||
#elif defined(__cris__)
|
#elif defined(__cris__)
|
||||||
# define native_architecture() ARCHITECTURE_CRIS
|
# define native_architecture() ARCHITECTURE_CRIS
|
||||||
# error "Missing LIB_ARCH_TUPLE for CRIS"
|
# error "Missing LIB_ARCH_TUPLE for CRIS"
|
||||||
|
#elif defined(__nios2__)
|
||||||
|
# define native_architecture() ARCHITECTURE_NIOS2
|
||||||
|
# define LIB_ARCH_TUPLE "nios2-linux-gnu"
|
||||||
#else
|
#else
|
||||||
# error "Please register your architecture here!"
|
# error "Please register your architecture here!"
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user