# HG changeset patch # User mir3636 # Date 1518780533 -32400 # Node ID 02a1ce33746e677d974e63e1ac336987e9c4e8cf # Parent f28daf1e47c1495703071e517d05865ceff175c6 armclang diff -r f28daf1e47c1 -r 02a1ce33746e cbclang/arm/setjmp.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cbclang/arm/setjmp.h Fri Feb 16 20:28:53 2018 +0900 @@ -0,0 +1,29 @@ + +typedef int __jmp_buf[64] __attribute__((__aligned__ (8))); +typedef int __sig_atomic_t; +typedef struct + { + unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; + } __sigset_t; +struct __jmp_buf_tag + { + __jmp_buf __jmpbuf; + int __mask_was_saved; + __sigset_t __saved_mask; + }; + +typedef struct __jmp_buf_tag jmp_buf[1]; +extern int setjmp (jmp_buf __env) __attribute__ ((__nothrow__)); + +extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __attribute__ ((__nothrow__)); +extern int _setjmp (struct __jmp_buf_tag __env[1]) __attribute__ ((__nothrow__)); + +extern void longjmp (struct __jmp_buf_tag __env[1], int __val) + __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); + +extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) + __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); +typedef struct __jmp_buf_tag sigjmp_buf[1]; +extern void siglongjmp (sigjmp_buf __env, int __val) + __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); + diff -r f28daf1e47c1 -r 02a1ce33746e src/makefile-armclang --- a/src/makefile-armclang Fri Feb 16 17:44:49 2018 +0900 +++ b/src/makefile-armclang Fri Feb 16 20:28:53 2018 +0900 @@ -2,6 +2,19 @@ QEMU = qemu-system-arm include makefile.inc +CC = /usr/local/cbclang/bin/clang +AS = arm-linux-gnu-as +LD = arm-linux-gnu-ld +OBJCOPY = arm-linux-gnu-objcopy +OBJDUMP = arm-linux-gnu-objdump + +# CFLAGS = -march=armv6 -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -Werror -I. -g -O0 +CFLAGS = -target armv6-arm-none-eabi -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -I. -I ../cbclang/arm -g -O0 +LDFLAGS = -L. +# ASFLAGS = -march=armv6 +ASFLAGS = -target armv6-arm-none-eabi + +LIBGCC = $(shell $(CC) -print-libgcc-file-name) # link the libgcc.a for __aeabi_idiv. ARM has no native support for div LIBS = $(LIBGCC)