diff options
author | Mike Frysinger <vapier@gentoo.org> | 2024-01-01 23:15:46 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2024-01-02 00:29:29 -0500 |
commit | d472066471d9c932cc34e1097a8c53a902781cce (patch) | |
tree | 59013af44a3dfff393d145c31bb6b0bc30bd30f3 /sim/configure | |
parent | bc756034ee870319fffc2b03c3ca18391823b51a (diff) | |
download | gdb-d472066471d9c932cc34e1097a8c53a902781cce.zip gdb-d472066471d9c932cc34e1097a8c53a902781cce.tar.gz 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/configure')
-rwxr-xr-x | sim/configure | 132 |
1 files changed, 130 insertions, 2 deletions
diff --git a/sim/configure b/sim/configure index 9fae4e9..a305986 100755 --- a/sim/configure +++ b/sim/configure @@ -8625,6 +8625,134 @@ _ACEOF fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if union semun defined" >&5 +$as_echo_n "checking if union semun defined... " >&6; } +if ${sim_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 : + sim_cv_has_union_semun="yes" +else + sim_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: $sim_cv_has_union_semun" >&5 +$as_echo "$sim_cv_has_union_semun" >&6; } +if test x"$sim_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 ${sim_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 : + sim_cv_sysv_sem="yes" +else + sim_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: $sim_cv_sysv_sem" >&5 +$as_echo "$sim_cv_sysv_sem" >&6; } +if test x"$sim_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 ${sim_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 : + sim_cv_sysv_shm="yes" +else + sim_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: $sim_cv_sysv_shm" >&5 +$as_echo "$sim_cv_sysv_shm" >&6; } +if test x"$sim_cv_sysv_shm" = x"yes"; then : + +$as_echo "#define HAVE_SYSV_SHM 1" >>confdefs.h + + +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5 $as_echo_n "checking type of array argument to getgroups... " >&6; } if ${ac_cv_type_getgroups+:} false; then : @@ -12292,7 +12420,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12295 "configure" +#line 12423 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12398,7 +12526,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12401 "configure" +#line 12529 "configure" #include "confdefs.h" #if HAVE_DLFCN_H |