Florian Weimer 2022-12-03 12:36:08 +01:00
parent 8edd49ad7f
commit 3aac8d8e5b
4 changed files with 202 additions and 0 deletions

View File

@ -0,0 +1,163 @@
aclocal_cc.m4: Remove use of implicit int from weak symbol checks
Implicit int is no longer part of the C language since the 1999
revision.
Submitted upstream: <https://github.com/pmodels/mpich/pull/6301>
diff --git a/confdb/aclocal_cc.m4 b/confdb/aclocal_cc.m4
index 36b44216d36dd8db..cafb5a6ae137f750 100644
--- a/confdb/aclocal_cc.m4
+++ b/confdb/aclocal_cc.m4
@@ -388,7 +388,7 @@ AC_CACHE_CHECK([for multiple weak symbol support], pac_cv_prog_c_multiple_weak_s
#pragma weak PFoo_ = Foo
#pragma weak pfoo_ = Foo
int Foo(int);
- int Foo(a) { return a; }
+ int Foo(int a) { return a; }
]])],[AC_LANG_SOURCE([[
extern int PFoo(int), PFoo_(int), pfoo_(int);
int main() {
diff --git a/modules/json-c/autoconf-archive/m4/aclocal_cc.m4 b/modules/json-c/autoconf-archive/m4/aclocal_cc.m4
index 8a1552d561306f24..cd28a4f937eaf824 100644
--- a/modules/json-c/autoconf-archive/m4/aclocal_cc.m4
+++ b/modules/json-c/autoconf-archive/m4/aclocal_cc.m4
@@ -383,7 +383,7 @@ extern int pfoo_(int);
#pragma weak PFoo_ = Foo
#pragma weak pfoo_ = Foo
int Foo(int);
-int Foo(a) { return a; }
+int Foo(int a) { return a; }
])
],[
AC_LANG_SOURCE([
diff --git a/modules/yaksa/m4/aclocal_cc.m4 b/modules/yaksa/m4/aclocal_cc.m4
index d15d6741602daf07..9fcf48527653ff01 100644
--- a/modules/yaksa/m4/aclocal_cc.m4
+++ b/modules/yaksa/m4/aclocal_cc.m4
@@ -422,7 +422,7 @@ extern int pfoo_(int);
#pragma weak PFoo_ = Foo
#pragma weak pfoo_ = Foo
int Foo(int);
-int Foo(a) { return a; }
+int Foo(int a) { return a; }
])
],[
AC_LANG_SOURCE([
diff --git a/src/mpi/romio/confdb/aclocal_cc.m4 b/src/mpi/romio/confdb/aclocal_cc.m4
index 36b44216d36dd8db..cafb5a6ae137f750 100644
--- a/src/mpi/romio/confdb/aclocal_cc.m4
+++ b/src/mpi/romio/confdb/aclocal_cc.m4
@@ -388,7 +388,7 @@ AC_CACHE_CHECK([for multiple weak symbol support], pac_cv_prog_c_multiple_weak_s
#pragma weak PFoo_ = Foo
#pragma weak pfoo_ = Foo
int Foo(int);
- int Foo(a) { return a; }
+ int Foo(int a) { return a; }
]])],[AC_LANG_SOURCE([[
extern int PFoo(int), PFoo_(int), pfoo_(int);
int main() {
diff --git a/src/mpi/romio/mpl/confdb/aclocal_cc.m4 b/src/mpi/romio/mpl/confdb/aclocal_cc.m4
index 36b44216d36dd8db..cafb5a6ae137f750 100644
--- a/src/mpi/romio/mpl/confdb/aclocal_cc.m4
+++ b/src/mpi/romio/mpl/confdb/aclocal_cc.m4
@@ -388,7 +388,7 @@ AC_CACHE_CHECK([for multiple weak symbol support], pac_cv_prog_c_multiple_weak_s
#pragma weak PFoo_ = Foo
#pragma weak pfoo_ = Foo
int Foo(int);
- int Foo(a) { return a; }
+ int Foo(int a) { return a; }
]])],[AC_LANG_SOURCE([[
extern int PFoo(int), PFoo_(int), pfoo_(int);
int main() {
diff --git a/src/mpl/confdb/aclocal_cc.m4 b/src/mpl/confdb/aclocal_cc.m4
index 36b44216d36dd8db..cafb5a6ae137f750 100644
--- a/src/mpl/confdb/aclocal_cc.m4
+++ b/src/mpl/confdb/aclocal_cc.m4
@@ -388,7 +388,7 @@ AC_CACHE_CHECK([for multiple weak symbol support], pac_cv_prog_c_multiple_weak_s
#pragma weak PFoo_ = Foo
#pragma weak pfoo_ = Foo
int Foo(int);
- int Foo(a) { return a; }
+ int Foo(int a) { return a; }
]])],[AC_LANG_SOURCE([[
extern int PFoo(int), PFoo_(int), pfoo_(int);
int main() {
diff --git a/src/pm/hydra/confdb/aclocal_cc.m4 b/src/pm/hydra/confdb/aclocal_cc.m4
index 36b44216d36dd8db..cafb5a6ae137f750 100644
--- a/src/pm/hydra/confdb/aclocal_cc.m4
+++ b/src/pm/hydra/confdb/aclocal_cc.m4
@@ -388,7 +388,7 @@ AC_CACHE_CHECK([for multiple weak symbol support], pac_cv_prog_c_multiple_weak_s
#pragma weak PFoo_ = Foo
#pragma weak pfoo_ = Foo
int Foo(int);
- int Foo(a) { return a; }
+ int Foo(int a) { return a; }
]])],[AC_LANG_SOURCE([[
extern int PFoo(int), PFoo_(int), pfoo_(int);
int main() {
diff --git a/src/pm/hydra/mpl/confdb/aclocal_cc.m4 b/src/pm/hydra/mpl/confdb/aclocal_cc.m4
index 36b44216d36dd8db..cafb5a6ae137f750 100644
--- a/src/pm/hydra/mpl/confdb/aclocal_cc.m4
+++ b/src/pm/hydra/mpl/confdb/aclocal_cc.m4
@@ -388,7 +388,7 @@ AC_CACHE_CHECK([for multiple weak symbol support], pac_cv_prog_c_multiple_weak_s
#pragma weak PFoo_ = Foo
#pragma weak pfoo_ = Foo
int Foo(int);
- int Foo(a) { return a; }
+ int Foo(int a) { return a; }
]])],[AC_LANG_SOURCE([[
extern int PFoo(int), PFoo_(int), pfoo_(int);
int main() {
diff --git a/src/pm/hydra2/confdb/aclocal_cc.m4 b/src/pm/hydra2/confdb/aclocal_cc.m4
index 36b44216d36dd8db..cafb5a6ae137f750 100644
--- a/src/pm/hydra2/confdb/aclocal_cc.m4
+++ b/src/pm/hydra2/confdb/aclocal_cc.m4
@@ -388,7 +388,7 @@ AC_CACHE_CHECK([for multiple weak symbol support], pac_cv_prog_c_multiple_weak_s
#pragma weak PFoo_ = Foo
#pragma weak pfoo_ = Foo
int Foo(int);
- int Foo(a) { return a; }
+ int Foo(int a) { return a; }
]])],[AC_LANG_SOURCE([[
extern int PFoo(int), PFoo_(int), pfoo_(int);
int main() {
diff --git a/src/pm/hydra2/mpl/confdb/aclocal_cc.m4 b/src/pm/hydra2/mpl/confdb/aclocal_cc.m4
index 36b44216d36dd8db..cafb5a6ae137f750 100644
--- a/src/pm/hydra2/mpl/confdb/aclocal_cc.m4
+++ b/src/pm/hydra2/mpl/confdb/aclocal_cc.m4
@@ -388,7 +388,7 @@ AC_CACHE_CHECK([for multiple weak symbol support], pac_cv_prog_c_multiple_weak_s
#pragma weak PFoo_ = Foo
#pragma weak pfoo_ = Foo
int Foo(int);
- int Foo(a) { return a; }
+ int Foo(int a) { return a; }
]])],[AC_LANG_SOURCE([[
extern int PFoo(int), PFoo_(int), pfoo_(int);
int main() {
diff --git a/test/mpi/confdb/aclocal_cc.m4 b/test/mpi/confdb/aclocal_cc.m4
index 36b44216d36dd8db..cafb5a6ae137f750 100644
--- a/test/mpi/confdb/aclocal_cc.m4
+++ b/test/mpi/confdb/aclocal_cc.m4
@@ -388,7 +388,7 @@ AC_CACHE_CHECK([for multiple weak symbol support], pac_cv_prog_c_multiple_weak_s
#pragma weak PFoo_ = Foo
#pragma weak pfoo_ = Foo
int Foo(int);
- int Foo(a) { return a; }
+ int Foo(int a) { return a; }
]])],[AC_LANG_SOURCE([[
extern int PFoo(int), PFoo_(int), pfoo_(int);
int main() {
diff --git a/test/mpi/dtpools/confdb/aclocal_cc.m4 b/test/mpi/dtpools/confdb/aclocal_cc.m4
index 36b44216d36dd8db..cafb5a6ae137f750 100644
--- a/test/mpi/dtpools/confdb/aclocal_cc.m4
+++ b/test/mpi/dtpools/confdb/aclocal_cc.m4
@@ -388,7 +388,7 @@ AC_CACHE_CHECK([for multiple weak symbol support], pac_cv_prog_c_multiple_weak_s
#pragma weak PFoo_ = Foo
#pragma weak pfoo_ = Foo
int Foo(int);
- int Foo(a) { return a; }
+ int Foo(int a) { return a; }
]])],[AC_LANG_SOURCE([[
extern int PFoo(int), PFoo_(int), pfoo_(int);
int main() {

View File

@ -0,0 +1,18 @@
Remove spurious argument to AC_CHECK_ALIGNOF, which caused this
configure test to fail.
Submitted upstream: <https://github.com/pmodels/mpich/pull/6302>
diff --git a/configure.ac b/configure.ac
index 3e2aa2cb7e828675..f76eb49833bb358c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2701,7 +2701,7 @@ if test "$MPID_NO_FLOAT16" != "yes" ; then
fi
# ----------------------------------------------------------------------------
-AC_CHECK_ALIGNOF([max_align_t],[0],[#include <stddef.h>])
+AC_CHECK_ALIGNOF([max_align_t],[#include <stddef.h>])
if test "$ac_cv_alignof_max_align_t" != "0" ; then
AC_DEFINE_UNQUOTED(MAX_ALIGNMENT,$ac_cv_alignof_max_align_t,[Controls byte alignment of structures (for aligning allocated structures)])

View File

@ -0,0 +1,17 @@
Do not call undeclared exit function in __thread support check
Submitted upstream: <https://github.com/pmodels/json-c/pull/2>
diff --git a/modules/json-c/configure.ac b/modules/json-c/configure.ac
index 9eb80bcf1c1d2e62..1511d7def23e8c39 100644
--- a/modules/json-c/configure.ac
+++ b/modules/json-c/configure.ac
@@ -69,7 +69,7 @@ AC_CACHE_CHECK([for __thread support], ac_cv___thread, [dnl
AC_LINK_IFELSE([dnl
AC_LANG_PROGRAM([[#undef __thread
static __thread int a; int foo (int b) { return a + b; }]],
- [[exit (foo (0));]])],
+ [[return foo (0);]])],
ac_cv___thread=yes, ac_cv___thread=no)
])
AS_IF([test "x$ac_cv___thread" != xno],

View File

@ -16,6 +16,10 @@ Patch: 0003-Drop-build-flags-e.g.-specs.-and-lto-from-mpi-wrappe.patch
Patch: 0004-Make-mpich.module-useful.patch
# TODO: submit ^ upstream
Patch: mpich-configure-max_align_t.patch
Patch: mpich-aclocal_cc-implicit-int.patch
Patch: mpich-json-configure-__thread.patch
BuildRequires: make
BuildRequires: autoconf
BuildRequires: automake