ftmemsim-valgrind/Makefile.flags.am
Nicholas Nethercote ed322feb84 Rename all the arch/OS/platform-related variables in configure.in to make it
clearer what they mean:
- They all have VGCONF_ prefixes now, to indicate they come out of
  configure.in (and are clearly distinguished from the VGA_/VGO_/VGP_
  #defines passed in to C files).
- The ones that refer to the primary *or* secondary platform have _INCLUDES_
  in them.
- The ones that are in all-caps have a _CAPS suffix.

So, for example, what was VGP_X86_LINUX is now
VGCONF_PLATFORMS_INCLUDE_X86_LINUX, which is more verbose but also a lot
clearer.  The names of the #defines used in the C files (VGA_x86, VGO_linux,
etc) are unchanged.

cputest.c: changed to reflect the Valgrind installation's capabilities,
rather than the machine's capabilities.  In particular, if
--enable-only32bit is used on a 64-bit machine, then this program will claim
to only support 32-bits.  Also use the VGA/VGO/VGP macros which are clearer
than the __i386__ ones.  (This is partially merged from the DARWIN branch.)

configure.in: clean up the comments, distinguish different sections more
clearly, and generally make it more readable.

valgrind.pc.in: try to make this more accurate.  I doubt anyone's using it.
It doesn't appear to be set up to handle dual-architecture builds.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9031
2009-01-22 21:56:32 +00:00

76 lines
3.4 KiB
Makefile

# Baseline flags for all compilations. Aim here is to maximise
# performance and get whatever useful warnings we can out of gcc.
AM_CFLAGS_BASE = -O2 -g -Wmissing-prototypes -Wall -Wshadow \
-Wpointer-arith -Wstrict-prototypes -Wmissing-declarations \
@FLAG_W_NO_FORMAT_ZERO_LENGTH@ \
-fno-strict-aliasing
# These flags are used for building the preload shared objects.
# The aim is to give reasonable performance but also to have good
# stack traces, since users often see stack traces extending
# into (and through) the preloads.
AM_CFLAGS_PIC = -O -g -fpic -fno-omit-frame-pointer -fno-strict-aliasing
# Flags for specific targets
AM_FLAG_M3264_X86_LINUX = @FLAG_M32@
AM_CPPFLAGS_X86_LINUX = $(add_includes_x86_linux)
AM_CFLAGS_X86_LINUX = $(WERROR) @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \
$(AM_CFLAGS_BASE)
AM_CCASFLAGS_X86_LINUX = $(add_includes_x86_linux) @FLAG_M32@ -g
AM_FLAG_M3264_AMD64_LINUX = @FLAG_M64@
AM_CPPFLAGS_AMD64_LINUX = $(add_includes_amd64_linux)
AM_CFLAGS_AMD64_LINUX = $(WERROR) @FLAG_M64@ -fomit-frame-pointer \
@PREFERRED_STACK_BOUNDARY@ $(AM_CFLAGS_BASE)
AM_CCASFLAGS_AMD64_LINUX = $(add_includes_amd64_linux) @FLAG_M64@ -g
AM_FLAG_M3264_PPC32_LINUX = @FLAG_M32@
AM_CPPFLAGS_PPC32_LINUX = $(add_includes_ppc32_linux)
AM_CFLAGS_PPC32_LINUX = $(WERROR) @FLAG_M32@ $(AM_CFLAGS_BASE)
AM_CCASFLAGS_PPC32_LINUX = $(add_includes_ppc32_linux) -Wa,-maltivec @FLAG_M32@ -g
AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@
AM_CPPFLAGS_PPC64_LINUX = $(add_includes_ppc64_linux)
AM_CFLAGS_PPC64_LINUX = $(WERROR) @FLAG_M64@ $(AM_CFLAGS_BASE)
AM_CCASFLAGS_PPC64_LINUX = $(add_includes_ppc64_linux) -Wa,-maltivec @FLAG_M64@ -g
AM_FLAG_M3264_PPC32_AIX5 = @FLAG_MAIX32@
AM_CPPFLAGS_PPC32_AIX5 = $(add_includes_ppc32_aix5)
AM_CFLAGS_PPC32_AIX5 = $(WERROR) @FLAG_MAIX32@ -mcpu=powerpc $(AM_CFLAGS_BASE)
AM_CCASFLAGS_PPC32_AIX5 = $(add_includes_ppc32_aix5) \
@FLAG_MAIX32@ -mcpu=powerpc -g
AM_FLAG_M3264_PPC64_AIX5 = @FLAG_MAIX64@
AM_CPPFLAGS_PPC64_AIX5 = $(add_includes_ppc64_aix5)
AM_CFLAGS_PPC64_AIX5 = $(WERROR) @FLAG_MAIX64@ -mcpu=powerpc64 $(AM_CFLAGS_BASE)
AM_CCASFLAGS_PPC64_AIX5 = $(add_includes_ppc64_aix5) \
@FLAG_MAIX64@ -mcpu=powerpc64 -g
# Flags for the primary target. These must be used to build the
# regtests and performance tests. In fact, these must be used to
# build anything which is built only once on a dual-arch build.
#
AM_FLAG_M3264_PRI = $(AM_FLAG_M3264_@VGCONF_PLATFORM_PRI_CAPS@)
AM_CPPFLAGS_PRI = $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
AM_CFLAGS_PRI = $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
AM_CCASFLAGS_PRI = $(AM_CCASFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
if VGCONF_HAVE_PLATFORM_SEC_CAPS
AM_FLAG_M3264_SEC = $(AM_FLAG_M3264_@VGCONF_PLATFORM_SEC_CAPS@)
else
AM_FLAG_M3264_SEC =
endif
# Baseline link flags for making dynamic shared objects.
#
PRELOAD_LDFLAGS_COMMON_LINUX = -nodefaultlibs -shared -Wl,-z,interpose,-z,initfirst
PRELOAD_LDFLAGS_COMMON_AIX5 = -nodefaultlibs -shared -Wl,-G -Wl,-bnogc
PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@
PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@
PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@
PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@
PRELOAD_LDFLAGS_PPC32_AIX5 = $(PRELOAD_LDFLAGS_COMMON_AIX5) @FLAG_MAIX32@
PRELOAD_LDFLAGS_PPC64_AIX5 = $(PRELOAD_LDFLAGS_COMMON_AIX5) @FLAG_MAIX64@