Added install hook:

/opt/gjit/bin/gcc -g -O2 -Wall t.c -o test -I/opt/gjit/include
-lgccjit -L/opt/gjit/lib

Compiles the helloworld examples correctly and it runs instead of
pointing to my gcc build dir. Am working on getting more involved with
this and started:

https://github.com/redbrain/spy

Its only just starting to parse stuff but a kind of C/Python kind of
language using gcc as a JIT might be interesting kind of dynamic
language for C that can call C libs safely and easily is the idea.
Mostly just so i can see where to help out in the jit front-end.

Was also considering some kind of libopcodes work to assemble the code
in memory instead of creating a .so in /tmp. Not sure if i know what i
am doing enough there but it might be more elegant for stuff using
this front-end.

Am so impressed how well this works.

Thanks David.
From c0c1c3d55ad707ef5c62199791acabd1ceea6858 Mon Sep 17 00:00:00 2001
From: Philip <redbr...@gcc.gnu.org>
Date: Tue, 11 Feb 2014 16:46:15 +0000
Subject: [PATCH] Add install hook

---
 gcc/jit/Make-lang.in | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gcc/jit/Make-lang.in b/gcc/jit/Make-lang.in
index 17d27ca..0a468da 100644
--- a/gcc/jit/Make-lang.in
+++ b/gcc/jit/Make-lang.in
@@ -85,7 +85,9 @@ jit.srcman:
 
 #
 # Install hooks:
-jit.install-common:
+jit.install-common: installdirs
+	$(INSTALL_PROGRAM) libgccjit.so $(DESTDIR)/$(libdir)/libgccjit.so
+	$(INSTALL_PROGRAM) $(srcdir)/jit/libgccjit.h $(DESTDIR)/$(includedir)/libgccjit.h
 
 jit.install-man:
 
-- 
1.8.3.2

Reply via email to