Impport libiberty commit: 885b6660c17f from gcc mainline. Fix gas's acinclude.m4 to stop a potwntial configure time warning message.

This commit is contained in:
Nick Clifton 2022-11-24 12:30:22 +00:00
parent ffbbab0b3a
commit 0075c53724
4 changed files with 24 additions and 6 deletions

View file

@ -23,6 +23,7 @@ AC_DEFUN([GAS_WORKING_ASSERT],
[AC_MSG_CHECKING([for working assert macro]) [AC_MSG_CHECKING([for working assert macro])
AC_CACHE_VAL(gas_cv_assert_ok, AC_CACHE_VAL(gas_cv_assert_ok,
AC_TRY_LINK([#include <assert.h> AC_TRY_LINK([#include <assert.h>
#include <string.h>
#include <stdio.h>], [ #include <stdio.h>], [
/* check for requoting problems */ /* check for requoting problems */
static int a, b, c, d; static int a, b, c, d;

1
gas/configure vendored
View file

@ -13791,6 +13791,7 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <assert.h> #include <assert.h>
#include <string.h>
#include <stdio.h> #include <stdio.h>
int int
main () main ()

View file

@ -24,6 +24,8 @@ AC_CACHE_CHECK([for working strncmp], ac_cv_func_strncmp_works,
[AC_TRY_RUN([ [AC_TRY_RUN([
/* Test by Jim Wilson and Kaveh Ghazi. /* Test by Jim Wilson and Kaveh Ghazi.
Check whether strncmp reads past the end of its string parameters. */ Check whether strncmp reads past the end of its string parameters. */
#include <stdlib.h>
#include <string.h>
#include <sys/types.h> #include <sys/types.h>
#ifdef HAVE_FCNTL_H #ifdef HAVE_FCNTL_H
@ -51,7 +53,8 @@ AC_CACHE_CHECK([for working strncmp], ac_cv_func_strncmp_works,
#define MAP_LEN 0x10000 #define MAP_LEN 0x10000
main () int
main (void)
{ {
#if defined(HAVE_MMAP) || defined(HAVE_MMAP_ANYWHERE) #if defined(HAVE_MMAP) || defined(HAVE_MMAP_ANYWHERE)
char *p; char *p;
@ -157,7 +160,10 @@ if test $ac_cv_os_cray = yes; then
fi fi
AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction, AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
[AC_TRY_RUN([find_stack_direction () [AC_TRY_RUN([#include <stdlib.h>
int
find_stack_direction (void)
{ {
static char *addr = 0; static char *addr = 0;
auto char dummy; auto char dummy;
@ -169,7 +175,9 @@ AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
else else
return (&dummy > addr) ? 1 : -1; return (&dummy > addr) ? 1 : -1;
} }
main ()
int
main (void)
{ {
exit (find_stack_direction() < 0); exit (find_stack_direction() < 0);
}], }],

14
libiberty/configure vendored
View file

@ -6919,7 +6919,10 @@ else
else else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
find_stack_direction () #include <stdlib.h>
int
find_stack_direction (void)
{ {
static char *addr = 0; static char *addr = 0;
auto char dummy; auto char dummy;
@ -6931,7 +6934,9 @@ find_stack_direction ()
else else
return (&dummy > addr) ? 1 : -1; return (&dummy > addr) ? 1 : -1;
} }
main ()
int
main (void)
{ {
exit (find_stack_direction() < 0); exit (find_stack_direction() < 0);
} }
@ -7756,6 +7761,8 @@ else
/* Test by Jim Wilson and Kaveh Ghazi. /* Test by Jim Wilson and Kaveh Ghazi.
Check whether strncmp reads past the end of its string parameters. */ Check whether strncmp reads past the end of its string parameters. */
#include <stdlib.h>
#include <string.h>
#include <sys/types.h> #include <sys/types.h>
#ifdef HAVE_FCNTL_H #ifdef HAVE_FCNTL_H
@ -7783,7 +7790,8 @@ else
#define MAP_LEN 0x10000 #define MAP_LEN 0x10000
main () int
main (void)
{ {
#if defined(HAVE_MMAP) || defined(HAVE_MMAP_ANYWHERE) #if defined(HAVE_MMAP) || defined(HAVE_MMAP_ANYWHERE)
char *p; char *p;