Re: can I compile stdc++ library alone using existing aarch64 toolchain?

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

 



>The contrib/download_prerequisites script makes it very easy, you
>don't need to install GMP etc. separately.
thanks very much for you information, I have following the instruction,
I have download different version of gmp,mpfr,mpc, so I create
softlink of them in gcc directory.
I don't want to mess my existing toolchain, so I export
CXX/CC/CROSS_COMPILE/ to use existing toolchain to build gcc.
following is the detailed information:

1.export environment
export CXX=aarch64-linux-gnu-g++
export CC=aarch64-linux-gnu-gcc
export CROSS_COMPILE=aarch64-linux-gnu-
export sysroot=/opt/poky-agl/3.0.0+snapshot/sysroots/aarch64-agl-linux

2. my gcc build script:
<-----------------------------------------------------------------
#!/bin/sh
/home/user/Downloads/cross_compile_gcc/gcc-linara-5.4.0/configure \
--prefix=/home/user/Downloads/cross_compile_gcc/install_gcc \
--build=x86_64-linux-gnu \
--host=aarch64-linux-gnu \
--target=aarch64-linux-gnu \
--enable-threads=posix \
--disable-libgcj \
--enable-multiarch \
--enable-fix-cortex-a53-843419 \
--disable-werror \
--enable-checking=release \
--program-suffix=-5 \
--enable-shared \
--enable-linker-build-id \
--enable-languages=c,c++ \
--enable-clocale=gnu \
--enable-libstdcxx-debug \
--enable-libstdcxx-time=yes \
--with-default-libstdcxx-abi=new \
--enable-gnu-unique-object \
--disable-libquadmath \
--enable-plugin \
--enable-nls \
--enable-multiarch \
--disable-browser-plugin \
--enable-java-awt=gtk \
--enable-gtk-cairo \
--without-included-gettext \
--disable-multilib \
CFLAGS="-g -O2" \
LDFLAGS="-fstack-protector-strong"
--------------------------------------------------------------->


and then the config is alright, but when it goes into make, the
following error happend:
<-------------------------
user@user-Latitude-5400:~/Downloads/cross_compile_gcc/build_gcc$ make
-j8 2>&1 > selfbuild.log
/home/user/Downloads/cross_compile_gcc/gcc-linara-5.4.0/libcc1/configure:
line 14531: -T: command not found
/home/user/Downloads/cross_compile_gcc/gcc-linara-5.4.0/libcc1/configure:
line 14541: -T: command not found
configure: error:
   Building GCC with plugin support requires a host that supports
   -fPIC, -shared, -ldl and -rdynamic.
make[1]: *** [configure-libcc1] Error 1
make[1]: *** Waiting for unfinished jobs....
------------------------->
Do you have any idea why this happened?

Thanks && BestRegards
Samuel
Jonathan Wakely <jwakely.gcc@xxxxxxxxx> 于2021年1月9日周六 下午10:29写道:

>
> On Sat, 9 Jan 2021 at 11:37, xian li <lixian2008cool@xxxxxxxxx> wrote:
> >
> > Thanks for your information, I have tried to use existing aarch64
> > toolchain to compile gcc only, but there is some problem(
> > eg. '/usr/lib64/libgmp.la' is not a valid libtool archive  even though
> > I have configure with --with-gmp) , it make me think that I should
> > compile gcc from scratch(glic,linux-kernel headers, mpfr,gmp,mpc so
> > on),
>
> No.
>
> > am I right, or there is some way to use existing toolchain to build
> > modified gcc?
>
> Just follow the steps at https://gcc.gnu.org/wiki/InstallingGCC
>
> The contrib/download_prerequisites script makes it very easy, you
> don't need to install GMP etc. separately.




[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