Path: csiph.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.glorb.com!usenet.stanford.edu!not-for-mail From: yczo Newsgroups: gnu.g++.help Subject: arm-none-eabi-gcc [bare metal] cannot find -lstdc++_nano... Date: Fri, 25 Mar 2016 15:26:44 -0700 (MST) Lines: 121 Approved: help-gplusplus@gnu.org Message-ID: NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: usenet.stanford.edu 1458950921 28034 208.118.235.17 (26 Mar 2016 00:08:41 GMT) X-Complaints-To: action@cs.stanford.edu To: Help-gplusplus@gnu.org Envelope-to: Help-gplusplus@gnu.org X-detected-operating-system: by eggs.gnu.org: iOS iPhone or iPad X-Received-From: 162.253.133.15 X-Mailman-Approved-At: Fri, 25 Mar 2016 20:08:40 -0400 X-BeenThere: help-gplusplus@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU C++ compiler List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.g++.help:333 Hello everybody, recently I tried to set up a bare metal arm for Cortex M3 from scratch on my gentoo. I used binutils-2.26.tar.gz gcc-4.9.3.tar.gz gdb-7.11.tar.xz newlib-2.3.0.20160104.tar.gz but when I try to compile, shows the following error: /arm/cortex-M3/lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld: cannot find -lstdc++_nano /arm/cortex-M3/lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld: cannot find -lg_nano /arm/cortex-M3/lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld: cannot find -lc_nano [/code] Please, can somebody hel me? Thanks in advance. pd: Here ist the sequence that i used [code] tar xvf binutils-2.26.tar.gz && tar xvf gcc-4.9.3.tar.gz && tar xvf newlib-2.3.0.20160104.tar.gz && tar xvf gdb-7.11.tar.xz #export paths export Objetivo=arm-none-eabi && export Prefijo=/arm/cortex-M3 #binutils compile cd binutils-2.26 ./configure --target=$Objetivo --prefix=$Prefijo --disable-newlib-supplied-syscalls --enable-interwork --enable-multilib --with-gnu-as --with-gnu-ld --enable-newlib-nano-malloc --disable-nls --disable-libssp --with-sysroot --disable-werror make -j8 all && make install # The meaning of flags: # --with-mode=thumb ........ use Thumb instruction set # --enable-interwork ....... supports calling between ARM and Thumb instruction set # --enable-multilib ........ builds for any other unspecified configuration # --with-gnu-as ............ use only GNU Assembler # --with-gnu-ld ............ use only GNU Linker # --disable-nls ............ output only in English #gcc compile PATH="${PATH}:/arm/cortex-M3/bin:" cd ../gcc-4.9.3 && mkdir objdir && cd objdir ../configure --target=$Objetivo --prefix=$Prefijo --without-headers --disable-shared --disable-newlib-supplied-syscalls --enable-interwork --with-gnu-as --with-gnu-ld --enable-newlib-nano-malloc --with-system-zlib --enable-multilib --enable-languages="c,c++" --with-newlib --with-headers=../../newlib-2.3.0.20160104/newlib/libc/include --disable-libssp --disable-nls --with-cpu=cortex-m3 --with-tune=cortex-m3 --with-mode=thumb --with-float=soft #I could not find arm-none-eabi-cc ln -s $Prefijo/bin/arm-none-eabi-gcc $Prefijo/bin/arm-none-eabi-cc # The meaning of flags (see https://gcc.gnu.org/install/configure.html): # --with-system-zlib ...... use the system's zlib library # --with-newlib ........... newlib is going to be used as the target C library # --without-headers ....... do not use target headers from libc (newlib) when building, because newlib is not build yet. # --disable-shared ........ only static libraries, because shared are not supported on the target platform # make clean #newlib compile cd ../../newlib-2.3.0.20160104 ./configure --target=$Objetivo --prefix=$Prefijo --disable-newlib-supplied-syscalls --enable-interwork --enable-multilib --with-gnu-as --with-gnu-ld --enable-newlib-nano-malloc --disable-nls --disable-libssp --with-sysroot --disable-werror make -j8 all && make install # The meaning of flags: # --disable-newlib-supplied-syscalls ... disable syscalls, because we are building for bare-metal target. # --enable-newlib-nano-malloc ... enable nano implementation of malloc suitable for devices with limited memory resources # make clean #gcc final compile cd ../gcc-4.9.3/objdir/ ../configure --target=$Objetivo --prefix=$Prefijo --disable-shared --disable-newlib-supplied-syscalls --enable-interwork --with-gnu-as --with-gnu-ld --enable-newlib-nano-malloc --with-system-zlib --enable-multilib --enable-languages="c,c++" --with-newlib --with-headers=../../newlib-2.3.0.20160104/newlib/libc/include --disable-libssp --disable-nls --with-cpu=cortex-m3 --with-tune=cortex-m3 --with-mode=thumb --with-float=soft make -j8 all && make install #GDB compile cd ../../gdb-7.11 ./configure --target=$Objetivo --prefix=$Prefijo --disable-newlib-supplied-syscalls --enable-interwork --enable-multilib --with-gnu-as --with-gnu-ld --enable-newlib-nano-malloc --disable-nls --disable-libssp --with-sysroot --disable-werror make -j8 all && make install -- View this message in context: http://gcc.1065356.n5.nabble.com/arm-none-eabi-gcc-bare-metal-cannot-find-lstdc-nano-tp1249231.html Sent from the gcc - Gnu Help List mailing list archive at Nabble.com.