aboutsummaryrefslogtreecommitdiff
path: root/sim/ppc
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2009-09-15 23:26:44 +0000
committerDoug Evans <dje@google.com>2009-09-15 23:26:44 +0000
commitbf0275b1b5068b93f517f6fcac7ab4739808558d (patch)
tree3b620e0546a17a46913c213c3843c8fbb1b6b88e /sim/ppc
parent6ae841305ce01cf325992c993fac31abc958622f (diff)
downloadgdb-bf0275b1b5068b93f517f6fcac7ab4739808558d.zip
gdb-bf0275b1b5068b93f517f6fcac7ab4739808558d.tar.gz
gdb-bf0275b1b5068b93f517f6fcac7ab4739808558d.tar.bz2
back out previous patch, replace with
* configure.ac (sim_hwflags): Use AC_DEFINE to define HAVE_UNION_SEMUN. * configure: Regenerate. * config.in: Regenerate. * hw_sem.c: #include "config.h". (HAVE_UNION_SEMUN): Renamed from HAS_UNION_SEMUN.
Diffstat (limited to 'sim/ppc')
-rw-r--r--sim/ppc/ChangeLog7
-rw-r--r--sim/ppc/Makefile.in5
-rw-r--r--sim/ppc/config.in3
-rwxr-xr-xsim/ppc/configure8
-rw-r--r--sim/ppc/configure.ac6
-rw-r--r--sim/ppc/hw_sem.c2
6 files changed, 15 insertions, 16 deletions
diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog
index a50f266..b7ff467 100644
--- a/sim/ppc/ChangeLog
+++ b/sim/ppc/ChangeLog
@@ -1,10 +1,11 @@
2009-09-15 Andreas Tobler <andreast-list@fgznet.ch>
Doug Evans <dje@google.com>
- * configure.ac (sim_hwflags): Clean up definition, AC_SUBST it.
+ * configure.ac (sim_hwflags): Use AC_DEFINE to define HAVE_UNION_SEMUN.
* configure: Regenerate.
- * Makefile.in (SIM_HWFLAGS): New variable.
- (STD_CFLAGS, NOWARN_CFLAGS): Add it.
+ * config.in: Regenerate.
+ * hw_sem.c: #include "config.h".
+ (HAVE_UNION_SEMUN): Renamed from HAS_UNION_SEMUN.
2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in
index db7ff1b..71c65cf 100644
--- a/sim/ppc/Makefile.in
+++ b/sim/ppc/Makefile.in
@@ -70,7 +70,6 @@ MAKEINFO = makeinfo
RANLIB = @RANLIB@
SIM_CFLAGS = @sim_cflags@
-SIM_HWFLAGS = @sim_hwflags@
INLINE_CFLAGS = @sim_inline@
BSWAP_CFLAGS = @sim_bswap@
ENDIAN_CFLAGS = @sim_endian@
@@ -117,8 +116,8 @@ CONFIG_CFLAGS = $(BSWAP_CFLAGS) \
$(DEVZERO_CFLAGS)
SIM_FPU_CFLAGS = @sim_fpu_cflags@
-STD_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(INTL_CFLAGS) $(SIM_FPU_CFLAGS) $(SIM_HWFLAGS)
-NOWARN_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(SIM_FPU_CFLAGS) $(SIM_HWFLAGS)
+STD_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(INTL_CFLAGS) $(SIM_FPU_CFLAGS)
+NOWARN_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(SIM_FPU_CFLAGS)
BUILD_CFLAGS = $(CFLAGS_FOR_BUILD) $(INCLUDES) $(WARNING_CFLAGS)
BUILD_LDFLAGS =
diff --git a/sim/ppc/config.in b/sim/ppc/config.in
index 5a1dc05..86a6825 100644
--- a/sim/ppc/config.in
+++ b/sim/ppc/config.in
@@ -272,6 +272,9 @@
/* Define to 1 if you have the `umask' function. */
#undef HAVE_UMASK
+/* 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 872a9db..abdfdb2 100755
--- a/sim/ppc/configure
+++ b/sim/ppc/configure
@@ -589,7 +589,6 @@ ac_includes_default="\
#endif"
ac_subst_vars='LTLIBOBJS
-sim_hwflags
sim_fpu
sim_fpu_cflags
sim_targ_vals
@@ -3741,9 +3740,9 @@ else
fi
if test x"$ac_cv_has_union_semun" = x"yes" -a x"$ac_cv_sysv_sem" = x"yes" ; then
- sim_hwflags="-DHAS_UNION_SEMUN"
-else
- sim_hwflags=""
+
+$as_echo "#define HAVE_UNION_SEMUN 1" >>confdefs.h
+
fi
@@ -6013,7 +6012,6 @@ fi
-
ac_config_files="$ac_config_files Makefile"
ac_config_commands="$ac_config_commands default"
diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac
index 2dc200c..e8ccfe9 100644
--- a/sim/ppc/configure.ac
+++ b/sim/ppc/configure.ac
@@ -301,9 +301,8 @@ else
fi
if test x"$ac_cv_has_union_semun" = x"yes" -a x"$ac_cv_sysv_sem" = x"yes" ; then
- sim_hwflags="-DHAS_UNION_SEMUN"
-else
- sim_hwflags=""
+ AC_DEFINE(HAVE_UNION_SEMUN, 1,
+ [Define if union semun is defined in <sys/sem.h>])
fi
@@ -903,7 +902,6 @@ AC_SUBST(sim_callback)
AC_SUBST(sim_targ_vals)
AC_SUBST(sim_fpu_cflags)
AC_SUBST(sim_fpu)
-AC_SUBST(sim_hwflags)
AC_OUTPUT(Makefile,
[case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac])
diff --git a/sim/ppc/hw_sem.c b/sim/ppc/hw_sem.c
index 28e0c17..a7d618b 100644
--- a/sim/ppc/hw_sem.c
+++ b/sim/ppc/hw_sem.c
@@ -100,7 +100,7 @@ typedef struct _hw_sem_device {
int count;
} hw_sem_device;
-#if !HAS_UNION_SEMUN
+#ifndef HAVE_UNION_SEMUN
union semun {
int val;
struct semid_ds *buf;