[Bug libfortran/74755] libgfortran: build breaks if localtime_r prototype is present, but definition is not

2023-06-19 Thread fxcoudert at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=74755

Francois-Xavier Coudert  changed:

   What|Removed |Added

 Status|SUSPENDED   |RESOLVED
 Resolution|--- |INVALID
 CC||fxcoudert at gcc dot gnu.org

--- Comment #4 from Francois-Xavier Coudert  ---
> I suppose that needs to be fixed in nvptx-newlib, unless this (localtime_r 
> prototype present, but definition not) is a configuration that needs to be 
> supported in libgfortran?

I totally agree that the target libc/system headers providing a localtime_r
prototype without implementation is the real issue. That's how we detect a lot
of functions, breaking that assumption will lead to a lot more trouble.

[Bug libfortran/74755] libgfortran: build breaks if localtime_r prototype is present, but definition is not

2016-10-19 Thread tschwinge at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=74755

Thomas Schwinge  changed:

   What|Removed |Added

 Status|WAITING |SUSPENDED
 CC||nathan at gcc dot gnu.org,
   ||tschwinge at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |tschwinge at gcc dot 
gnu.org

--- Comment #3 from Thomas Schwinge  ---
Nathan applied a workaround in trunk r239836,
.

(For the record, at least with a "combined" source tree, you don't explicitly
have to configure --with-newlib to make this work, as --with-newlib will be
passed by the build system.)

I still think this should really be fixed in newlib, and that the configure
auto-detection should be re-enabled then.

Nathan's trunk r239836 caused the following changes in
[build]/nvptx-none/libgfortran/config.h:

 /* Define to 1 if you have the `gmtime_r' function. */
-/* #undef HAVE_GMTIME_R */
+#define HAVE_GMTIME_R 1

 /* Define to 1 if you have the `localtime_r' function. */
-/* #undef HAVE_LOCALTIME_R */
+#define HAVE_LOCALTIME_R 1

 /* Define to 1 if you have the `mkstemp' function. */
-/* #undef HAVE_MKSTEMP */
+#define HAVE_MKSTEMP 1

 /* Define to 1 if you have the `strtold' function. */
-#define HAVE_STRTOLD 1
+/* #undef HAVE_STRTOLD */

..., accompanied by a few test case regressions, because some of these
hardwired routines are not actually available in the nvptx newlib port.

[Bug libfortran/74755] libgfortran: build breaks if localtime_r prototype is present, but definition is not

2016-08-24 Thread cesar at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=74755

--- Comment #2 from cesar at gcc dot gnu.org ---
The target is nvptx-none, specifically when it is built as an offloaded target
for OpenACC. Thomas thinks the problem is in newlib rather than gcc though.

[Bug libfortran/74755] libgfortran: build breaks if localtime_r prototype is present, but definition is not

2016-08-24 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=74755

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2016-08-24
 Ever confirmed|0   |1

--- Comment #1 from Dominique d'Humieres  ---
Target?