gcc/libgfortran/runtime
Janne Blomqvist 563a18bc20 Don't assume __secure_getenv is available
Glibc 2.17 made __secure_getenv an officially supported function, and
renamed it secure_getenv. The libgfortran configure has checked for
both of these, per
https://sourceware.org/glibc/wiki/Tips_and_Tricks/secure_getenv.

Unfortunately, while the dynamical library (libc.so) retains the
__secure_getenv symbol for backwards compatibility, the static library
(libc.a) does not. This means that a libgfortran.a compiled against an
older glibc will not work if one tries to link against a newer
libc.a. This creates problems for providing gfortran binary
distributions that work on as many target systems as possible.

Thus, retain the support for __secure_getenv but call it only via a
weak reference.

Backported from trunk.

2017-05-19  Janne Blomqvist  <jb@gcc.gnu.org>

	* libgfortran.h: HAVE_SECURE_GETENV: Don't check
	HAVE___SECURE_GETENV.
	* environ/runtime.c (secure_getenv): Use __secure_getenv via a
        weak reference.

From-SVN: r248273
2017-05-19 16:25:21 +03:00
..
backtrace.c Update copyright years. 2017-01-01 13:07:43 +01:00
bounds.c Update copyright years. 2017-01-01 13:07:43 +01:00
compile_options.c Update copyright years. 2017-01-01 13:07:43 +01:00
convert_char.c Update copyright years. 2017-01-01 13:07:43 +01:00
environ.c Don't assume __secure_getenv is available 2017-05-19 16:25:21 +03:00
error.c Update copyright years. 2017-01-01 13:07:43 +01:00
fpu.c Update copyright years. 2017-01-01 13:07:43 +01:00
in_pack_generic.c Update copyright years. 2017-01-01 13:07:43 +01:00
in_unpack_generic.c Update copyright years. 2017-01-01 13:07:43 +01:00
main.c Update copyright years. 2017-01-01 13:07:43 +01:00
memory.c Update copyright years. 2017-01-01 13:07:43 +01:00
minimal.c Update copyright years. 2017-01-01 13:07:43 +01:00
pause.c Update copyright years. 2017-01-01 13:07:43 +01:00
select_inc.c Update copyright years. 2017-01-01 13:07:43 +01:00
select.c Update copyright years. 2017-01-01 13:07:43 +01:00
stop.c Update copyright years. 2017-01-01 13:07:43 +01:00
string.c Update copyright years. 2017-01-01 13:07:43 +01:00