Created
May 6, 2021 22:05
-
-
Save xinyazhang/f3af94b7134d7f736cdee07b0570369b to your computer and use it in GitHub Desktop.
Compile GCC-8 From Source for Matlab 2020B
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
| # Install to /opt/gcc-8 | |
| # Do NOT install to /usr/local, because of libstdc++.so.6 naming conflict. | |
| # Your system's compiler are likely incompatible with it. | |
| # There is also no "library-suffix" option. So simply don't install it there. | |
| # Optionally you can add --program-suffix=-8 but this creates quite a few troubles for Matlab to detect GCC. | |
| ../gcc-8.4.0/configure --prefix=/opt/gcc-8 --enable-bootstrap --enable-languages=c,c++ --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --build=x86_64-redhat-linux --disable-multilib | |
| # Important. Run this in your shell before "make", otherwise there will be various weird erros. | |
| # Don't know why gcc don't make this default. | |
| unset LIBRARY_PATH CPATH C_INCLUDE_PATH PKG_CONFIG_PATH CPLUS_INCLUDE_PATH INCLUDE |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
And add the following to
startup.m