public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Merge autoconf / automake update changes from GCC.
@ 2022-01-17  8:45 Mike Frysinger
  2022-01-17  9:30 ` Corinna Vinschen
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2022-01-17  8:45 UTC (permalink / raw)
  To: newlib

From: Joseph Myers <joseph@codesourcery.com>

Top level:
	Merge from GCC:
	PR bootstrap/82856
	* multilib.am: New file.  From automake.

config:
	Merge from GCC:
	PR bootstrap/82856
	* math.m4, tls.m4: Use AC_LANG_SOURCE.

zlib:
	Merge from GCC.
	PR bootstrap/82856
	* Makefile.am: Include multilib.am.
	* Makefile.in: Regenerate.
---
 config/math.m4 |  4 ++--
 config/tls.m4  | 14 +++++++-------
 multilib.am    | 45 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 54 insertions(+), 9 deletions(-)
 create mode 100644 multilib.am

diff --git a/config/math.m4 b/config/math.m4
index 23835f230cb4..155967e5071f 100644
--- a/config/math.m4
+++ b/config/math.m4
@@ -25,7 +25,7 @@ AC_DEFUN([GCC_CHECK_MATH_FUNC],
   AC_REQUIRE([GCC_CHECK_LIBM])
   AC_REQUIRE([GCC_CHECK_MATH_HEADERS])
   AC_CACHE_CHECK([for $1], [gcc_cv_math_func_$1],
-		 [AC_LINK_IFELSE([
+		 [AC_LINK_IFELSE([AC_LANG_SOURCE([
 #ifdef HAVE_COMPLEX_H
 #include <complex.h>
 #endif
@@ -40,7 +40,7 @@ main ()
 {
   return 0;
 }
-],
+])],
 [gcc_cv_math_func_$1=yes],
 [gcc_cv_math_func_$1=no])])
   if test $gcc_cv_math_func_$1 = yes; then
diff --git a/config/tls.m4 b/config/tls.m4
index 4e170c8d6aec..1a5fc59c2b4e 100644
--- a/config/tls.m4
+++ b/config/tls.m4
@@ -4,14 +4,14 @@ AC_DEFUN([GCC_CHECK_TLS], [
   GCC_ENABLE(tls, yes, [], [Use thread-local storage])
   AC_CACHE_CHECK([whether the target supports thread-local storage],
 		 gcc_cv_have_tls, [
-    AC_RUN_IFELSE([__thread int a; int b; int main() { return a = b; }],
+    AC_RUN_IFELSE([AC_LANG_SOURCE([__thread int a; int b; int main() { return a = b; }])],
       [dnl If the test case passed with dynamic linking, try again with
        dnl static linking, but only if static linking is supported (not
        dnl on Solaris 10).  This fails with some older Red Hat releases.
       chktls_save_LDFLAGS="$LDFLAGS"
       LDFLAGS="-static $LDFLAGS"
-      AC_LINK_IFELSE([int main() { return 0; }],
-	[AC_RUN_IFELSE([__thread int a; int b; int main() { return a = b; }],
+      AC_LINK_IFELSE([AC_LANG_SOURCE([int main() { return 0; }])],
+	[AC_RUN_IFELSE([AC_LANG_SOURCE([__thread int a; int b; int main() { return a = b; }])],
 		       [gcc_cv_have_tls=yes], [gcc_cv_have_tls=no],[])],
 	[gcc_cv_have_tls=yes])
       LDFLAGS="$chktls_save_LDFLAGS"
@@ -71,7 +71,7 @@ AC_DEFUN([GCC_CHECK_TLS], [
       [gcc_cv_have_tls=no],
       [dnl This is the cross-compiling case. Assume libc supports TLS if the
        dnl binutils and the compiler do.
-       AC_LINK_IFELSE([__thread int a; int b; int main() { return a = b; }],
+       AC_LINK_IFELSE([AC_LANG_SOURCE([__thread int a; int b; int main() { return a = b; }])],
 	 [chktls_save_LDFLAGS="$LDFLAGS"
 	  dnl Shared library options may depend on the host; this check
 	  dnl is only known to be needed for GNU/Linux.
@@ -83,8 +83,8 @@ AC_DEFUN([GCC_CHECK_TLS], [
 	  chktls_save_CFLAGS="$CFLAGS"
 	  CFLAGS="-fPIC $CFLAGS"
 	  dnl If -shared works, test if TLS works in a shared library.
-	  AC_LINK_IFELSE([int f() { return 0; }],
-	    [AC_LINK_IFELSE([__thread int a; int b; int f() { return a = b; }],
+	  AC_LINK_IFELSE([AC_LANG_SOURCE([int f() { return 0; }])],
+	    [AC_LINK_IFELSE([AC_LANG_SOURCE([__thread int a; int b; int f() { return a = b; }])],
 	      [gcc_cv_have_tls=yes],
 	      [gcc_cv_have_tls=no])],
 	    [gcc_cv_have_tls=yes])
@@ -102,7 +102,7 @@ AC_DEFUN([GCC_CHECK_CC_TLS], [
   GCC_ENABLE(tls, yes, [], [Use thread-local storage])
   AC_CACHE_CHECK([whether the target assembler supports thread-local storage],
 		 gcc_cv_have_cc_tls, [
-    AC_COMPILE_IFELSE([__thread int a; int b; int main() { return a = b; }],
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([__thread int a; int b; int main() { return a = b; }])],
       [gcc_cv_have_cc_tls=yes], [gcc_cv_have_cc_tls=no])]
     )])
   if test "$enable_tls $gcc_cv_have_cc_tls" = "yes yes"; then
diff --git a/multilib.am b/multilib.am
new file mode 100644
index 000000000000..5c98b69bd630
--- /dev/null
+++ b/multilib.am
@@ -0,0 +1,45 @@
+## automake - create Makefile.in from Makefile.am
+
+## Copyright (C) 1994-2017 Free Software Foundation, Inc.
+## This Makefile.in is free software; the Free Software Foundation
+## gives unlimited permission to copy and/or distribute it,
+## with or without modifications, as long as this notice is preserved.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+
+MULTISRCTOP =
+MULTIBUILDTOP =
+MULTIDIRS =
+MULTISUBDIR =
+MULTIDO = true
+MULTICLEAN = true
+
+# GNU Make needs to see an explicit $(MAKE) variable in the command it
+# runs to enable its job server during parallel builds.  Hence the
+# comments below.
+all-multi:
+	$(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do # $(MAKE)
+install-multi:
+	$(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do # $(MAKE)
+mostlyclean-multi:
+	$(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean # $(MAKE)
+clean-multi:
+	$(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean # $(MAKE)
+distclean-multi:
+	$(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean # $(MAKE)
+maintainer-clean-multi:
+	$(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean # $(MAKE)
+
+.MAKE .PHONY: all-multi clean-multi distclean-multi install-am \
+	      install-multi maintainer-clean-multi mostlyclean-multi
+
+install-exec-local: install-multi
+
+all-local: all-multi
+mostlyclean-local: mostlyclean-multi
+clean-local: clean-multi
+distclean-local: distclean-multi
+maintainer-clean-local: maintainer-clean-multi
-- 
2.33.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Merge autoconf / automake update changes from GCC.
  2022-01-17  8:45 [PATCH] Merge autoconf / automake update changes from GCC Mike Frysinger
@ 2022-01-17  9:30 ` Corinna Vinschen
  0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2022-01-17  9:30 UTC (permalink / raw)
  To: newlib

On Jan 17 03:45, Mike Frysinger wrote:
> From: Joseph Myers <joseph@codesourcery.com>
> 
> Top level:
> 	Merge from GCC:
> 	PR bootstrap/82856
> 	* multilib.am: New file.  From automake.
> 
> config:
> 	Merge from GCC:
> 	PR bootstrap/82856
> 	* math.m4, tls.m4: Use AC_LANG_SOURCE.
> 
> zlib:
> 	Merge from GCC.
> 	PR bootstrap/82856
> 	* Makefile.am: Include multilib.am.
> 	* Makefile.in: Regenerate.
> ---
>  config/math.m4 |  4 ++--
>  config/tls.m4  | 14 +++++++-------
>  multilib.am    | 45 +++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 54 insertions(+), 9 deletions(-)
>  create mode 100644 multilib.am

GTG.


Thanks,
Corinna


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-17  9:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-17  8:45 [PATCH] Merge autoconf / automake update changes from GCC Mike Frysinger
2022-01-17  9:30 ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).