Claim to generate ANSI C code
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 10 Nov 2016 22:19:43 +0000 (17:19 -0500)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 10 Nov 2016 22:27:53 +0000 (17:27 -0500)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
README.md
doc/examples/barectf-tracepoint/Makefile.barectf-linux-fs
doc/examples/barectf-tracepoint/Makefile.barectf-qemu-arm-uart
doc/examples/barectf-tracepoint/Makefile.lttng-ust
doc/examples/linux-fs-simple/Makefile
doc/examples/parallella/Makefile
setup.py

index 33391e51e89cc708f6524c586f434b14a70a7643..c0db8f42cba692bc31cf43f9e802466da0c42023 100644 (file)
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
 [![](https://img.shields.io/pypi/v/barectf.svg)](https://pypi.python.org/pypi/barectf)
 [![Jenkins](https://img.shields.io/jenkins/s/https/ci.lttng.org/barectf_master_build.svg)](https://ci.lttng.org/job/barectf_master_build)
 
-**barectf** is a command-line utility which generates C99
+**barectf** is a command-line utility which generates ANSI C
 code that is able to write native [Common Trace Format](http://diamon.org/ctf)
 (CTF) binary streams.
 
@@ -24,7 +24,8 @@ You will find barectf interesting if:
 
 The target audience of barectf is developers who need to trace bare metal
 systems (without an operating system). The code produced by barectf
-is pure C99 and can be lightweight enough to fit on a tiny microcontroller.
+is pure ANCI C (with one exception, see the current limitations below)
+and can be lightweight enough to fit on a tiny microcontroller.
 
 **Key features**:
 
@@ -55,15 +56,22 @@ As of this version:
     stream-specific context, need to be called from the same thread, and cannot
     be called from an interrupt handler, unless a user-provided
     synchronization mechanism is used.
-  * CTF compound types (array, sequence, structure, variant) are not supported
-    yet, except at some very specific locations in the metadata.
-  * The current generated C code is not strictly C99 compliant:
-    [statement expressions](https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html)
-    and the
-    [`typeof` keyword](https://gcc.gnu.org/onlinedocs/gcc/Typeof.html)
-    GCC extensions are used in the generated bitfield macros. The
-    generated C code is known to be compiled with no warnings using
-    both GCC and Clang.
+  * The generated C code needs the `stdint.h` header, which is new in
+    C99. If your standard C library does not have this header,
+    you can create one yourself and put it in one of your include
+    directories to define the following types according to your
+    architecture:
+    * `int8_t`
+    * `int16_t`
+    * `int32_t`
+    * `int64_t`
+    * `uint8_t`
+    * `uint16_t`
+    * `uint32_t`
+    * `uint64_t`
+  * CTF compound types (array, sequence, structure, variant) are not
+    supported yet, except at some very specific locations in the
+    metadata.
 
 barectf is written in Python 3.
 
index 99be68f8e80ca9e506f23d6bac23d70e0f4bffe1..04f95fbafab9d82c4c53c628d342dee9cefd094c 100644 (file)
@@ -26,7 +26,7 @@ MKDIR = mkdir -p
 
 PLATFORM_DIR = ../../../platforms/linux-fs
 EXTRA_DIR = ../../../extra
-CFLAGS = -O2 -Wall -pedantic -std=gnu99 -I$(PLATFORM_DIR) -I$(EXTRA_DIR) -I.
+CFLAGS = -O2 -Wall -pedantic -I$(PLATFORM_DIR) -I$(EXTRA_DIR) -I.
 
 VERSION = linux-fs
 TARGET = barectf-tracepoint-barectf-$(VERSION)
index e666e9eea76faed173a93b243693fce4377e84ec..c55e8d332befa04ecbce2575aa424d54c0a2ecce 100644 (file)
@@ -30,7 +30,7 @@ CC = $(ARCH)-gcc
 VERSION = qemu-arm-uart
 CPU=arm926ej-s
 EXTRA_DIR = ../../../extra
-CFLAGS = -DWITH_QEMU_ARM_UART=1 -ffunction-sections -mcpu=$(CPU) -O2 -Wall -pedantic -std=gnu99 -I$(EXTRA_DIR) -I.
+CFLAGS = -DWITH_QEMU_ARM_UART=1 -ffunction-sections -mcpu=$(CPU) -O2 -Wall -pedantic -I$(EXTRA_DIR) -I.
 LDFLAGS= -T barectf-platform-$(VERSION).ld -lc -lnosys
 
 TARGET = barectf-tracepoint-barectf-$(VERSION)
index 30630b5131554acdc626cf81d4f85d878f1195e1..2612afbf70d26746d39ee136e0ab9f58a272cdb2 100644 (file)
@@ -22,7 +22,7 @@
 
 RM = rm -rf
 
-CFLAGS := -O2 -Wall -pedantic -std=gnu99 $(CFLAGS)
+CFLAGS := -O2 -Wall -pedantic $(CFLAGS)
 LDFLAGS := -llttng-ust -ldl $(LDFLAGS)
 
 TARGET = barectf-tracepoint-lttng-ust
index 041a26b64ccfaf4068eb2f4c31921b3fde14b8d8..0eab932c1a1c290d7c1af8e76af128b13a798e33 100644 (file)
@@ -25,7 +25,7 @@ RM = rm -rf
 MKDIR = mkdir
 
 PLATFORM_DIR = ../../../platforms/linux-fs
-CFLAGS = -O2 -Wall -pedantic -std=gnu99 -I$(PLATFORM_DIR) -I.
+CFLAGS = -O2 -Wall -pedantic -I$(PLATFORM_DIR) -I.
 
 TARGET = linux-fs-simple
 OBJS = $(TARGET).o barectf.o barectf-platform-linux-fs.o
index 837e5e1608b33c8f240c3e722474a272bb9fa0ac..d360886afd17f0962b00b5e6bb3dde01707532f0 100644 (file)
@@ -32,7 +32,7 @@ OBJCOPY=$(CROSS_COMPILE)objcopy
 ESDK=$(EPIPHANY_HOME)
 ELDF=$(ESDK)/bsps/current/fast.ldf
 PLATFORM_DIR = ../../../platforms/parallella
-CFLAGS = -O2 -Wall -pedantic -std=c99 -I$(PLATFORM_DIR) -I.
+CFLAGS = -O2 -Wall -pedantic -I$(PLATFORM_DIR) -I.
 LDFLAGS = -T $(ELDF) -le-lib
 
 TARGET = parallella
index 494967edf7fd57ea4b97f71dad3803a46e92e40b..caaaf7cf4f52d61332c09cf9b106ad6bb83ac2b0 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -43,7 +43,7 @@ import barectf
 
 setup(name='barectf',
       version=barectf.__version__,
-      description='Generator of C99 code that can write native CTF',
+      description='Generator of ANSI C code that can write native CTF',
       author='Philippe Proulx',
       author_email='eeppeliteloop@gmail.com',
       license='MIT',
This page took 0.035378 seconds and 4 git commands to generate.