on master help sign in
Merge pull request #635 from hannesm/cleanups

* Use cc as C compiler, instead of hardcoding gcc.

commit88561876299ec573feb9d4271d87e0793eff1659 authorEdwin Brady <edwin.brady@gmail.com> dateTue 19 Nov 2013, 08:53 (13 years ago) parenta38ac1ad6b1930
3 files changed+7−9
config.mk+1−1 rts/Makefile+1−3 rts/idris_opts.c+5−5
config.mk+1−1
@@ -1,4 +1,4 @@
1−CC :=gcc
1+CC :=cc
22CABAL :=cabal
33CFLAGS :=-O2 -Wall $(CFLAGS)
44#CABALFLAGS :=
rts/Makefile+1−3
@@ -5,9 +5,7 @@ OBJS = idris_rts.o idris_heap.o idris_gc.o idris_gmp.o idris_stdfgn.o \
55HDRS = idris_rts.h idris_heap.h idris_gc.h idris_gmp.h idris_stdfgn.h \
66 idris_bitstring.h idris_opts.h idris_stats.h
77CFLAGS:=-fPIC $(CFLAGS)
8−ifneq ($(GMP_INCLUDE_DIR),)
9− CFLAGS += -isystem $(GMP_INCLUDE_DIR)
10−endif
8+CFLAGS += $(GMP_INCLUDE_DIR)
119
1210LIBTARGET = libidris_rts.a
1311
rts/idris_opts.c+5−5
@@ -6,7 +6,7 @@
66#include <string.h>
77
88
9−char usage[] =
9+const char usage[] =
1010 "\n" \
1111 "Usage: <prog> [+RTS <rtsopts> -RTS] <args>\n\n" \
1212 "Options:\n\n" \
@@ -26,7 +26,7 @@ int read_size(char * str) {
2626
2727 int r = sscanf(str, "%u%c", &size, &mult);
2828
29− if (r == 1)
29+ if (r == 1)
3030 return size;
3131
3232 if (r == 2) {
@@ -34,8 +34,8 @@ int read_size(char * str) {
3434 case 'K': size = size << 10; break;
3535 case 'M': size = size << 20; break;
3636 case 'G': size = size << 30; break;
37− default:
38− fprintf(stderr,
37+ default:
38+ fprintf(stderr,
3939 "RTS Opts: Unable to recognize size suffix `%c'.\n" \
4040 " Possible suffixes are K or M or G.\n",
4141 mult);
@@ -58,7 +58,7 @@ int parse_args(RTSOpts * opts, int argc, char *argv[])
5858
5959 if (strcmp(argv[0], "+RTS") != 0)
6060 return 0;
61−
61+
6262 int i;
6363 for (i = 1; i < argc; i++) {
6464 if (strcmp(argv[i], "-RTS") == 0) {