{"id":18076284,"url":"https://github.com/scivision/cmake-build-gcc","last_synced_at":"2025-04-05T19:43:05.097Z","repository":{"id":64583233,"uuid":"475073020","full_name":"scivision/cmake-build-gcc","owner":"scivision","description":"Build GCC and prereqs driven by CMake","archived":false,"fork":false,"pushed_at":"2024-09-03T15:48:36.000Z","size":105,"stargazers_count":14,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-11T17:59:48.742Z","etag":null,"topics":["gcc-compiler"],"latest_commit_sha":null,"homepage":"","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scivision.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-28T15:52:14.000Z","updated_at":"2024-09-03T15:48:56.000Z","dependencies_parsed_at":"2023-02-08T04:46:45.602Z","dependency_job_id":null,"html_url":"https://github.com/scivision/cmake-build-gcc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scivision%2Fcmake-build-gcc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scivision%2Fcmake-build-gcc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scivision%2Fcmake-build-gcc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scivision%2Fcmake-build-gcc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scivision","download_url":"https://codeload.github.com/scivision/cmake-build-gcc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247393538,"owners_count":20931809,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gcc-compiler"],"created_at":"2024-10-31T11:09:28.489Z","updated_at":"2025-04-05T19:43:05.049Z","avatar_url":"https://github.com/scivision.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CMake build GCC\n\nBuild [GCC](https://gcc.gnu.org/install/)\nnatively for C, C++, Fortran languages.\nBuilds prerequisite libraries GMP, MPFR, and MPC from CMake.\n\nPlatforms working include:\n\n* Linux (Intel / AMD CPU)\n\nNumerous platforms require specific patches that we don't currently implement.\nThe easiest way may be to clone their GCC fork as we do for Apple Silicon.\n\nThis CMake project can be more convenient than manually downloading and configuring each project.\nWe assume fundamental\n[prerequisites](https://gcc.gnu.org/install/prerequisites.html)\nsuch as libc, Autotools, Make, CMake are present.\nThe 3-stage\n[compiler bootstrap](https://en.wikipedia.org/wiki/Bootstrapping_(compilers))\nis enabled to help ensure a working, performant GCC.\n\n## Prerequsites\n\n* CentOS: `dnf install cmake make autoconf autoconf-archive libtool`\n* Ubuntu: `apt install cmake make autoconf autoconf-archive libtool`\n* macOS: `brew install cmake autoconf autoconf-archive libtool`\n\n## Options\n\nThese options may be changed by adding the CMake configure arguments:\n\nSet GCC version (Linux only, as macOS uses a GCC fork)\n: `-Dgcc_version=14.2.0`\n\ndisable ISL for Graphite optimizations\n: `-Disl=off`\n\ndisable C++\n: `-Dcpp=off`\n\ndisable Fortran\n: `-Dfortran=off`\n\ndisable Gcov coverage tool\n:`-Dgcov=off`\n\ndisable link time optimization\n: `-Dlto=off`\n\ndisable Zstd\n: `-Dzstd=off`\n\ndisable Zstd compression (fallback to Zlib)\n: `-Dzstd=off`\n\n## Build\n\nThis CMake project assumes the system already has Autotools, Make, and a new-enough C/C++ compiler.\nGCC will take 10s of minutes to build, even on a powerful workstation.\nThe following commands build GCC and install it to ~/gcc-devel.\nBy default, a recent release of GCC is built using source from the\n[GCC GitHub mirror](https://gcc.gnu.org/wiki/GitMirror).\n\n```sh\ncmake -Dprefix=$HOME/gcc-devel -P build.cmake\n```\n\nThis script sets environment variables during the build phase to avoid missing .so messages when building GCC.\n\nSpecify a URL say from [GCC snapshots](https://gcc.gnu.org/pub/gcc/snapshots/?C=M;O=D) like:\n\n```sh\n cmake -Durl=https://gcc.gnu.org/pub/gcc/snapshots/LATEST-15/gcc-15-20240526.tar.xz -P build.cmake\n ```\n\nmacOS Apple Silicon may need the\n[GCC gcc-darwin-arm64 fork](https://github.com/iains/gcc-darwin-arm64/):\n\n```sh\ncmake -Durl=https://github.com/iains/gcc-darwin-arm64/archive/refs/heads/master-wip-apple-si.zip -P build.cmake\n```\n\n## Usage\n\nSource a script like [gcc-dev.sh](./gcc-dev.sh) to use this GCC.\n\n\n[Troubleshooting](./troubleshooting.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscivision%2Fcmake-build-gcc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscivision%2Fcmake-build-gcc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscivision%2Fcmake-build-gcc/lists"}