Created
August 30, 2018 04:50
-
-
Save avinash-palleti/0684a132fc4a89d8d099026c450b195c to your computer and use it in GitHub Desktop.
gcc.spec
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 characters
| %define keepstatic 1 | |
| %define gcc_target x86_64-generic-linux | |
| %define libstdcxx_maj 6 | |
| %define libstdcxx_full 6.0.25 | |
| %define isl_version 0.16.1 | |
| %define gccver 8.2.0 | |
| %define gccpath gcc-8.2.0 | |
| %global _missing_build_ids_terminate_build 0 | |
| # | |
| # debug_package must be set to %{nil} for functional reasons | |
| # removing this breaks the crt* files for correctness | |
| # | |
| %define debug_package %{nil} | |
| Name : ogcc | |
| Version : 8.2.0 | |
| Release : 119 | |
| URL : http://www.gnu.org/software/gcc/ | |
| Source0 : https://mirrors.kernel.org/gnu/gcc/gcc-8.2.0/gcc-8.2.0.tar.gz | |
| Source1 : https://gcc.gnu.org/pub/gcc/infrastructure/isl-0.16.1.tar.bz2 | |
| Summary : GNU cc and gcc C compilers | |
| Group : Development/Tools | |
| License : BSD-3-Clause BSL-1.0 GFDL-1.2 GFDL-1.3 GPL-2.0 GPL-3.0 LGPL-2.1 LGPL-3.0 MIT | |
| AutoProv : No | |
| %description | |
| GNU cc and gcc C compilers. | |
| %prep | |
| %setup -q -n %{gccpath} | |
| %build | |
| # Live in the gcc source tree | |
| tar xf %{SOURCE1} && ln -sf isl-%{isl_version} isl | |
| rm -rf gcc-build | |
| mkdir gcc-build | |
| cd gcc-build | |
| ../configure \ | |
| --prefix=%{buildroot}/opt/gcc \ | |
| --with-pkgversion='FuSa Clear Linux OS for Intel Architecture'\ | |
| --libdir=%{buildroot}/opt/gcc/lib \ | |
| --libexecdir=%{buildroot}/opt/gcc/lib \ | |
| --enable-multilib\ | |
| --enable-languages="c" | |
| make %{?_smp_mflags} | |
| #%check | |
| #pushd ../gcc-build | |
| #export CHECK_TEST_FRAMEWORK=1 | |
| #make -k %{?_smp_mflags} check || : | |
| #popd | |
| %install | |
| cd gcc-build | |
| export CPATH=%{buildroot}/opt/gcc/include | |
| export LIBRARY_PATH=%{buildroot}/opt/gcc/lib64 | |
| #%make_install | |
| make install | |
| cd - | |
| cd %{buildroot}/opt/gcc/bin | |
| ln -sf %{gcc_target}-g++ g++ | |
| ln -sf %{gcc_target}-gcc gcc | |
| ln -sf cpp %{buildroot}/opt/gcc/lib/cpp | |
| install -d %{buildroot}/opt/gcc/lib | |
| ln -sf g++ c++ | |
| ln -sf gcc cc | |
| cd - | |
| chmod 0755 %{buildroot}/opt/gcc/lib64/libgcc_s.so.1 | |
| chmod 0755 %{buildroot}/opt/gcc/lib32/libgcc_s.so.1 | |
| chmod a+x %{buildroot}/opt/gcc/bin | |
| chmod a+x %{buildroot}/opt/gcc/lib64 | |
| chmod -R a+x %{buildroot}/opt/gcc/lib*/gcc/ | |
| %files | |
| /opt/gcc/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment