Re: compiling a simple "hello world example" Microchip PIC32 ( march is 24ks) fails...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12. 03. 19 22:23, Jonathan Wakely wrote:
On Tue, 12 Mar 2019 at 22:20, Branko <brane221122@xxxxxxxxx> wrote:
I just did.

I've compiled separate binutils for the target and then also compiled gcc.
We would be able to help more if you told us how you configured
binutils and GCC.


OK, this is the bit of a script I used to config & make binutils:


*****************************

pushd 000_build && rm -Rf *

../configure --target="mips32r6-unknown-elf" --prefix=/home/brane2/MC_SDK --disable-nls --enable-shared --disable-multilib make -j17 && make install && echo && echo "************ BINUTILS INSTALLED *********************"

popd



***************************************

and this is the script for gcc (v8.3.0)  config and make:

****************************************

pushd 000_build && rm -Rf *


export AS_FOR_TARGET=/home/brane2/MC_SDK/bin/mips32r6-unknown-elf-as
export AR_FOR_TARGET=/home/brane2/MC_SDK/bin/mips32r6-unknown-elf-ar
export LD_FOR_TARGET=/home/brane2/MC_SDK/bin/mips32r6-unknown-elf-ld
export NM_FOR_TARGET=/home/brane2/MC_SDK/bin/mips32r6-unknown-elf-nm
export OBJCOPY_FOR_TARGET=/home/brane2/MC_SDK/bin/mips32r6-unknown-elf-objcopy



export CC_FOR_TARGET=/home/brane2/MC_SDK/bin/mips-unknown-elf-gcc
export CXX_FOR_TARGET=/home/brane2/MC_SDK/bin/mips-unknown-elf-g++






../configure --target="mips-unknown-elf" --prefix=/home/brane2/MC_SDK --disable-nls --enable-shared --disable-multilib --disable-threads --enable-languages=c,c++ make -j17 all-gcc  && make install && echo && echo "************ GCC INSTALLED *********************"

popd

************************************















Result runs fine without parameters. But as soon as I give it to compile
even trivial program, it chokes with the message like:

"as: unrecognised option -EB"

It shows that this gcc always calls system AS/AR/LD, no mater what I do
or how I compile it.

Is there any special trick for this ?
It sounds like GCC didn't find your cross binutils. Did you install
binutils, or just compile it? Did you install it somewhere that is in
your PATH, so GCC can find the executables? Alternatively, did you use
--with-as and --with-ld to tell GCC how to find them?

The simplest solution is to install the cross binutils to the same
path as you use for GCC's --prefix option. If GCC finds a binutils in
the --prefix directory then it will use it automatically.





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux