aboutsummaryrefslogtreecommitdiff
path: root/sim/ppc
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2024-01-01 23:15:46 -0500
committerMike Frysinger <vapier@gentoo.org>2024-01-02 00:29:29 -0500
commitd472066471d9c932cc34e1097a8c53a902781cce (patch)
tree59013af44a3dfff393d145c31bb6b0bc30bd30f3 /sim/ppc
parentbc756034ee870319fffc2b03c3ca18391823b51a (diff)
downloadfsf-binutils-gdb-d472066471d9c932cc34e1097a8c53a902781cce.zip
fsf-binutils-gdb-d472066471d9c932cc34e1097a8c53a902781cce.tar.gz
fsf-binutils-gdb-d472066471d9c932cc34e1097a8c53a902781cce.tar.bz2
sim: ppc: hoist sysv tests to top-level
Now that the sysv tests turn into config.h defines and everything checks that, we can move the tests to the top-level and out of the ppc subdir.
Diffstat (limited to 'sim/ppc')
-rw-r--r--sim/ppc/config.in9
-rwxr-xr-xsim/ppc/configure127
-rw-r--r--sim/ppc/configure.ac54
3 files changed, 1 insertions, 189 deletions
diff --git a/sim/ppc/config.in b/sim/ppc/config.in
index c1105f2..9e3d284 100644
--- a/sim/ppc/config.in
+++ b/sim/ppc/config.in
@@ -24,21 +24,12 @@
/* Define if struct statfs is defined in <sys/mount.h> */
#undef HAVE_STRUCT_STATFS
-/* Define if System V semaphores are supported */
-#undef HAVE_SYSV_SEM
-
-/* Define if System V shared memory is supported */
-#undef HAVE_SYSV_SHM
-
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
-/* Define if union semun is defined in <sys/sem.h> */
-#undef HAVE_UNION_SEMUN
-
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
diff --git a/sim/ppc/configure b/sim/ppc/configure
index ab90860..e945220 100755
--- a/sim/ppc/configure
+++ b/sim/ppc/configure
@@ -3142,132 +3142,6 @@ esac
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if union semun defined" >&5
-$as_echo_n "checking if union semun defined... " >&6; }
-if ${ac_cv_has_union_semun+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/sem.h>
-int
-main ()
-{
-union semun arg ;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_has_union_semun="yes"
-else
- ac_cv_has_union_semun="no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_union_semun" >&5
-$as_echo "$ac_cv_has_union_semun" >&6; }
-if test x"$ac_cv_has_union_semun" = x"yes"; then :
-
-$as_echo "#define HAVE_UNION_SEMUN 1" >>confdefs.h
-
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether System V semaphores are supported" >&5
-$as_echo_n "checking whether System V semaphores are supported... " >&6; }
-if ${ac_cv_sysv_sem+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #include <sys/types.h>
- #include <sys/ipc.h>
- #include <sys/sem.h>
-#ifndef HAVE_UNION_SEMUN
- union semun {
- int val;
- struct semid_ds *buf;
- ushort *array;
- };
-#endif
-int
-main ()
-{
-
- union semun arg;
- int id = semget(IPC_PRIVATE, 1, IPC_CREAT|0400);
- if (id == -1)
- return 1;
- arg.val = 0; /* avoid implicit type cast to union */
- if (semctl(id, 0, IPC_RMID, arg) == -1)
- return 1;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_sysv_sem="yes"
-else
- ac_cv_sysv_sem="no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sysv_sem" >&5
-$as_echo "$ac_cv_sysv_sem" >&6; }
-if test x"$ac_cv_sysv_sem" = x"yes"; then :
-
-$as_echo "#define HAVE_SYSV_SEM 1" >>confdefs.h
-
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether System V shared memory is supported" >&5
-$as_echo_n "checking whether System V shared memory is supported... " >&6; }
-if ${ac_cv_sysv_shm+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/shm.h>
-int
-main ()
-{
-
- int id = shmget(IPC_PRIVATE, 1, IPC_CREAT|0400);
- if (id == -1)
- return 1;
- if (shmctl(id, IPC_RMID, 0) == -1)
- return 1;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_sysv_shm="yes"
-else
- ac_cv_sysv_shm="no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sysv_shm" >&5
-$as_echo "$ac_cv_sysv_shm" >&6; }
-if test x"$ac_cv_sysv_shm" = x"yes"; then :
-
-$as_echo "#define HAVE_SYSV_SHM 1" >>confdefs.h
-
-
-fi
-
# Check whether --enable-sim-hardware was given.
if test "${enable_sim_hardware+set}" = set; then :
enableval=$enable_sim_hardware; hardware="cpu,memory,nvram,iobus,htab,disk,trace,register,vm,init,core,pal,com,eeprom,opic,glue,phb,ide,sem,shm"
@@ -3499,6 +3373,7 @@ ac_config_headers="$ac_config_headers config.h:config.in"
sim_termio=""
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct termios" >&5
$as_echo_n "checking for struct termios... " >&6; }
+
if ${ac_cv_termios_struct+:} false; then :
$as_echo_n "(cached) " >&6
else
diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac
index 9b01aed..06be2c9 100644
--- a/sim/ppc/configure.ac
+++ b/sim/ppc/configure.ac
@@ -96,60 +96,6 @@ case "${target}" in
esac
])dnl
-AC_CACHE_CHECK([if union semun defined],
- [ac_cv_has_union_semun],
- [AC_TRY_COMPILE([
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/sem.h>],
-[union semun arg ;],
-[ac_cv_has_union_semun="yes"],
-[ac_cv_has_union_semun="no"])])
-AS_IF([test x"$ac_cv_has_union_semun" = x"yes"], [dnl
- AC_DEFINE(HAVE_UNION_SEMUN, 1,
- [Define if union semun is defined in <sys/sem.h>])
-])
-
-AC_CACHE_CHECK([whether System V semaphores are supported],
- [ac_cv_sysv_sem],
- [AC_TRY_COMPILE([
- #include <sys/types.h>
- #include <sys/ipc.h>
- #include <sys/sem.h>
-#ifndef HAVE_UNION_SEMUN
- union semun {
- int val;
- struct semid_ds *buf;
- ushort *array;
- };
-#endif], [
- union semun arg;
- int id = semget(IPC_PRIVATE, 1, IPC_CREAT|0400);
- if (id == -1)
- return 1;
- arg.val = 0; /* avoid implicit type cast to union */
- if (semctl(id, 0, IPC_RMID, arg) == -1)
- return 1;
-], [ac_cv_sysv_sem="yes"], [ac_cv_sysv_sem="no"])])
-AS_IF([test x"$ac_cv_sysv_sem" = x"yes"], [dnl
- AC_DEFINE(HAVE_SYSV_SEM, 1, [Define if System V semaphores are supported])
-])
-
-AC_CACHE_CHECK(whether System V shared memory is supported,
-ac_cv_sysv_shm,
-[AC_TRY_COMPILE([
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/shm.h>], [
- int id = shmget(IPC_PRIVATE, 1, IPC_CREAT|0400);
- if (id == -1)
- return 1;
- if (shmctl(id, IPC_RMID, 0) == -1)
- return 1;
-], [ac_cv_sysv_shm="yes"], [ac_cv_sysv_shm="no"])])
-AS_IF([test x"$ac_cv_sysv_shm" = x"yes"], [dnl
- AC_DEFINE(HAVE_SYSV_SHM, 1, [Define if System V shared memory is supported])
-])
AC_ARG_ENABLE(sim-hardware,
[ --enable-sim-hardware=list Specify the hardware to be included in the build.],