Created
February 8, 2021 21:19
-
-
Save ricardocosme/5ec8ad05b5f4adb66464a146dcc41545 to your computer and use it in GitHub Desktop.
avr-gcc 10.2 with libstdc++ using the freestanding implementation
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
| #This is a step-by-step guide to build the avr-gcc 10.2 with the | |
| #libstdc++ using the freestanding implementation[1]. | |
| # | |
| #Don't expect a robust script without boilerplates or something coded | |
| #to be resilient. This is only a short register of what I need to | |
| #obtain the compiler in this mode. | |
| # | |
| #[1] https://timsong-cpp.github.io/cppwp/n4861/compliance | |
| wget https://ftp.gnu.org/gnu/binutils/binutils-2.36.tar.gz | |
| tar zxf binutils-2.36.tar.gz | |
| cd binutils-2.36 | |
| mkdir obj | |
| cd obj | |
| ../configure --prefix=$PREFIX --target=avr --disable-nls | |
| make -j16 | |
| make install | |
| cd ../../ | |
| export PATH=$PREFIX/bin:$PATH | |
| wget https://bigsearcher.com/mirrors/gcc/releases/gcc-10.2.0/gcc-10.2.0.tar.gz | |
| tar zxf gcc-10.2.0.tar.gz | |
| cd gcc-10.2.0 | |
| mkdir obj | |
| cd obj | |
| ../configure --prefix=$PREFIX --target=avr --enable-languages=c,c++ --disable-nls --disable-libssp --with-dwarf2 | |
| make -j16 | |
| make installl | |
| cd ../../ | |
| wget http://download.savannah.gnu.org/releases/avr-libc/avr-libc-2.0.0.tar.bz2 | |
| tar jxf avr-libc-2.0.0.tar.bz2 | |
| cd avr-libc-2.0.0 | |
| mkdir obj | |
| cd obj | |
| ../configure --prefix=$PREFIX --build=`../config.guess` --host=avr | |
| make -j16 | |
| make install | |
| cd ../../ | |
| cd gcc-10.2.0 | |
| cd obj | |
| ../configure --prefix=$PREFIX --target=avr --enable-languages=c,c++ --disable-nls --disable-libssp --with-dwarf2 --with-newlib --disable-__cxa_atexit --disable-threads --disable-shared --disable-sjlj-exceptions --enable-libstdcxx --disable-hosted-libstdcxx --disable-bootstrap | |
| make -j16 | |
| make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also a question @ricarocosme ,what if we want all the headers of the stl like variant and such , would it work to just remove some of your
-disableflags?