gcc/libgfortran
Nick Alcock ab42297456
libtool.m4: fix nm BSD flag detection
Libtool needs to get BSD-format (or MS-format) output out of the system
nm, so that it can scan generated object files for symbol names for
-export-symbols-regex support.  Some nms need specific flags to turn on
BSD-formatted output, so libtool checks for this in its AC_PATH_NM.
Unfortunately the code to do this has a pair of interlocking flaws:

 - it runs the test by doing an nm of /dev/null.  Some platforms
   reasonably refuse to do an nm on a device file, but before now this
   has only been worked around by assuming that the error message has a
   specific textual form emitted by Tru64 nm, and that getting this
   error means this is Tru64 nm and that nm -B would work to produce
   BSD-format output, even though the test never actually got anything
   but an error message out of nm -B.  This is fixable by nm'ing *nm
   itself* (since we necessarily have a path to it).

 - the test is entirely skipped if NM is set in the environment, on the
   grounds that the user has overridden the test: but the user cannot
   reasonably be expected to know that libtool wants not only nm but
   also flags forcing BSD-format output.  Worse yet, one such "user" is
   the top-level Cygnus configure script, which neither tests for
   nor specifies any BSD-format flags.  So platforms needing BSD-format
   flags always fail to set them when run in a Cygnus tree, breaking
   -export-symbols-regex on such platforms.  Libtool also needs to
   augment $LD on some platforms, but this is done unconditionally,
   augmenting whatever the user specified: the nm check should do the
   same.

   One wrinkle: if the user has overridden $NM, a path might have been
   provided: so we use the user-specified path if there was one, and
   otherwise do the path search as usual.  (If the nm specified doesn't
   work, this might lead to a few extra pointless path searches -- but
   the test is going to fail anyway, so that's not a problem.)

(Tested with NM unset, and set to nm, /usr/bin/nm, my-nm where my-nm is a
symlink to /usr/bin/nm on the PATH, and /not-on-the-path/my-nm where
*that* is a symlink to /usr/bin/nm.)

ChangeLog:

	* libtool.m4 (LT_PATH_NM): Try BSDization flags with a user-provided
	NM, if there is one.  Run nm on itself, not on /dev/null, to avoid
	errors from nms that refuse to work on non-regular files.  Remove
	other workarounds for this problem.  Strip out blank lines from the
	nm output.

fixincludes/ChangeLog:

	* configure: Regenerate.

gcc/ChangeLog:

	* configure: Regenerate.

libatomic/ChangeLog:

	* configure: Regenerate.

libbacktrace/ChangeLog:

	* configure: Regenerate.

libcc1/ChangeLog:

	* configure: Regenerate.

libffi/ChangeLog:

	* configure: Regenerate.

libgfortran/ChangeLog:

	* configure: Regenerate.

libgm2/ChangeLog:

	* configure: Regenerate.

libgomp/ChangeLog:

	* configure: Regenerate.

libitm/ChangeLog:

	* configure: Regenerate.

libobjc/ChangeLog:

	* configure: Regenerate.

libphobos/ChangeLog:

	* configure: Regenerate.

libquadmath/ChangeLog:

	* configure: Regenerate.

libsanitizer/ChangeLog:

	* configure: Regenerate.

libssp/ChangeLog:

	* configure: Regenerate.

libstdc++-v3/ChangeLog:

	* configure: Regenerate.

libvtv/ChangeLog:

	* configure: Regenerate.

lto-plugin/ChangeLog:

	* configure: Regenerate.

zlib/ChangeLog:

	* configure: Regenerate.
2023-08-07 22:59:39 +02:00
..
caf fortran: Fix coding style around free() 2023-05-08 10:46:47 +02:00
config Update copyright years. 2023-01-16 11:52:17 +01:00
generated Fortran: Eliminate nuisance warnings by initializing. 2023-02-27 18:02:59 -08:00
ieee libfortran: Fix build for targets that don't have 10byte or 16 byte floating point 2023-07-21 05:30:28 +00:00
intrinsics Fortran: Eliminate nuisance warnings by initializing. 2023-02-27 18:02:59 -08:00
io Fortran: Initialize last_char for internal units. 2023-05-12 13:40:41 -07:00
m4 Fortran: Eliminate nuisance warnings by initializing. 2023-02-27 18:02:59 -08:00
runtime Update copyright years. 2023-01-16 11:52:17 +01:00
acinclude.m4 fortran: Add -static-libquadmath support [PR46539] 2022-08-17 17:03:30 +02:00
aclocal.m4
c99_protos.h Update copyright years. 2023-01-16 11:52:17 +01:00
ChangeLog Daily bump. 2023-07-22 00:17:44 +00: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
ChangeLog-2017
ChangeLog-2018
ChangeLog-2019
ChangeLog-2020
ChangeLog-2021 Rotate ChangeLog files - part 1 - add ChangeLog-2021. 2022-01-03 10:18:16 +01:00
ChangeLog-2022 Rotate ChangeLog files. 2023-01-01 16:20:13 +01:00
config.h.in libgfortran: Fix up LIBGFOR_CHECK_FLOAT128 [PR106137] 2022-06-29 17:04:50 +02:00
configure libtool.m4: fix nm BSD flag detection 2023-08-07 22:59:39 +02:00
configure.ac libgfortran: remove support for --enable-intermodule 2023-06-11 15:34:07 +02:00
configure.host Fortran: add support for IEEE intrinsics on aarch64 non-glibc targets 2021-12-20 00:49:10 +01:00
gfortran.map Fortran: add symbols in version map for IEEE_GET_MODES and IEEE_SET_MODES 2022-09-21 10:04:22 +02:00
ISO_Fortran_binding.h Update copyright years. 2023-01-16 11:52:17 +01:00
kinds-override.h Update copyright years. 2023-01-16 11:52:17 +01:00
libgfortran.h Update copyright years. 2023-01-16 11:52:17 +01:00
libgfortran.spec.in libgfortran: Use the libtool macro to determine libm availability. 2021-08-27 16:50:19 +01:00
libtool-version
Makefile.am libgfortran: remove support for --enable-intermodule 2023-06-11 15:34:07 +02:00
Makefile.in libgfortran: remove support for --enable-intermodule 2023-06-11 15:34:07 +02:00
mk-kinds-h.sh libgfortran: Switch some more __float128 uses to _Float128 2022-06-29 17:06:02 +02:00
mk-sik-inc.sh
mk-srk-inc.sh