script de compilação automatica do gcc 4.6.3 para ubuntu e debian de 32 bits

Iniciado por 4d4c47, 13 de Agosto de 2012, 01:41

tópico anterior - próximo tópico

4d4c47

script baixa todas as dependencias e compiladores tudo automaticamente para sistemas de 32 bits:

http://sourceforge.net/projects/scriptkernel/files/


#!/bin/bash
#
# Script de compilação automatica do GCC,
# baixa e instala todas as dependencias e compiladores automaticamente  
#
# GPL-3.0
#
##################################################################################

###########################################
### escolha aqui a versão do GCC a ser compilada ##################
vs=4.6.3
###################

gmpvs=4.3.2
mpfrvs=2.4.2
mpcvs=0.8.1

###################

sudo mkdir /home/gcc-$vs

cd /home/gcc-$vs

#
###########
wget -c http://gcc-uk.internet.bs/infrastructure/gmp-$gmpvs.tar.bz2
tar -jxpvf gmp-$gmpvs.tar.bz2
cd /home/gcc-$vs/gmp-$gmpvs
sudo ./configure
sudo make -j2
sudo make -j2 install
#
cd /home/gcc-$vs

#
wget -c http://gcc-uk.internet.bs/infrastructure/mpfr-$mpfrvs.tar.bz2
tar -jxpvf mpfr-$mpfrvs.tar.bz2
cd /home/gcc-$vs/mpfr-$mpfrvs
sudo ./configure
sudo make -j2
sudo make -j2 install
#
cd /home/gcc-$vs

wget -c http://gcc-uk.internet.bs/infrastructure/mpc-$mpcvs.tar.gz
tar -zxpvf mpc-$mpcvs.tar.gz
cd /home/gcc-$vs/mpc-$mpcvs
sudo ./configure
sudo make -j2
sudo make -j2 install
#

###########

cd /home/gcc-$vs
#


wget -c http://gcc.petsads.us/releases/gcc-$vs/gcc-$vs.tar.bz2
wget -c http://gcc.petsads.us/releases/gcc-$vs/gcc-ada-$vs.tar.bz2
wget -c http://gcc.petsads.us/releases/gcc-$vs/gcc-core-$vs.tar.bz2
wget -c http://gcc.petsads.us/releases/gcc-$vs/gcc-fortran-$vs.tar.bz2
wget -c http://gcc.petsads.us/releases/gcc-$vs/gcc-g++-$vs.tar.bz2
wget -c http://gcc.petsads.us/releases/gcc-$vs/gcc-go-$vs.tar.bz2
wget -c http://gcc.petsads.us/releases/gcc-$vs/gcc-java-$vs.tar.bz2
wget -c http://gcc.petsads.us/releases/gcc-$vs/gcc-objc-$vs.tar.bz2

tar -jxpvf gcc-$vs.tar.bz2
tar -jxpvf gcc-ada-$vs.tar.bz2
tar -jxpvf gcc-core-$vs.tar.bz2
tar -jxpvf gcc-fortran-$vs.tar.bz2
tar -jxpvf gcc-g++-$vs.tar.bz2
tar -jxpvf gcc-go-$vs.tar.bz2
tar -jxpvf gcc-java-$vs.tar.bz2
tar -jxpvf gcc-objc-$vs.tar.bz2

sudo apt-get build-dep gcc-4.4 g++-4.4 gcj-4.4 -y
sudo apt-get install gmpc mpc fixincludes -y



#
cd /home/gcc-$vs/gcc-$vs
#

#
sudo CHOST="i486-pc-linux-gnu"
sudo export CHOST

sudo ./configure --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-plugin --enable-objc-gc --disable-werror  --with-gmp-include=/home/gcc-$vs/gmp-$gmpvs/gmp --with-gmp-lib=/home/gcc-$vs/gmp-$gmpvs/.libs --with-mpfr-include=/home/gcc-$vs/mpfr-$mpfrvs/mpfr --with-mpfr-lib=/home/gcc-$vs/mpfr-$mpfrvs/.libs


sudo make -j2
sudo make -j2 install

echo 'processo terminado com exito'



; )...

galactus

BigLinux no Notebook  / Várias Distros Virtualizadas no PC.

4d4c47

Citação de: galactus online 13 de Agosto de 2012, 05:38
E parao 64bits? Não vai ter?  :D

fala grande Galactus, beleza bicho ?

