# uname -a FreeBSD mech-cluster241.men.bris.ac.uk 9.0-CURRENT FreeBSD 9.0-CURRENT #1 r216732: Mon Dec 27 13:22:47 GMT 2010 root@mech-cluster241.men.bris.ac.uk:/usr/obj/usr/src/sys/TZAV ia64 # Building gcc46 gives: libtool: compile: /usr/ports/lang/gcc46/work/build/./gcc/xgcc -B/usr/ports/lang/gcc46/work/build/./ gcc/ -B/usr/local/ia64-portbld-freebsd9.0/bin/ -B/usr/local/ia64-portbld-freebsd9.0/lib/ -isystem /u sr/local/ia64-portbld-freebsd9.0/include -isystem /usr/local/ia64-portbld-freebsd9.0/sys-include -DH AVE_CONFIG_H -I. -I../.././../gcc-4.6-20110205/libgfortran -iquote../.././../gcc-4.6-20110205/libgfo rtran/io -I../.././../gcc-4.6-20110205/libgfortran/../gcc -I../.././../gcc-4.6-20110205/libgfortran/ ../gcc/config -I../.././gcc -D_GNU_SOURCE -std=gnu99 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wextra -Wwrite-strings -fcx-fortran-rules -ffunction-sections -fdata-section s -g -O2 -pipe -I/usr/local/include -fno-strict-aliasing -MT backtrace.lo -MD -MP -MF .deps/backtrac e.Tpo -c ../.././../gcc-4.6-20110205/libgfortran/runtime/backtrace.c -fPIC -DPIC -o .libs/backtrace .o In file included from ../.././../gcc-4.6-20110205/libgfortran/runtime/backtrace.c:25:0: ../.././../gcc-4.6-20110205/libgfortran/libgfortran.h:53:29: fatal error: quadmath_weak.h: No such file or directory compilation terminated. In file included from ../.././../gcc-4.6-20110205/libgfortran/fmain.c:4:0: ../.././../gcc-4.6-20110205/libgfortran/libgfortran.h:53:29: fatal error: quadmath_weak.h: No such file or directory compilation terminated. gmake[3]: *** [fmain.lo] Error 1 gmake[3]: *** Waiting for unfinished jobs.... gmake[3]: *** [backtrace.lo] Error 1 gmake[3]: Leaving directory `/usr/ports/lang/gcc46/work/build/ia64-portbld-freebsd9.0/libgfortran' gmake[2]: *** [all] Error 2 gmake[2]: Leaving directory `/usr/ports/lang/gcc46/work/build/ia64-portbld-freebsd9.0/libgfortran' gmake[1]: *** [all-target-libgfortran] Error 2 gmake[1]: Leaving directory `/usr/ports/lang/gcc46/work/build'
See PR 47649 for configure logs. The issue is that __float128 is supported, but due to missing functionality (unclear whether FreeBSD's libc or libgcc should provide them) libquadmath does not build - cf. bug 47649 comment 5. The question is how one solves this. A work around would be disable libquadmath via libgfortran's configure if it is not available. As REAL(16) will be still available, there will be test-suite failures. I think a proper workaround is to build with --disable-libquadmath-support until the _U_Q* are supported. The question is only whether this is a GCC bug (libgcc) or a FreeBSD bug (libc).
Possibly related: PR 47716. (Same symptoms on NetBSD 5.1 - but it fails on x86-64 while for FreeBSD it only fails on ia64 while [cf. PR 47642] x86-64 works.)
Created attachment 23341 [details] Possible libgfortran.dg/configure patch The attached patch should allow to build libgfortran without --disable-libquadmath-support. It does so by copying the check from libquadmath. I would be happy if someone could test this test on a machine where it failed before. (Note: A complimentary patch to support the missing bits on FreeBSD/ia64 would be still useful.)
Author: burnus Date: Tue Feb 15 21:30:43 2011 New Revision: 170200 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170200 Log: 2011-02-15 Tobias Burnus <burnus@net-b.de> PR fortran/47716 PR fortran/47648 * acinclude.m4 (LIBGFOR_CHECK_FLOAT128): Use check from libquadmath, which uses more features. * configure: Regenerate. Modified: trunk/libgfortran/ChangeLog trunk/libgfortran/acinclude.m4 trunk/libgfortran/configure
STATUS: - libgfortran uses the same check as libquadmath; thus, there should be no build issue anymore as libquadmath support is disabled for libgfortran. (The Fortran FE still can generate calls for REAL(16).) - The issue that on FreeBSD libquadmath is not supported remains unsolved. The problem is that some support (_U_Q*) is missing. The support could come either from FreeBSD's libc or from libgcc. Cf. bug 47649 comment 5.
Is it still a problem?
> Is it still a problem? No answer since a year and a half. Closing as FIXED. Please open new PR(s) for remaining issue(s).