pkgsrc-Bugs archive

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

pkg/48512: gfortran broken on NetBSD -current



>Number:         48512
>Category:       pkg
>Synopsis:       gfortran broken on NetBSD -current
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 11 21:40:00 +0000 2014
>Originator:     Kai-Uwe Eckhardt
>Release:        6.99.28 amd64
>Organization:
>Environment:
>Description:
Programs compiled with gfortran throw a runtime warning about missing
cabsl. This breaks all tests in the gcc testsuite and user codes using -Werror. 
The reason are some bugs in libm: there is no implementation
of cabsl, but a prototype in complex.h, throwing a warning on standard
conforming code due to a copy-paste of a broken fix from cabs which is 
unnecessary for cabls anyway. It will take some time to fix it, but
it is eays to fix in pkgsrc.

>How-To-Repeat:

>Fix:
Replace patch-gcc_fortran_f95-lang.c with this one (it works on
6.1 and 6.99):


$NetBSD$

--- gcc/fortran/f95-lang.c.orig 2013-01-10 20:38:27.000000000 +0000
+++ gcc/fortran/f95-lang.c
@@ -710,12 +710,21 @@ gfc_init_builtin_functions (void)
   gfc_define_builtin ("__builtin_truncf", mfunc_float[0],
                      BUILT_IN_TRUNCF, "truncf", ATTR_CONST_NOTHROW_LEAF_LIST);
 
+#if defined(__NetBSD__)
+  gfc_define_builtin ("__builtin_cabs", func_cdouble_double, 
+                    BUILT_IN_CABS, "__c99_cabs", ATTR_CONST_NOTHROW_LEAF_LIST);
+  gfc_define_builtin ("__builtin_cabsf", func_cfloat_float, 
+                    BUILT_IN_CABSF, "__c99_cabsf", 
ATTR_CONST_NOTHROW_LEAF_LIST);
   gfc_define_builtin ("__builtin_cabsl", func_clongdouble_longdouble, 
-                     BUILT_IN_CABSL, "cabsl", ATTR_CONST_NOTHROW_LEAF_LIST);
+                     BUILT_IN_CABSL, "__c99_cabsl", 
ATTR_CONST_NOTHROW_LEAF_LIST);
+#else
   gfc_define_builtin ("__builtin_cabs", func_cdouble_double, 
                      BUILT_IN_CABS, "cabs", ATTR_CONST_NOTHROW_LEAF_LIST);
   gfc_define_builtin ("__builtin_cabsf", func_cfloat_float, 
                      BUILT_IN_CABSF, "cabsf", ATTR_CONST_NOTHROW_LEAF_LIST);
+  gfc_define_builtin ("__builtin_cabsl", func_clongdouble_longdouble, 
+                     BUILT_IN_CABSL, "cabsl", ATTR_CONST_NOTHROW_LEAF_LIST);
+#endif
  
   gfc_define_builtin ("__builtin_copysignl", mfunc_longdouble[1], 
                      BUILT_IN_COPYSIGNL, "copysignl",



Home | Main Index | Thread Index | Old Index