diff --git a/CMakeLists.txt b/CMakeLists.txt index ae0621e..85c9ba0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,7 +39,7 @@ if ($ENV{TRAVIS}) endif() lil_find_program(tar) -lil_find_program(docker) +## broken lil_find_program(docker) string(REPLACE "/" "-" file_tag ${LIL_TAG}) @@ -72,8 +72,9 @@ lil_retrieve_fork(gcc) ################################################################################ ExternalProject_Add_Step(gcc-download build-in-docker COMMAND - ${LIL_DOCKER} + docker run + -it --rm -v ${work_dir}:/work -v ${out_dir}:/opt/lilinjn/gcc-holy-build @@ -82,7 +83,7 @@ ExternalProject_Add_Step(gcc-download build-in-docker /work/build-in-docker.sh $ENV{TRAVIS} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMENT "Build binutils and gcc inside docker" + COMMENT "Build gcc inside docker" DEPENDEES install ) @@ -90,8 +91,9 @@ ExternalProject_Add_Step(gcc-download build-in-docker ################################################################################ ExternalProject_Add_Step(gcc-download gcc-postfix COMMAND - ${LIL_DOCKER} + docker run + -it --rm -v ${work_dir}:/work -v ${out_dir}:/opt/lilinjn/gcc-holy-build diff --git a/README.md b/README.md index 11a40c8..bb4832c 100644 --- a/README.md +++ b/README.md @@ -8,12 +8,19 @@ This repo provides a (reasonably) portable, relocatable `x86_64-pc-linux-gnu` `g ## Compatability Will run on most `glibc` `x86_64` linux distros since 2007 cf. [Holy Build Box](https://github.com/phusion/holy-build-box#which-linux-distributions-do-binaries-compiled-with-holy-build-box-support) -The [release](https://github.com/habemus-papadum/gcc-holy-build/releases) [tarball](https://github.com/habemus-papadum/gcc-holy-build/releases/download/v0.1.1/gcc-holy-build-habemus-papadum-v1-branch.tar.gz) can be extracted in any convenient location. +The [release](https://github.com/habemus-papadum/gcc-holy-build/releases) [tarball](https://github.com/habemus-papadum/gcc-holy-build/releases/download/v0.1.0/gcc-holy-build-habemus-papadum-holy-build-0.1.0.tar.gz) can be extracted in any convenient location. + +## Building +If you do not want to use the tarball above, it can be recreated by +* installing docker / verifying that the `docker` command line tool works +* cloning this repo +* running `cmake` -- downloads gcc fork & runs docker with various local dirs correctly mounted +* tarball will be in the build directory in about hour ## Motivation -My preferred toolchain is a custom built [clang](). This repo provides a known valid bootstrap compiler for this toolchain. Having pre-made binaries reduces build times, also simplifying travis time limit issues. +My preferred toolchain is a custom built [clang](https://github.com/habemus-papadum/clang). This repo provides a known valid bootstrap compiler for this toolchain. Having pre-made binaries reduces build times, also simplifying travis time limit issues. -N.B.: This gcc is probably not useful for building most types of software. At the very least such software should have some way to find the compiler's shared libs (e.g. `libstdc++.so` and `libgcc_s.so`), perhaps by building it with `rpath`'s or running it w/ `LD_LIBRARY_PATH`, both of which are completely tedious. However, in building my clang toolchain, the first step is to build a transient clang (with this gcc and which has `rpath`'s to the correct libs), and then the transient clang is used to build one or more "proper" clangs. (N.B.: this example is a little contrived. Using `--static-libgcc` and `--static-libstdc++` would also have been helpful. But really, this gcc is best used for building transient software, and, in general, this probably means other bootstrap c/c++ compilers.) +N.B.: This gcc is probably not useful for building most types of software. At the very least such software should have some way to find the compiler's shared libs (e.g. `libstdc++.so` and `libgcc_s.so`), perhaps by building it with `rpath`'s or running it w/ `LD_LIBRARY_PATH`, both of which are completely tedious. However, in building my clang toolchain, the first step is to build a transient clang (with this gcc and which has `rpath`'s to the correct libs), and then the transient clang is used to build one or more "proper" clangs. (N.B.: this example is a little contrived. Using `--static-libgcc` and `--static-libstdc++` would also have been helpful. But really, this gcc is best used for building transient software, and, in general, this probably means bootstrapping other c/c++ compilers.) Among other things, this allows for creating sysroots that are `libgcc*` free, and can be used to create pure clang based distros (which I am not interested, but you might be...).