about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorserpilliere <serpilliere@users.noreply.github.com>2015-01-20 15:28:04 +0100
committerserpilliere <serpilliere@users.noreply.github.com>2015-01-20 15:28:04 +0100
commitb0c61602412918799487db47582dba6cd4b3675b (patch)
tree615a9e0325edb9b28ca0af0d41b357dfc6d7f4df
parent798ae526f4a1862ce189f073cbd2bbe27c813ed5 (diff)
parent5d5cfdef6bbf71ca38b8fbeeb78ba57731a66a75 (diff)
downloadmiasm-b0c61602412918799487db47582dba6cd4b3675b.tar.gz
miasm-b0c61602412918799487db47582dba6cd4b3675b.zip
Merge pull request #39 from commial/refactor-tinycc-install
 TCC install: use --disable-static instead of sed//-fPIC/ (see #36)
-rw-r--r--README.md37
-rw-r--r--miasm2/jitter/Jittcc.c2
2 files changed, 10 insertions, 29 deletions
diff --git a/README.md b/README.md
index 2a097305..e50ff3ba 100644
--- a/README.md
+++ b/README.md
@@ -456,34 +456,15 @@ sudo python setup.py install
 ```
 
 * To use the jitter, TCC or LLVM is recommended
-* LibTCC needs a little fix in the `Makefile`:
-  * remove libtcc-dev from the system to avoid conflicts
-  * clone [tinycc release_0_9_26](http://repo.or.cz/w/tinycc.git/snapshot/d5e22108a0dc48899e44a158f91d5b3215eb7fe6.tar.gz)
-  * edit the `Makefile`
-  * add option `-fPIC` to the `CFLAGS` definition: `CFLAGS+= -fPIC`
-
-```
-#
-# Tiny C Compiler Makefile
-#
-
-TOP ?= .
-include $(TOP)/config.mak
-VPATH = $(top_srcdir)
-
-CPPFLAGS = -I$(TOP) # for config.h
-
-# ADD NEXT LINE:
-CFLAGS+= -fPIC
-...
-```
-
-  * `./configure && make && make install`
-  * LLVM
-    * Debian (testing/unstable): install python-llvm
-    * Debian stable/Ubuntu/Kali/whatever: install from [llvmpy](http://www.llvmpy.org/)
-    * Windows: python-llvm is not supported :/
-  * Build and install Miasm:
+* LibTCC needs to be configured with the `--disable-static` option
+  * remove `libtcc-dev` from the system to avoid conflicts
+  * clone [TinyCC](http://repo.or.cz/tinycc.git)
+  * `./configure --disable-static && make && make install`
+* LLVM
+  * Debian (testing/unstable): install python-llvm
+  * Debian stable/Ubuntu/Kali/whatever: install from [llvmpy](http://www.llvmpy.org/)
+  * Windows: python-llvm is not supported :/
+* Build and install Miasm:
 ```
 $ cd miasm_directory
 $ python setup.py build
diff --git a/miasm2/jitter/Jittcc.c b/miasm2/jitter/Jittcc.c
index 476b2048..a1310477 100644
--- a/miasm2/jitter/Jittcc.c
+++ b/miasm2/jitter/Jittcc.c
@@ -168,7 +168,7 @@ PyObject* tcc_compil(PyObject* self, PyObject* args)
 		fprintf(stderr, "%s\n", func_code);
 		exit(1);
 	}
-	/* XXX use tinycc devel with -fPIC patch in makefile */
+	/* XXX configure tinycc install with --disable-static */
 	if (tcc_relocate(tcc_state, TCC_RELOCATE_AUTO) < 0) {
 		fprintf(stderr, "tcc relocate error\n");
 		exit(1);