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... func_convert_file_noop checking for /usr/local/bin/ld option to reload object files... -r checking for riscv64-unknown-freebsd12.0-objdump... /usr/local/bin/objdump checking how to recognize dependent libraries... pass_all checking for riscv64-unknown-freebsd12.0-dlltool... riscv64-unknown-freebsd12.0-dlltool checking how to associate runtime and link libraries... printf %s\n checking for riscv64-unknown-freebsd12.0-ar... (cached) /usr/local/bin/ar checking for archiver @FILE support... @ checking for riscv64-unknown-freebsd12.0-strip... (cached) /usr/local/bin/strip checking for riscv64-unknown-freebsd12.0-ranlib... /usr/local/bin/ranlib checking command to parse riscv64-unknown-freebsd12.0-nm output from riscv64-unknown-freebsd12.0-gcc object... ok checking for sysroot... /riscv64/rootfs checking for a working dd... /bin/dd checking how to truncate binary pipes... /bin/dd bs=4096 count=1 checking for riscv64-unknown-freebsd12.0-mt... no checking for mt... mt configure: WARNING: using cross tools not prefixed with host triplet checking if mt is a manifest tool... no checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if riscv64-unknown-freebsd12.0-gcc supports -fno-rtti -fno-exceptions... no checking for riscv64-unknown-freebsd12.0-gcc option to produce PIC... -fPIC -DPIC checking if riscv64-unknown-freebsd12.0-gcc PIC flag -fPIC -DPIC works... yes checking if riscv64-unknown-freebsd12.0-gcc static flag -static works... yes checking if riscv64-unknown-freebsd12.0-gcc supports -c -o file.o... yes checking if riscv64-unknown-freebsd12.0-gcc supports -c -o file.o... (cached) yes checking whether the riscv64-unknown-freebsd12.0-gcc linker (/usr/local/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... freebsd12.0 ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... no checking whether to build static libraries... yes checking format of `double' floating point... configure: WARNING: format of `double' floating-point not recognized checking for ICC... no checking for an ANSI C-conforming const... yes checking for working volatile... yes checking whether byte ordering is bigendian... no checking for main in -lm... yes checking for main in -lquadmath... no checking whether time.h and sys/time.h may both be included... yes checking for size_t... yes checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking float.h usability... yes checking float.h presence... yes checking for float.h... yes checking for string.h... (cached) yes checking locale.h usability... yes checking locale.h presence... yes checking for locale.h... yes checking wchar.h usability... yes checking wchar.h presence... yes checking for wchar.h... yes checking stdarg.h usability... yes checking stdarg.h presence... yes checking for stdarg.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/fpu.h usability... no checking sys/fpu.h presence... no checking for sys/fpu.h... no checking for struct lconv.decimal_point... yes checking for struct lconv.thousands_sep... yes checking for working alloca.h... no checking for alloca... yes checking how to copy va_list... va_copy checking for memmove... yes checking for memset... yes checking for setlocale... yes checking for strtol... yes checking for gettimeofday... yes checking for signal... yes checking for sigaction and its associated structure... yes checking for long long int... yes checking for intmax_t... yes checking for working INTMAX_MAX... yes checking for working printf length modifier for intmax_t... j checking for union fpc_csr... no checking for _Noreturn... yes checking for __builtin_unreachable... yes checking for constructor and destructor attributes... yes checking for fesetround... yes checking for gcc float-conversion bug... cannot test, use -ffloat-store checking for subnormal double-precision numbers... cannot test, assume no checking for subnormal single-precision numbers... cannot test, assume no checking for signed zeros... cannot test, assume no checking if the FP division by 0 fails... cannot test, assume no checking if NAN == NAN... cannot test, assume no checking if charset has consecutive values... cannot test checking for math/round... yes checking for math/trunc... yes checking for math/floor... yes checking for math/ceil... yes checking for math/nearbyint... yes checking for _mulx_u64... cannot test, assume no checking for long double... yes checking format of `long double' floating point... IEEE quad, little endian checking for TLS support using C11... cannot test, assume no checking for TLS support... cannot test, assume no checking if __float128 with hex constants is supported... no checking for Static Assertion support... yes checking for library containing clock_gettime... none required checking for gmp.h... yes checking whether gcc __attribute__ ((mode (XX))) works... yes checking for recent GMP... yes checking usable gmp.h at link time... yes checking for GMP_NUMB_BITS and sizeof(mp_limb_t) consistency... cannot test checking for __gmpz_init in -lgmp... no configure: error: libgmp not found or uses a different ABI (including static vs shared). Please read the INSTALL file -- see "In case of problem". gmake[1]: *** [Makefile:5139: configure-mpfr] Error 1 gmake[1]: Leaving directory '/usr/home/dclarke/rv64g_local/build/gcc-8.2.0_rv64imafdc.008' gmake: *** [Makefile:906: all] Error 2 vesta_$ Very annoying given that the gmp library archive was just created moments ago within the gcc build process. Wrongly. So the question is ... can I edit the gmp Makefile.in/Makefile.am files to force the correct "Host type" --host=riscv64-unknown-freebsd12.0 data in there? -- Dennis Clarke RISC-V/SPARC/PPC/ARM/CISC UNIX and Linux spoken GreyBeard and suspenders optional
signature.asc
Description: OpenPGP digital signature
_______________________________________________ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs