public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* can I compile stdc++ library alone using existing aarch64 toolchain?
@ 2021-01-09  3:00 xian li
  2021-01-09 11:11 ` Jonathan Wakely
  0 siblings, 1 reply; 5+ messages in thread
From: xian li @ 2021-01-09  3:00 UTC (permalink / raw)
  To: gcc-help

Hi,

On my computer, there is already existing aarch64-linux-gnu toolchain,
but we have to modify codes in stdc++ lib in gcc (5.4),
we just want to compile the stdc++ library alone, is it possible to
accomplish this work?

It will be very appreciated if someone can help me with this, thank you

Thanks&BestRegards
Samuel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: can I compile stdc++ library alone using existing aarch64 toolchain?
  2021-01-09  3:00 can I compile stdc++ library alone using existing aarch64 toolchain? xian li
@ 2021-01-09 11:11 ` Jonathan Wakely
  2021-01-09 11:37   ` xian li
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Wakely @ 2021-01-09 11:11 UTC (permalink / raw)
  To: xian li; +Cc: gcc-help

On Sat, 9 Jan 2021, 03:01 xian li via Gcc-help, <gcc-help@gcc.gnu.org>
wrote:

> Hi,
>
> On my computer, there is already existing aarch64-linux-gnu toolchain,
> but we have to modify codes in stdc++ lib in gcc (5.4),
> we just want to compile the stdc++ library alone, is it possible to
> accomplish this work?
>


This is not supported. The only supported way to build libstdc++ is as part
of building GCC.



>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: can I compile stdc++ library alone using existing aarch64 toolchain?
  2021-01-09 11:11 ` Jonathan Wakely
@ 2021-01-09 11:37   ` xian li
  2021-01-09 14:29     ` Jonathan Wakely
  0 siblings, 1 reply; 5+ messages in thread
From: xian li @ 2021-01-09 11:37 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help

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),
am I right, or there is some way to use existing toolchain to build
modified gcc?

Jonathan Wakely <jwakely.gcc@gmail.com> 于2021年1月9日周六 下午7:11写道:
>
>
>
> On Sat, 9 Jan 2021, 03:01 xian li via Gcc-help, <gcc-help@gcc.gnu.org> wrote:
>>
>> Hi,
>>
>> On my computer, there is already existing aarch64-linux-gnu toolchain,
>> but we have to modify codes in stdc++ lib in gcc (5.4),
>> we just want to compile the stdc++ library alone, is it possible to
>> accomplish this work?
>
>
>
> This is not supported. The only supported way to build libstdc++ is as part of building GCC.
>
>
>>
>>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: can I compile stdc++ library alone using existing aarch64 toolchain?
  2021-01-09 11:37   ` xian li
@ 2021-01-09 14:29     ` Jonathan Wakely
  2021-01-18 13:30       ` xian li
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Wakely @ 2021-01-09 14:29 UTC (permalink / raw)
  To: xian li; +Cc: gcc-help

On Sat, 9 Jan 2021 at 11:37, xian li <lixian2008cool@gmail.com> 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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: can I compile stdc++ library alone using existing aarch64 toolchain?
  2021-01-09 14:29     ` Jonathan Wakely
@ 2021-01-18 13:30       ` xian li
  0 siblings, 0 replies; 5+ messages in thread
From: xian li @ 2021-01-18 13:30 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help

>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@gmail.com> 于2021年1月9日周六 下午10:29写道:

>
> On Sat, 9 Jan 2021 at 11:37, xian li <lixian2008cool@gmail.com> 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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-01-18 13:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-09  3:00 can I compile stdc++ library alone using existing aarch64 toolchain? xian li
2021-01-09 11:11 ` Jonathan Wakely
2021-01-09 11:37   ` xian li
2021-01-09 14:29     ` Jonathan Wakely
2021-01-18 13:30       ` xian li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).