Overview
Comment: | add makerule, add include mode to typesize |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
8b84a67d855a331c86c228b222bbc1e2 |
User & Date: | lexi on 2019-08-19 02:04:22 |
Other Links: | manifest | tags |
Context
2019-08-19
| ||
02:13 | add missing script check-in: a6aed292a5 user: lexi tags: trunk | |
02:04 | add makerule, add include mode to typesize check-in: 8b84a67d85 user: lexi tags: trunk | |
01:46 | updates, begin putting together error-handling mechanism check-in: b5f6f19923 user: lexi tags: trunk | |
Changes
Modified arch/typesize.c from [e15b370325] to [750b65151f].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
#include <stdio.h> #include <limits.h> #include <stddef.h> #define sflag(flag,val) printf("-D"#flag"=\"%s\" ", val) #define mflag(flag,val) printf("-D"#flag"=-%llu ", val + 1) #define iflag(flag,val) printf("-D"#flag"=%llu ", val) #define fflag(flag,val) printf("-D"#flag"=%Lf ", val) #define type_found(val) (found_type & (val / 8)) #define checkbits(type,x) \ if(!type_found(x) && sizeof(type) == (x/CHAR_BIT)) \ sflag(type_bit##x, #type), found_type |= (x / 8) #define describe_integral(type,label) { \ unsigned type maxval = -1; \ |
> | | | | > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
#include <stdio.h> #include <limits.h> #include <stddef.h> #ifndef _emit_m4_include # define sflag(flag,val) printf("-D"#flag"=\"%s\" ", val) # define mflag(flag,val) printf("-D"#flag"=-%llu ", val + 1) # define iflag(flag,val) printf("-D"#flag"=%llu ", val) # define fflag(flag,val) printf("-D"#flag"=%Lf ", val) #else # define sflag(flag,val) printf("define(`"#flag"',`%s')dnl\n", val) # define mflag(flag,val) printf("define(`"#flag"',`%llu')dnl\n", val + 1) # define iflag(flag,val) printf("define(`"#flag"',`%llu')dnl\n", val) # define fflag(flag,val) printf("define(`"#flag"',`%Lf')dnl\n", val) #endif #define type_found(val) (found_type & (val / 8)) #define checkbits(type,x) \ if(!type_found(x) && sizeof(type) == (x/CHAR_BIT)) \ sflag(type_bit##x, #type), found_type |= (x / 8) #define describe_integral(type,label) { \ unsigned type maxval = -1; \ |
Added makerule version [9a8f61d2ca].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
#- makerule # this file contains definitions shared between modmake and # the top-leve makefile # vim: ft=make ARCH ?= ${ARCH} BITS ?= ${BITS} OS ?= ${OS} POSIX ?= ${POSIX} UNIX ?= ${UNIX} ROOT ?= ${ROOT} TMP ?= ${TMP} OUT ?= ${OUT} m4 ?= ${m4} cflags = -std=c11 -isystem $(OUT) -isystem $(TMP) -isystem $(ROOT)/arch -fPIC -nostdlib $(COMPLIB) -L$(OUT) m-env = atom_target_arch=$(ARCH) m-env += atom_target_os=$(OS) ifneq ($(BITS),) #!!! ifdef does NOT work with environment variables m-env += atom_target_bits=$(BITS) endif m-env += target_posix=$(POSIX) m-env += target_unix=$(UNIX) m-comp = $(m4) $(m-env:%=-D%) |