avr-gcc-list
[Top][All Lists]
Advanced

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

Re: Build gcc 10.3.0 for avr on a amd64 linux host


From: Senthil Kumar
Subject: Re: Build gcc 10.3.0 for avr on a amd64 linux host
Date: Tue, 25 May 2021 12:23:19 +0530

On Sun, May 23, 2021 at 8:09 PM Senthil Kumar
<senthil.thecoder@gmail.com> wrote:
>
> On Sun, May 23, 2021 at 12:47 PM BERTRAND Joël
> <joel.bertrand@systella.fr> wrote:
> >
> > Senthil Kumar a écrit :
> > > On Sat, May 22, 2021 at 1:21 AM BERTRAND Joël <joel.bertrand@systella.fr> 
> > > wrote:
> > >>
> > >>         Hello,
> > >>
> > >>         I'm trying to build a recent gcc to check if my issue comes from
> > >> compiler or not. Thus, I have downloaded gcc 10.3.0 sources. Of course,
> > >> on my debian/testing workstation, I have avr avr-binutils and avr-libc.
> > >>
> > >>         I have configured gcc with :
> > >>
> > >> hilbert:[~/cvs/cross-gcc/build] > ../gcc-10.3.0/configure -v
> > >> --enable-languages=c,c++,fortran --prefix=/home/bertrand/cvs/cross-gcc
> > >> --disable-nls --disable-libssp --target=avr --with-dwarf2
> > >>
> > >> but build process hangs with :
> > >>
> > >> make[3] : on quitte le répertoire
> > >> « /home/bertrand/cvs/cross-gcc/build/avr/libgcc »
> > >> make[2] : on quitte le répertoire
> > >> « /home/bertrand/cvs/cross-gcc/build/avr/libgcc »
> > >> Checking multilib configuration for libbacktrace...
> > >> Configuring in avr/libbacktrace
> > >> configure: loading cache ./config.cache
> > >> checking build system type... x86_64-pc-linux-gnu
> > >> checking host system type... avr-unknown-none
> > >> checking target system type... avr-unknown-none
> > >> checking for avr-gcc... /home/bertrand/cvs/cross-gcc/build/./gcc/xgcc
> > >> -B/home/bertrand/cvs/cross-gcc/build/./gcc/
> > >> -B/home/bertrand/cvs/cross-gcc/avr/bin/
> > >> -B/home/bertrand/cvs/cross-gcc/avr/lib/ -isystem
> > >> /home/bertrand/cvs/cross-gcc/avr/include -isystem
> > >> /home/bertrand/cvs/cross-gcc/avr/sys-include
> > >> checking whether the C compiler works... no
> > >> configure: error: in 
> > >> `/home/bertrand/cvs/cross-gcc/build/avr/libbacktrace':
> > >> configure: error: C compiler cannot create executables
> > >> See `config.log' for more details
> > >> make[1]: *** [Makefile:12412 : configure-target-libbacktrace] Erreur 1
> > >> make[1] : on quitte le répertoire « /home/bertrand/cvs/cross-gcc/build »
> > >> make: *** [Makefile:938 : all] Erreur 2
> > >> hilbert:[~/cvs/cross-gcc/build] >
> > >>
> > >>         Config log contains:
> > >> configure:3078: /home/bertrand/cvs/cross-gcc/build/./gcc/xgcc
> > >> -B/home/bertrand/cvs/cross-gcc/build/./gcc/
> > >> -B/home/bertrand/cvs/cross-gcc/avr/bin/
> > >> -B/home/bertrand/cvs/cross-gcc/avr/lib/ -isystem
> > >> /home/bertrand/cvs/cross-gcc/avr/include -isystem
> > >> /home/bertrand/cvs/cross-gcc/avr/sys-include    -g -O2   conftest.c  >&5
> > >> /usr/bin/avr-ld: cannot find -lm
> > >> /usr/bin/avr-ld: cannot find -lc
> > >> collect2: error: ld returned 1 exit status
> > >> configure:3082: $? = 1
> > >> configure:3120: result: no
> > >> configure: failed program was:
> > >> | /* confdefs.h */
> > >> | #define PACKAGE_NAME "package-unused"
> > >> | #define PACKAGE_TARNAME "libbacktrace"
> > >> | #define PACKAGE_VERSION "version-unused"
> > >> | #define PACKAGE_STRING "package-unused version-unused"
> > >> | #define PACKAGE_BUGREPORT ""
> > >> | #define PACKAGE_URL ""
> > >> | /* end confdefs.h.  */
> > >> |
> > >> | int
> > >> | main ()
> > >> | {
> > >> |
> > >> |   ;
> > >> |   return 0;
> > >> | }
> > >> configure:3125: error: in
> > >> `/home/bertrand/cvs/cross-gcc/build/avr/libbacktrace':
> > >> configure:3127: error: C compiler cannot create executables
> > >> See `config.log' for more details
> > >>
> > >>         OK. xgcc tries to build an avr executable and doesn't find libm 
> > >> and
> > >> libc. But even if I add LDFLAGS on configure command line, make always
> > >> returns this error. I suppose I have done a mistake...
> > >
> > > Did you try building and installing avr-libc also at the same --prefix 
> > > location?
> >
> >         No, avr-libc is installed in /usr/lib/avr, but I have tried to add
> > LDFLAGS on configure command line without any success.
>
> LDFLAGS, CFLAGS etc.. are used when building the binary that runs on
> the host (i.e xgcc in your example). I haven't tried building gcc
> against avr-libc installed at a different prefix, but could you try
> BOOT_LDFLAGS and see if it helps?
> >
> >         I have tried to build cross compiler with ct-ng also without any
> > success (from gcc 6.x to 11.x). Same error. ct-ng builds its own
> > avr-libc and doesn't use system avr-libc.
>
> I haven't used that tool either. I'll try building gcc 10.3 from
> scratch tonight and post the steps I used.

The following configure/make/make install worked just fine

$ ~/src/gcc-10.3.0/configure --target=avr --enable-languages=c,c++
--prefix=/home/saaadhu/install --disable-nls --disable-libssp
--with-dwarf2

I suspect fortran in --enable-languages is what is causing issues. Do
you really need gfortran? Also, does symlinking /usr/lib/avr to
<installprefix>/avr help?

Regards
Senthil

>
> >
> >         Best regards,
> >
> >         JB



reply via email to

[Prev in Thread] Current Thread [Next in Thread]