Mercurial > hg > Members > menikon > CbC_xv6
changeset 14:02a1ce33746e
armclang
author | mir3636 |
---|---|
date | Fri, 16 Feb 2018 20:28:53 +0900 |
parents | f28daf1e47c1 |
children | 0983f02ed21b |
files | cbclang/arm/setjmp.h src/makefile-armclang |
diffstat | 2 files changed, 42 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /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__)); +
--- 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)