Skip to content

Instantly share code, notes, and snippets.

View yunfan's full-sized avatar

yunfan yunfan

View GitHub Profile
@tangentstorm
tangentstorm / something4thy.js
Created August 2, 2013 04:22
something 4thy this way comes...
var b4 = (new function() { var EOF='\0',self = {
d:[], a:[], // data and auxiliary/return stack
defs:[],core:[],scope:[], // dictionary
base:10, // numbers
cp:-1, ch:'\x01',ibuf:[],wd:'', // lexer state
compiling:false,state:[],target:[], // compiler state
def : function (k,v){
var res=self.defs.length; self.defs.push(v); self.scope[0].push([k,res]); return res },
mkdir ~/toolchain
cd ~/toolchain
wget http://distfiles.gentoo.org/releases/arm/autobuilds/current-stage3-armv7a_hardfp/stage3-armv7a_hardfp-20130209.tar.bz2
export C_INCLUDE_PATH=~/toolchain/usr/include
export LD_LIBRARY_PATH=~/toolchain/usr/lib:~/toolchain/usr/lib/binutils/armv7a-hardfloat-linux-gnueabi/2.22
export PATH=$PATH:~/toolchain/usr/armv7a-hardfloat-linux-gnueabi/gcc-bin/4.6.3:~/toolchain/usr/armv7a-hardfloat-linux-gnueabi/binutils-bin/2.22
sed -i 's/\/usr/\/home\/chronos\/user\/toolchain\/usr/g' ~/toolchain/usr/lib/libc.so
sed -i 's/\/usr/\/home\/chronos\/user\/toolchain\/usr/g' ~/toolchain/usr/lib/libpthread.so