Re: cross compile gcc 10.1.0 on linux for avr fails

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

 



On Thu, Jul 16, 2020 at 1:35 AM Klaus Rudolph <lts-rudolph@xxxxxx> wrote:
> '/home/krud/git_my_checkout/first/own_components/gcc_install/gcc/gcc-10.1.0/build/gcc'
> g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions
> -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing
> -Wwrite-strings -Wcast-qual -Wno-error=format-diag
> -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long
> -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H
> -DGENERATOR_FILE -fno-PIE -I. -Ibuild -I../../gcc -I../../gcc/build
> -I../../gcc/../include  -I../../gcc/../libcpp/include  \
>         -o build/genmodes.o ../../gcc/genmodes.c
> /opt/avr_10.1.0/avr/bin/as: unrecognized option '--64'
>
> As I see it tries to use gcc to compile and link with avr-as which is
> wrong. What did I wrong?

Looks like a PATH environment variable problem.  Do you have "." (dot)
on your path?  In the gcc build tree, we create a script/link called
as for the cross compiler to use.  But if you have dot on your path,
before /usr/bin, then this script/link will be used with the native
gcc instead of the native as, and your build can fail like this.  Also
note that two colons in a row or a colon at the beginning or end of
PATH is the same as having dot on your path.  Putting dot on your path
is a security risk, but if you must do it, put it at the end so it
doesn't accidentally override standard dirs like /bin and /usr/bin.

Jim



[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