aqui vai uma modificação para os SO de 64 bits :


#!/bin/bash
#
# Script de compilação automatica do GCC,
# baixa e instala todas as dependencias e compiladores automaticamente 
#
# GPL-3.0
#
##################################################################################

###########################################
### escolha aqui a versão do GCC a ser compilada ##################
vs=4.6.3
###################

gmpvs=4.3.2
mpfrvs=2.4.2
mpcvs=0.8.1

###################

sudo mkdir /home/gcc-$vs

cd /home/gcc-$vs

#
###########
wget -c http://gcc-uk.internet.bs/infrastructure/gmp-$gmpvs.tar.bz2
tar -jxpvf gmp-$gmpvs.tar.bz2
cd /home/gcc-$vs/gmp-$gmpvs
sudo ./configure
sudo make -j2
sudo make -j2 install
#
cd /home/gcc-$vs

#
wget -c http://gcc-uk.internet.bs/infrastructure/mpfr-$mpfrvs.tar.bz2
tar -jxpvf mpfr-$mpfrvs.tar.bz2
cd /home/gcc-$vs/mpfr-$mpfrvs
sudo ./configure
sudo make -j2
sudo make -j2 install
#
cd /home/gcc-$vs

wget -c http://gcc-uk.internet.bs/infrastructure/mpc-$mpcvs.tar.gz
tar -zxpvf mpc-$mpcvs.tar.gz
cd /home/gcc-$vs/mpc-$mpcvs
sudo ./configure
sudo make -j2
sudo make -j2 install
#

###########

cd /home/gcc-$vs
#


wget -c http://gcc.petsads.us/releases/gcc-$vs/gcc-$vs.tar.bz2
wget -c http://gcc.petsads.us/releases/gcc-$vs/gcc-ada-$vs.tar.bz2
wget -c http://gcc.petsads.us/releases/gcc-$vs/gcc-core-$vs.tar.bz2
wget -c http://gcc.petsads.us/releases/gcc-$vs/gcc-fortran-$vs.tar.bz2
wget -c http://gcc.petsads.us/releases/gcc-$vs/gcc-g++-$vs.tar.bz2
wget -c http://gcc.petsads.us/releases/gcc-$vs/gcc-go-$vs.tar.bz2
wget -c http://gcc.petsads.us/releases/gcc-$vs/gcc-java-$vs.tar.bz2
wget -c http://gcc.petsads.us/releases/gcc-$vs/gcc-objc-$vs.tar.bz2

tar -jxpvf gcc-$vs.tar.bz2
tar -jxpvf gcc-ada-$vs.tar.bz2
tar -jxpvf gcc-core-$vs.tar.bz2
tar -jxpvf gcc-fortran-$vs.tar.bz2
tar -jxpvf gcc-g++-$vs.tar.bz2
tar -jxpvf gcc-go-$vs.tar.bz2
tar -jxpvf gcc-java-$vs.tar.bz2
tar -jxpvf gcc-objc-$vs.tar.bz2

sudo apt-get build-dep gcc-4.4 g++-4.4 gcj-4.4 -y
sudo apt-get install gmpc mpc fixincludes -y



#
cd /home/gcc-$vs/gcc-$vs
#

#
#sudo CHOST="i486-pc-linux-gnu"

sudo CHOST="x86_64-pc-linux-gnu"
sudo export CHOST

sudo ./configure --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-plugin --enable-objc-gc --disable-werror  --with-gmp-include=/home/gcc-$vs/gmp-$gmpvs/gmp --with-gmp-lib=/home/gcc-$vs/gmp-$gmpvs/.libs --with-mpfr-include=/home/gcc-$vs/mpfr-$mpfrvs/mpfr --with-mpfr-lib=/home/gcc-$vs/mpfr-$mpfrvs/.libs


sudo make -j2
sudo make -j2 install

echo 'processo terminado com exito'


ainda não fiz os testes não, mas acredito que deve funcionar normalmente, o que eu fiz foi só tracar essa linha aqui:

sudo CHOST="i486-pc-linux-gnu"

por essa:

sudo CHOST="x86_64-pc-linux-gnu"


valeu.


mariojuniorjp

No caso, o que esse arquivo faz na verdade, além de baixar as dependencias, arquivos e etc, é informar ao GCC pra qual processador será compilado o software, kernel e etc, quando a pessoa for compilar alguma coisa que utilize o GCC?