-
-
Save notmatt/7283504 to your computer and use it in GitHub Desktop.
Revisions
-
notmatt revised this gist
Dec 14, 2013 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,11 @@ # # Results in an OSX->SmartOS cross-compiler installed at $PREFIX/bin # 32/64 bit. Ensure smartos host zone has similar pkgsrc. export TARGET=i386-sun-solaris2.11 # export TARGET=x86_64-sun-solaris2.11 export PREFIX=$HOME/code/gcc/cross/$TARGET export SYSROOT=$PREFIX/sysroot export PATH=$PATH:$PREFIX/bin -
notmatt revised this gist
Nov 3, 2013 . 2 changed files with 60 additions and 43 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,60 @@ #!/bin/bash # Derived from: https://gist.github.com/AlainODea/6679613 # # Prerequisites (in the loose sense of "worked for me"): # brew install binutils # brew install gcc47 # # SMARTOS_HOST - a smartos host with ssh access as a source for the target # system libraries. I was using a JPC 'manta-build' image, which has numerous # pre-installed packages. Adjustments may be necessary if using stock smartos. # # Results in an OSX->SmartOS cross-compiler installed at $PREFIX/bin export TARGET=x86_64-sun-solaris2.11 export PREFIX=$HOME/code/gcc/cross/$TARGET export SYSROOT=$PREFIX/sysroot export PATH=$PATH:$PREFIX/bin export SCRATCH=$HOME/code/gcc/scratch export SMARTOS_HOST=walter # ensure matches brew versions above. export BINUTILS=binutils-2.23.2 export GCC=gcc-4.7.3 mkdir $PREFIX mkdir $SYSROOT pushd $SYSROOT/ # It's likely that not everything below is strictly necessary. ssh $SMARTOS_HOST "pkgin -y up && pkgin -y ug && pkgin -y in gmp" ssh $SMARTOS_HOST "tar -cf - /usr/include" | tar -xvf - ssh $SMARTOS_HOST "tar -cf - /opt/local/include" | tar -xvf - ssh $SMARTOS_HOST "tar -cf - /opt/local/gcc47/include" | tar -xvf - ssh $SMARTOS_HOST "tar -cf - /lib" | tar -xvf - ssh $SMARTOS_HOST "tar -cf - /usr/lib" | tar -xvf - ssh $SMARTOS_HOST "tar -cf - /usr/gnu/lib" | tar -xvf - mkdir $SCRATCH pushd $SCRATCH/ wget http://ftp.gnu.org/gnu/binutils/$BINUTILS.tar.gz tar -xvzf $BINUTILS.tar.gz mkdir $SCRATCH/build-binutils pushd $SCRATCH/build-binutils/ ../$BINUTILS/configure -target=$TARGET --prefix=$PREFIX --with-sysroot=$SYSROOT -v make all && make install popd wget http://ftp.gnu.org/gnu/gcc/$GCC/$GCC.tar.gz tar -xvzf $GCC.tar.gz mkdir $SCRATCH/build-gcc pushd $SCRATCH/build-gcc/ ../$GCC/configure --target=$TARGET --with-gnu-as --with-gnu-ld --with-gmp \ --with-mpfr --with-mpc --prefix=$PREFIX --with-sysroot=$SYSROOT \ --disable-libgcj --disable-libssp --disable-libada \ --disable-libgomp --enable-languages=c,c++ -v make all && make install popd This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,43 +0,0 @@ -
AlainODea revised this gist
Sep 26, 2013 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,6 +13,7 @@ sudo apt-get install texinfo binutils build-essential libgmp-dev libmpfr-dev lib mkdir $PREFIX mkdir $SYSROOT pushd $SYSROOT/ ssh root@ns2 "pkgin -y up && pkgin -y ug && pkgin -y in gmp" ssh root@ns2 "tar -cf - /usr/include" | tar -xvf - ssh root@ns2 "tar -cf - /opt/local/include" | tar -xvf - ssh root@ns2 "tar -cf - /opt/local/gcc47/include" | tar -xvf - -
AlainODea revised this gist
Sep 24, 2013 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ #include<stdio.h> main() { printf("Hello World"); } -
AlainODea renamed this gist
Sep 24, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
AlainODea created this gist
Sep 24, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,42 @@ #!/bin/bash export TARGET=x86_64-sun-solaris2.11 export PREFIX=$HOME/Documents/gcc/cross/$TARGET export SYSROOT=$PREFIX/sysroot export PATH=$PATH:$PREFIX/bin export SCRATCH=$HOME/Documents/gcc/scratch export BINUTILS=binutils-2.23.2 export GCC=gcc-4.7.3 sudo apt-get install texinfo binutils build-essential libgmp-dev libmpfr-dev libmpc-dev mkdir $PREFIX mkdir $SYSROOT pushd $SYSROOT/ ssh root@ns2 "tar -cf - /usr/include" | tar -xvf - ssh root@ns2 "tar -cf - /opt/local/include" | tar -xvf - ssh root@ns2 "tar -cf - /opt/local/gcc47/include" | tar -xvf - ssh root@ns2 "tar -cf - /lib" | tar -xvf - ssh root@ns2 "tar -cf - /usr/lib" | tar -xvf - ssh root@ns2 "tar -cf - /usr/gnu/lib" | tar -xvf - mkdir $SCRATCH pushd $SCRATCH/ wget http://ftp.gnu.org/gnu/binutils/$BINUTILS.tar.gz tar -xvzf $BINUTILS.tar.gz mkdir $SCRATCH/build-binutils pushd $SCRATCH/build-binutils/ ../$BINUTILS/configure -target=$TARGET --prefix=$PREFIX --with-sysroot=$SYSROOT -v make all && make install popd wget http://ftp.gnu.org/gnu/gcc/$GCC/$GCC.tar.gz tar -xvzf $GCC.tar.gz mkdir $SCRATCH/build-gcc pushd $SCRATCH/build-gcc/ ../$GCC/configure --target=$TARGET --with-gnu-as --with-gnu-ld --with-gmp \ --with-mpfr --with-mpc --prefix=$PREFIX --with-sysroot=$SYSROOT \ --disable-libgcj --enable-languages=c,c++ -v make all && make install popd