gcc/libgfortran
Janne Blomqvist d86e68e207 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.

Regtested on x86_64-pc-linux-gnu.

2017-05-11  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: r247927
2017-05-11 23:04:53 +03:00
..
caf check.c (positive_check): Add new function checking constant for being greater then zero. 2017-03-05 12:35:47 +01:00
config
generated re PR target/80687 (VLA usage in libgfortran; nvptx target: "sorry, unimplemented: target cannot support alloca") 2017-05-10 15:45:52 +00:00
ieee
intrinsics Don't use Win32 functions on CYGWIN. 2017-03-15 15:46:35 +02:00
io close.c: Fix white space in pointer declarations and comment formats where applicable. 2017-04-11 14:51:25 +00:00
m4 re PR target/80687 (VLA usage in libgfortran; nvptx target: "sorry, unimplemented: target cannot support alloca") 2017-05-10 15:45:52 +00:00
runtime Don't assume __secure_getenv is available 2017-05-11 23:04:53 +03:00
acinclude.m4
aclocal.m4
c99_protos.h
ChangeLog Don't assume __secure_getenv is available 2017-05-11 23:04:53 +03:00
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog-2015
ChangeLog-2016
config.h.in
configure
configure.ac
configure.host
gfortran.map
kinds-override.h
libgfortran.h Don't assume __secure_getenv is available 2017-05-11 23:04:53 +03:00
libgfortran.spec.in
libtool-version
Makefile.am
Makefile.in re PR libfortran/80602 (Reduce stack usage for blocked matmul) 2017-05-08 17:56:13 +00:00
mk-kinds-h.sh
mk-sik-inc.sh
mk-srk-inc.sh