[PATCH/committed] sim: switch to AC_CHECK_FUNCS_ONCE & merge a little
Mike Frysinger
vapier@gentoo.org
Mon Apr 19 01:56:55 GMT 2021
This avoids duplicate tests for functions between common m4, arches,
and any other sources that would trigger func tests.
Also manually delete known duplicate function tests between the m4,
bfin, and v850 ports.
---
sim/ChangeLog | 5 ++
sim/aarch64/ChangeLog | 4 ++
sim/aarch64/configure | 73 +++++++++++++++--------
sim/arm/ChangeLog | 4 ++
sim/arm/configure | 73 +++++++++++++++--------
sim/avr/ChangeLog | 4 ++
sim/avr/configure | 73 +++++++++++++++--------
sim/bfin/ChangeLog | 6 ++
sim/bfin/configure | 106 +++++++++++++++++++++++-----------
sim/bfin/configure.ac | 2 +-
sim/bpf/ChangeLog | 4 ++
sim/bpf/configure | 73 +++++++++++++++--------
sim/cr16/ChangeLog | 4 ++
sim/cr16/configure | 73 +++++++++++++++--------
sim/cris/ChangeLog | 4 ++
sim/cris/configure | 73 +++++++++++++++--------
sim/d10v/ChangeLog | 4 ++
sim/d10v/configure | 73 +++++++++++++++--------
sim/erc32/ChangeLog | 4 ++
sim/erc32/configure | 73 +++++++++++++++--------
sim/example-synacor/ChangeLog | 4 ++
sim/example-synacor/configure | 73 +++++++++++++++--------
sim/frv/ChangeLog | 4 ++
sim/frv/configure | 73 +++++++++++++++--------
sim/ft32/ChangeLog | 4 ++
sim/ft32/configure | 73 +++++++++++++++--------
sim/h8300/ChangeLog | 4 ++
sim/h8300/configure | 73 +++++++++++++++--------
sim/iq2000/ChangeLog | 4 ++
sim/iq2000/configure | 73 +++++++++++++++--------
sim/lm32/ChangeLog | 4 ++
sim/lm32/configure | 73 +++++++++++++++--------
sim/m32c/ChangeLog | 4 ++
sim/m32c/configure | 73 +++++++++++++++--------
sim/m32r/ChangeLog | 4 ++
sim/m32r/configure | 73 +++++++++++++++--------
sim/m4/sim_ac_common.m4 | 14 ++++-
sim/m68hc11/ChangeLog | 4 ++
sim/m68hc11/configure | 73 +++++++++++++++--------
sim/mcore/ChangeLog | 4 ++
sim/mcore/configure | 73 +++++++++++++++--------
sim/microblaze/ChangeLog | 4 ++
sim/microblaze/configure | 73 +++++++++++++++--------
sim/mips/ChangeLog | 4 ++
sim/mips/configure | 73 +++++++++++++++--------
sim/mn10300/ChangeLog | 4 ++
sim/mn10300/configure | 73 +++++++++++++++--------
sim/moxie/ChangeLog | 4 ++
sim/moxie/configure | 73 +++++++++++++++--------
sim/msp430/ChangeLog | 4 ++
sim/msp430/configure | 73 +++++++++++++++--------
sim/or1k/ChangeLog | 4 ++
sim/or1k/configure | 73 +++++++++++++++--------
sim/pru/ChangeLog | 4 ++
sim/pru/configure | 73 +++++++++++++++--------
sim/riscv/ChangeLog | 4 ++
sim/riscv/configure | 73 +++++++++++++++--------
sim/rl78/ChangeLog | 4 ++
sim/rl78/configure | 73 +++++++++++++++--------
sim/rx/ChangeLog | 4 ++
sim/rx/configure | 73 +++++++++++++++--------
sim/sh/ChangeLog | 4 ++
sim/sh/configure | 73 +++++++++++++++--------
sim/v850/ChangeLog | 6 ++
sim/v850/configure | 100 +++++++++++++++++++++-----------
sim/v850/configure.ac | 2 +-
66 files changed, 1675 insertions(+), 799 deletions(-)
diff --git a/sim/bfin/configure.ac b/sim/bfin/configure.ac
index 0ca02ba78b86..6b15b77d15bc 100644
--- a/sim/bfin/configure.ac
+++ b/sim/bfin/configure.ac
@@ -42,7 +42,7 @@ SIM_AC_OPTION_HARDWARE(yes,,\
eth_phy \
)
-AC_CHECK_FUNCS([getuid getgid geteuid getegid setuid setgid mmap munmap kill pread])
+AC_CHECK_FUNCS_ONCE([getuid getgid geteuid getegid setuid setgid kill pread])
AC_CHECK_HEADERS([ \
linux/if_tun.h \
linux/mii.h \
diff --git a/sim/m4/sim_ac_common.m4 b/sim/m4/sim_ac_common.m4
index 8cb45a8b72a6..78451429a831 100644
--- a/sim/m4/sim_ac_common.m4
+++ b/sim/m4/sim_ac_common.m4
@@ -56,8 +56,18 @@ AC_CHECK_HEADERS(unistd.h)
AC_CHECK_HEADERS(sys/time.h sys/times.h sys/resource.h sys/mman.h)
AC_CHECK_HEADERS(fcntl.h fpu_control.h)
AC_CHECK_HEADERS(dlfcn.h sys/stat.h)
-AC_CHECK_FUNCS(getrusage time sigaction __setfpucw)
-AC_CHECK_FUNCS(mmap munmap lstat truncate ftruncate posix_fallocate)
+AC_CHECK_FUNCS_ONCE(m4_flatten([
+ __setfpucw
+ ftruncate
+ getrusage
+ lstat
+ mmap
+ munmap
+ posix_fallocate
+ sigaction
+ time
+ truncate
+]))
AC_CHECK_MEMBERS([[struct stat.st_dev], [struct stat.st_ino],
[struct stat.st_mode], [struct stat.st_nlink], [struct stat.st_uid],
[struct stat.st_gid], [struct stat.st_rdev], [struct stat.st_size],
diff --git a/sim/v850/configure.ac b/sim/v850/configure.ac
index 47a5d15cbc6c..b2f69c31d8b9 100644
--- a/sim/v850/configure.ac
+++ b/sim/v850/configure.ac
@@ -9,7 +9,7 @@ SIM_AC_OPTION_ALIGNMENT(,NONSTRICT_ALIGNMENT)
SIM_AC_OPTION_RESERVED_BITS
SIM_AC_OPTION_BITSIZE(32,31)
-AC_CHECK_FUNCS(time chmod utime fork execve execv chown)
+AC_CHECK_FUNCS_ONCE(chmod utime fork execve execv chown)
AC_CHECK_HEADERS(utime.h)
SIM_AC_OUTPUT
--
2.30.2
More information about the Gdb-patches
mailing list