sparc: Add compiler and linker tool support

GCC and binutils support for the SPARC architecture.

Co-authored-by: Nikolaus Huber <nikolaus.huber.melk@gmail.com>
Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
This commit is contained in:
Martin Åberg 2020-10-16 21:01:40 +02:00 committed by Andrew Boie
parent 97f6dfdd72
commit ffc89b59a2
3 changed files with 13 additions and 0 deletions

View file

@ -49,6 +49,8 @@
/* Not needed */
#elif defined(CONFIG_ARCH_POSIX)
/* Not needed */
#elif defined(CONFIG_SPARC)
OUTPUT_FORMAT("elf32-sparc")
#else
#error Arch not supported.
#endif

View file

@ -79,6 +79,10 @@
#elif defined(CONFIG_ARCH_POSIX)
#elif defined(CONFIG_SPARC)
#define PERFOPT_ALIGN .align 4
#else
#error Architecture unsupported

View file

@ -438,6 +438,13 @@ do { \
__asm__(".globl\t" #name "\n\t.equ\t" #name \
",%c0" \
"\n\t.type\t" #name ",@object" : : "n"(value))
#elif defined(CONFIG_SPARC)
#define GEN_ABSOLUTE_SYM(name, value) \
__asm__(".global\t" #name "\n\t.equ\t" #name \
",%0" \
"\n\t.type\t" #name ",#object" : : "n"(value))
#else
#error processor architecture not supported
#endif