OLD | NEW |
1 # This Makefile builds onacl version of libgcc.a | 1 # This Makefile builds onacl version of libgcc.a |
2 # | 2 # |
3 # More information on the functions of libgcc can be found at: | 3 # More information on the functions of libgcc can be found at: |
4 # http://gcc.gnu.org/onlinedocs/gccint/Libgcc.html#Libgcc | 4 # http://gcc.gnu.org/onlinedocs/gccint/Libgcc.html#Libgcc |
5 # ../README.txt | 5 # ../README.txt |
6 # | 6 # |
7 # The following variables are expected to be set externally: | 7 # The following variables are expected to be set externally: |
8 | 8 |
9 # SRC_DIR | 9 # SRC_DIR |
10 # ARCH | |
11 # CC | 10 # CC |
12 # AR | 11 # AR |
13 # CFLAGS | 12 # CFLAGS |
14 | 13 |
15 # pick up .c files from another dir | 14 # pick up .c files from another dir |
16 vpath %.c ${SRC_DIR} | 15 vpath %.c ${SRC_DIR} |
17 | 16 |
18 | 17 |
19 # TODO(robertm): augment/prune this as we gain a better understanding of llc | 18 # TODO(robertm): augment/prune this as we gain a better understanding of llc |
20 # http://code.google.com/p/nativeclient/issues/detail?id=842 | 19 # http://code.google.com/p/nativeclient/issues/detail?id=842 |
(...skipping 15 matching lines...) Expand all Loading... |
36 floatundidf.c floatundisf.c floatundixf.c \ | 35 floatundidf.c floatundisf.c floatundixf.c \ |
37 floatunsidf.c floatunsisf.c \ | 36 floatunsidf.c floatunsisf.c \ |
38 floatuntidf.c floatuntisf.c floatuntixf.c \ | 37 floatuntidf.c floatuntisf.c floatuntixf.c \ |
39 moddi3.c modsi3.c modti3.c \ | 38 moddi3.c modsi3.c modti3.c \ |
40 powisf2.c powidf2.c \ | 39 powisf2.c powidf2.c \ |
41 udivdi3.c udivsi3.c udivti3.c \ | 40 udivdi3.c udivsi3.c udivti3.c \ |
42 udivmoddi4.c udivmodsi4.c udivmodti4.c \ | 41 udivmoddi4.c udivmodsi4.c udivmodti4.c \ |
43 umoddi3.c umodsi3.c umodti3.c | 42 umoddi3.c umodsi3.c umodti3.c |
44 | 43 |
45 # NOTE: we build pic so we can use this for both pic and non-pic nexes | 44 # NOTE: we build pic so we can use this for both pic and non-pic nexes |
46 EXTRA_FLAGS= -arch ${ARCH} -I${SRC_DIR} --pnacl-allow-translate -O3 -fPIC | 45 EXTRA_FLAGS= -I${SRC_DIR} |
47 EXTRA_DEFINES= -D_YUGA_LITTLE_ENDIAN=1 -D_YUGA_BIG_ENDIAN=0 | 46 EXTRA_DEFINES= -D_YUGA_LITTLE_ENDIAN=1 -D_YUGA_BIG_ENDIAN=0 |
48 | 47 |
49 # overwrite default rule to make sure nothig unexpected happens | 48 # overwrite default rule to make sure nothig unexpected happens |
50 %.o : %.c | 49 %.o : %.c |
51 $(CC) -c $(CFLAGS) ${EXTRA_DEFINES} ${EXTRA_FLAGS} $< -o $@ | 50 $(CC) -c $(CFLAGS) ${EXTRA_DEFINES} ${EXTRA_FLAGS} $< -o $@ |
52 | 51 |
53 # The main target of this Makefile | 52 # The main target of this Makefile |
54 libgcc.a: $(SRCS:.c=.o) | 53 libgcc.a: $(SRCS:.c=.o) |
55 $(AR) rc $@ $^ | 54 $(AR) rc $@ $^ |
OLD | NEW |