to get newlib to work for little endian sh target, you might want to apply this patch: usr/local/lib/gcc-lib/sh-elf/2.95.2/include/stdarg.h:line 105-107 // #if (defined (__arm__) && ! defined (__ARMEB__)) || defined (__i386__) || defined (__i860__) || defined (__ns32000__) || defined (__vax__) /* This is for little-endian machines; small args are padded upward. */ #define va_arg(AP, TYPE) \ (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \ *((TYPE *) (void *) ((char *) (AP) - __va_rounded_size (TYPE)))) // #else /* big-endian */ /* This is for big-endian machines; small args are padded downward. */ // #define va_arg(AP, TYPE) \ // (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \ // *((TYPE *) (void *) ((char *) (AP) \ // - ((sizeof (TYPE) < __va_rounded_size (char) \ // ? sizeof (TYPE) : __va_rounded_size (TYPE)))))) // #endif /* big-endian */ ... as you can see the linux dudes who ported gcc to sh target probably had the big-endian evaluation boards and forgot to add some kind of switch kinda ;=P