Skip to content

Instantly share code, notes, and snippets.

@errzey
Created September 12, 2014 23:22
Show Gist options
  • Save errzey/766bfc421d760861b0b0 to your computer and use it in GitHub Desktop.
Save errzey/766bfc421d760861b0b0 to your computer and use it in GitHub Desktop.
build better gcc on CentOSucks
cmake_minimum_required(VERSION 2.4)
add_custom_target(do_always ALL COMMAND yum -y install cmake git gcc gcc-c++ openssl-devel libtool autoconf flex bison zip)
include (ExternalProject)
ExternalProject_add(gmp
URL http://packages.strcpy.net/gmp-5.1.3.tar.bz2
UPDATE_COMMAND ""
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ./configure --enable-cxx
BUILD_COMMAND make install
)
ExternalProject_add(mpfr
DEPENDS gmp
URL http://packages.strcpy.net/mpfr-3.1.2.tar.bz2
UPDATE_COMMAND ""
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ./configure --with-gmp=/usr/local
BUILD_COMMAND make install
)
ExternalProject_add(mpc
DEPENDS gmp
DEPENDS mpfr
URL http://packages.strcpy.net/mpc-1.0.2.tar.gz
UPDATE_COMMAND ""
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ./configure --with-gmp=/usr/local --with-mpfr=/usr/local
BUILD_COMMAND make install
)
ExternalProject_add(gcc
DEPENDS gmp
DEPENDS mpfr
DEPENDS mpc
URL http://packages.strcpy.net/gcc-4.8.2.tar.bz2
UPDATE_COMMAND ""
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ./configure --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --prefix=/usr/local --disable-werror --disable-multilib
BUILD_COMMAND make
INSTALL_COMMAND make install
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment