Re: not really a bug .. is there a way to set the host type in the Makefile.am ?

2019-02-18 Thread Niels Möller
Dennis Clarke  writes:

> On 2/18/19 10:31 PM, Vincent Lefevre wrote:
>> It seems more likely to be an issue with the gcc build scripts.
>> I don't think that GMP and MPFR can or should do anything.
>
> Well said.  I just hope I can figure this out.

You'd first need to figure out how the gcc scripts set the gmp host
type. Is gmp's config.* involved in any way? If all else fails, you
could try hacking the configure script in the gmp tree, to hard code all
host-related variables and ignore whatever is passed in from outside.

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Re: not really a bug .. is there a way to set the host type in the Makefile.am ?

2019-02-18 Thread Dennis Clarke
On 2/18/19 10:31 PM, Vincent Lefevre wrote:
> On 2019-02-18 22:24:35 -0500, Dennis Clarke wrote:
>> On 2/18/19 8:25 PM, Vincent Lefevre wrote:
>>> On 2019-02-18 16:44:48 -0500, Dennis Clarke wrote:

 This may seem like a strange question but I am running into many
 problems while trying to build gcc 8.2.0 for a RISC-V target. With
 a cross compiler toolset I am easily able to create output ELF files
 for the rv64gc architecture and so that is not a problem. However that
 is only possible ( thus far ) when building gmp separately. The gcc code
 requires that I extract the gmp/mpfr/mpc sources inside the gcc sources
 tree and then build/bootstrap gcc which in turns rebuilds gmp all over
 again.  Regardless if it is pre-installed elsewhere or not.
>>> [...]
>>>
>>> Isn't this a question for the gcc-help mailing-list?
>>>
>>
>> Well yes, it is. However given that the problem occurs within the gmp
>> and mpfr source builds I felt it can not hurt to ask here.  Given that
>> no one seems to know what to do really.
> 
> It seems more likely to be an issue with the gcc build scripts.
> I don't think that GMP and MPFR can or should do anything.
> 

Well said.  I just hope I can figure this out.

Dennis
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Re: not really a bug .. is there a way to set the host type in the Makefile.am ?

2019-02-18 Thread Vincent Lefevre
On 2019-02-18 22:24:35 -0500, Dennis Clarke wrote:
> On 2/18/19 8:25 PM, Vincent Lefevre wrote:
> > On 2019-02-18 16:44:48 -0500, Dennis Clarke wrote:
> >>
> >> This may seem like a strange question but I am running into many
> >> problems while trying to build gcc 8.2.0 for a RISC-V target. With
> >> a cross compiler toolset I am easily able to create output ELF files
> >> for the rv64gc architecture and so that is not a problem. However that
> >> is only possible ( thus far ) when building gmp separately. The gcc code
> >> requires that I extract the gmp/mpfr/mpc sources inside the gcc sources
> >> tree and then build/bootstrap gcc which in turns rebuilds gmp all over
> >> again.  Regardless if it is pre-installed elsewhere or not.
> > [...]
> > 
> > Isn't this a question for the gcc-help mailing-list?
> > 
> 
> Well yes, it is. However given that the problem occurs within the gmp
> and mpfr source builds I felt it can not hurt to ask here.  Given that
> no one seems to know what to do really.

It seems more likely to be an issue with the gcc build scripts.
I don't think that GMP and MPFR can or should do anything.

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


Re: not really a bug .. is there a way to set the host type in the Makefile.am ?

2019-02-18 Thread Dennis Clarke
On 2/18/19 8:25 PM, Vincent Lefevre wrote:
> On 2019-02-18 16:44:48 -0500, Dennis Clarke wrote:
>>
>> This may seem like a strange question but I am running into many
>> problems while trying to build gcc 8.2.0 for a RISC-V target. With
>> a cross compiler toolset I am easily able to create output ELF files
>> for the rv64gc architecture and so that is not a problem. However that
>> is only possible ( thus far ) when building gmp separately. The gcc code
>> requires that I extract the gmp/mpfr/mpc sources inside the gcc sources
>> tree and then build/bootstrap gcc which in turns rebuilds gmp all over
>> again.  Regardless if it is pre-installed elsewhere or not.
> [...]
> 
> Isn't this a question for the gcc-help mailing-list?
> 

Well yes, it is. However given that the problem occurs within the gmp
and mpfr source builds I felt it can not hurt to ask here.  Given that
no one seems to know what to do really.


-- 
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
GreyBeard and suspenders optional
___
gmp-bugs mailing list
gmp-bugs@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-bugs


not really a bug .. is there a way to set the host type in the Makefile.am ?

2019-02-18 Thread Dennis Clarke

This may seem like a strange question but I am running into many
problems while trying to build gcc 8.2.0 for a RISC-V target. With
a cross compiler toolset I am easily able to create output ELF files
for the rv64gc architecture and so that is not a problem. However that
is only possible ( thus far ) when building gmp separately. The gcc code
requires that I extract the gmp/mpfr/mpc sources inside the gcc sources
tree and then build/bootstrap gcc which in turns rebuilds gmp all over
again.  Regardless if it is pre-installed elsewhere or not.

When I build gmp separately for the RISC-V target I can do this :

$ ../gmp-6.1.2/configure ABI=standard \
> --enable-cxx --prefix=/home/dclarke/rv64g_local \
> --libdir=/home/dclarke/rv64g_local/lib \
> --build=x86_64-unknown-freebsd12.0 \
> --host=riscv64-unknown-freebsd12.0 --disable-assembly

Configure runs fine and I see :


configure: summary of build options:

  Version:   GNU MP 6.1.2
  Host type: riscv64-unknown-freebsd12.0
  ABI:   standard
  Install prefix:/home/dclarke/rv64g_local
  Compiler:  /opt/tools/bin/riscv64-unknown-freebsd12.0-gcc
  Static libraries:  yes
  Shared libraries:  yes

Which does result in proper output ELF files ready for the RISC-V arch.
Great.

However within the build process of gcc I see this fly by in the compile
output :


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.

The "Host type" should be "riscv64-unknown-freebsd12.0" and so the whole
gmp compile stage ( within gcc build ) completes just fine and then mpfr
fails with this :

.
.
.
libtool: link: /usr/local/bin/ranlib .libs/libgmp.a
libtool: link: rm -fr .libs/libgmp.lax
libtool: link: ( cd ".libs" && rm -f "libgmp.la" && ln -s "../libgmp.la"
"libgmp.la" )
gmake[4]: Leaving directory
'/usr/home/dclarke/rv64g_local/build/gcc-8.2.0_rv64imafdc.008/gmp'
gmake[3]: Leaving directory
'/usr/home/dclarke/rv64g_local/build/gcc-8.2.0_rv64imafdc.008/gmp'
gmake[2]: Leaving directory
'/usr/home/dclarke/rv64g_local/build/gcc-8.2.0_rv64imafdc.008/gmp'
mkdir ./mpfr
Configuring in ./mpfr
configure: creating cache ./config.cache
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for riscv64-unknown-freebsd12.0-strip... /usr/local/bin/strip
checking for a thread-safe mkdir -p... ../../gcc-8.2.0/mpfr/install-sh -c -d
checking for gawk... /usr/local/bin/gawk
checking whether /usr/local/bin/gmake sets $(MAKE)... yes
checking whether /usr/local/bin/gmake supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking build system type... x86_64-unknown-freebsd12.0
checking host system type... riscv64-unknown-freebsd12.0
checking for grep that handles long lines and -e... /usr/local/bin/grep
checking for egrep... /usr/local/bin/grep -E
checking for a sed that does not truncate output... /usr/local/bin/gsed
checking whether configure options are compatible... yes
checking for riscv64-unknown-freebsd12.0-gcc...
riscv64-unknown-freebsd12.0-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether riscv64-unknown-freebsd12.0-gcc accepts -g... yes
checking for riscv64-unknown-freebsd12.0-gcc option to accept ISO C89...
none needed
checking whether riscv64-unknown-freebsd12.0-gcc understands -c and -o
together... yes
checking whether /usr/local/bin/gmake supports the include directive...
yes (GNU style)
checking dependency style of riscv64-unknown-freebsd12.0-gcc... gcc3
checking how to run the C preprocessor... riscv64-unknown-freebsd12.0-gcc -E
checking for riscv64-unknown-freebsd12.0-ar... /usr/local/bin/ar
checking the archiver (/usr/local/bin/ar) interface... ar
checking how to print strings... printf
checking for a sed that does not truncate output... (cached)
/usr/local/bin/gsed
checking for fgrep... /usr/local/bin/grep -F
checking for ld used by riscv64-unknown-freebsd12.0-gcc... /usr/local/bin/ld
checking if the linker (/usr/local/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)...
riscv64-unknown-freebsd12.0-nm
checking the name lister (riscv64-unknown-freebsd12.0-nm) interface...
BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking how to convert x86_64-unknown-freebsd12.0 file names to
riscv64-unknown-freebsd12.0 format... func_convert_file_noop
checking how to convert x86_64-unknown-freebsd12.0 file names to
toolchain format...