Re: the cross compiler battle -- how to force host-triplet and target-triplet?

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

 



On Tue, Feb 19, 2019 at 6:59 AM Dennis Clarke <dclarke@xxxxxxxxxxxxx> wrote:
>
> After many many many experiments I am seeing that host and target data
> is not being passed down into the build of gmp after configure.  I took
> a look into the gmp sources and multiple Makefile.in and see :
>
> host = @host@
> host_alias = @host_alias@
> host_cpu = @host_cpu@
> host_os = @host_os@
> host_vendor = @host_vendor@
>
> Well what should those really be?
>
> I am trying to force this :
>
> vesta_$ grep 'triplet' ./gmp-6.1.2/Makefile.in
> build_triplet = x86_64-unknown-freebsd12.0
> host_triplet = riscv64-unknown-freebsd12.0
> vesta_$
>
> No amount of finangle of configure options seems to be able to tell the
> gmp build that the local host is x86_64-unknown-freebsd12.0 and that the
> target should be a RISC-V rv64imafdc architecture. The actual triplet
> for the target should be riscv64-unknown-freebsd12.0 however what I am
> actually seeing is :
>
>
> configure: summary of build options:
>
>   Version:           GNU MP 6.1.2
>   Host type:         none-unknown-freebsd12.0
>   ABI:               standard
>   Install prefix:    /usr/local/gcc8
>   Compiler:          riscv64-unknown-freebsd12.0-gcc
>   Static libraries:  yes
>   Shared libraries:  no
>
>
> That is wrong.
>
> What I should see is this :
>
> configure: summary of build options:
>
>   Version:           GNU MP 6.1.2
>   Host type:         riscv64-unknown-freebsd12.0
>   ABI:               standard
>   Install prefix:    /usr/local/gcc8
>   Compiler:          /opt/tools/bin/riscv64-unknown-freebsd12.0-gcc
>   Static libraries:  yes
>   Shared libraries:  yes
>
> So maybe I need to hack the Makefile.in files down in the gmp sources
> within the gcc-8.2.0 source tree.  Is there some other way to get the
> build of these gmp/mpfr/mpc correct?  any hints would help and this has
> been covered in detail within a few previous posts by me :
>
>   https://gcc.gnu.org/ml/gcc-help/2019-02/msg00068.html
>
> So anyways getting a native RISC-V compiler isn't going well.

I built a cross-native compiler like you want to a few weeks ago, but
for more mainstream architectures (Linux x86_64 -> Linux armv7l). I
used crosstool-ng for the initial cross-compiler, then pulled the
necessary configure arguments from its build.log to upgrade the cross
compiler gcc to 8.2.0 and was finally able to use it for building the
native compiler fairly painlessly. I can follow up with more detailed
instructions if you want.

crosstool-ng seems to have support for riscv. Have you found out if
the fact that you're on freebsd causes your troubles or is it the
riscv architecture or is it you not being experienced enough yet? ;)



[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