]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Add macro definitions that make it possible to do cpu/os/both
authorJulian Seward <jseward@acm.org>
Mon, 2 May 2005 10:25:34 +0000 (10:25 +0000)
committerJulian Seward <jseward@acm.org>
Mon, 2 May 2005 10:25:34 +0000 (10:25 +0000)
ifdeffery in a sane way where it's absolutely unavoidable.  When
building the core, eg on amd64-linux, the following preprocessor
symbols are defined:

   VGA_amd64
   VGO_linux
   VGP_amd64_linux

etc on other platforms.

Also, include/basic_types.h now defines VG_WORDSIZE and this is what
should be used for ifdefs that need to know the host word size.

ifdefs based on the C compilers built-ins such as __amd64__ etc
are deprecated and will be done away with.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3590

Makefile.core-AM_CPPFLAGS.am
coregrind/Makefile.am
include/basic_types.h

index 736bb221119828f7a0e70eabb3a645ef4f57945f..a0b457886bdddd53a67595332b42d3b90ff77dc8 100644 (file)
@@ -8,7 +8,10 @@ add_includes = -I$(top_builddir)/coregrind -I$(top_srcdir)/coregrind \
                -I$(top_srcdir)/include/$(VG_ARCH) \
                -I$(top_srcdir)/include/$(VG_OS) \
                -I$(top_srcdir)/include/$(VG_PLATFORM) \
-               -I@VEX_DIR@/pub
+               -I@VEX_DIR@/pub \
+               -DVGA_$(VG_ARCH)=1 \
+               -DVGO_$(VG_OS)=1 \
+               -DVGP_$(VG_ARCH)_$(VG_OS)=1
 
 AM_CPPFLAGS = $(add_includes)
 AM_CCASFLAGS = $(add_includes) @ARCH_CORE_AM_CCASFLAGS@ -Wa,-gstabs
index 07839aa8239a78227e3d6c40c7323b05f703b890..808a3524adef0494fcc9a4412060a275a1147f63 100644 (file)
@@ -13,8 +13,8 @@ DIST_SUBDIRS = \
        m_sigframe m_aspacemgr demangle .
 
 AM_CPPFLAGS += -DVG_LIBDIR="\"$(valdir)"\" -I$(srcdir)/demangle \
-               -DKICKSTART_BASE=@KICKSTART_BASE@ \
-               -DVG_PLATFORM="$(VG_PLATFORM)"
+               -DKICKSTART_BASE=@KICKSTART_BASE@
+
 AM_CFLAGS = $(WERROR) -Wmissing-prototypes -Winline -Wall -Wshadow -O -g @ARCH_CORE_AM_CFLAGS@
 AM_CFLAGS += -fno-omit-frame-pointer
 
index 728c36763ca9895a18d65c7af40626f19b67557f..913da8fb3bb741b238cb5beedcc603f2b0e01fa7 100644 (file)
@@ -57,6 +57,11 @@ typedef  Word                 SSizeT;     // 32             64
 
 typedef  Word                   OffT;     // 32             64
 
+
+/* This is going to be either 4 or 8. */
+#define VG_WORDSIZE VEX_HOST_WORDSIZE
+
+
 /* ---------------------------------------------------------------------
    non-builtin types
    ------------------------------------------------------------------ */