|
From: <sv...@va...> - 2009-06-15 06:53:06
|
Author: njn Date: 2009-06-15 07:52:58 +0100 (Mon, 15 Jun 2009) New Revision: 10335 Log: Fold Makefile.flags.am into Makefile.all.am because the two are included in almost all the same places. Removed: branches/BUILD_TWEAKS/Makefile.flags.am Modified: branches/BUILD_TWEAKS/Makefile.all.am branches/BUILD_TWEAKS/Makefile.tool-tests.am branches/BUILD_TWEAKS/Makefile.tool.am branches/BUILD_TWEAKS/auxprogs/Makefile.am branches/BUILD_TWEAKS/coregrind/Makefile.am branches/BUILD_TWEAKS/mpi/Makefile.am Modified: branches/BUILD_TWEAKS/Makefile.all.am =================================================================== --- branches/BUILD_TWEAKS/Makefile.all.am 2009-06-15 06:42:40 UTC (rev 10334) +++ branches/BUILD_TWEAKS/Makefile.all.am 2009-06-15 06:52:58 UTC (rev 10335) @@ -84,3 +84,125 @@ rm -rf $$f.dSYM; \ done +#---------------------------------------------------------------------------- +# Flags +#---------------------------------------------------------------------------- + +# 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. +if VGCONF_OS_IS_DARWIN +AM_CFLAGS_PIC = -dynamic -O -g -fno-omit-frame-pointer -fno-strict-aliasing -mno-dynamic-no-pic +else +AM_CFLAGS_PIC = -fpic -O -g -fno-omit-frame-pointer -fno-strict-aliasing +endif + + +# Flags for specific targets. +# +# Nb: the AM_CPPFLAGS_* values are suitable for building tools and auxprogs. +# For building the core, coregrind/Makefile.am files add some extra things. +# +# Also: in newer versions of automake (1.10 onwards?) asm files ending with +# '.S' are considered "pre-processed" (as opposed to those ending in '.s') +# and so the CPPFLAGS are passed to the assembler. But this is not true for +# older automakes (e.g. 1.8.5, 1.9.6), sigh. So we include +# AM_CPPFLAGS_<PLATFORM> in each AM_CCASFLAGS_<PLATFORM> variable. This +# means some of the flags are duplicated on systems with newer versions of +# automake, but this does not really matter and seems hard to avoid. + +AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@ = \ + -I$(top_srcdir) \ + -I$(top_srcdir)/include \ + -I@VEX_DIR@/pub \ + -DVGA_@VGCONF_ARCH_PRI@=1 \ + -DVGO_@VGCONF_OS@=1 \ + -DVGP_@VGCONF_ARCH_PRI@_@VGCONF_OS@=1 +if VGCONF_HAVE_PLATFORM_SEC +AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@ = \ + -I$(top_srcdir) \ + -I$(top_srcdir)/include \ + -I@VEX_DIR@/pub \ + -DVGA_@VGCONF_ARCH_SEC@=1 \ + -DVGO_@VGCONF_OS@=1 \ + -DVGP_@VGCONF_ARCH_SEC@_@VGCONF_OS@=1 +endif + +AM_FLAG_M3264_X86_LINUX = @FLAG_M32@ +AM_CFLAGS_X86_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ + $(AM_CFLAGS_BASE) +AM_CCASFLAGS_X86_LINUX = $(AM_CPPFLAGS_X86_LINUX) @FLAG_M32@ -g + +AM_FLAG_M3264_AMD64_LINUX = @FLAG_M64@ +AM_CFLAGS_AMD64_LINUX = @FLAG_M64@ -fomit-frame-pointer \ + @PREFERRED_STACK_BOUNDARY@ $(AM_CFLAGS_BASE) +AM_CCASFLAGS_AMD64_LINUX = $(AM_CPPFLAGS_AMD64_LINUX) @FLAG_M64@ -g + +AM_FLAG_M3264_PPC32_LINUX = @FLAG_M32@ +AM_CFLAGS_PPC32_LINUX = @FLAG_M32@ $(AM_CFLAGS_BASE) +AM_CCASFLAGS_PPC32_LINUX = $(AM_CPPFLAGS_PPC32_LINUX) @FLAG_M32@ -g + +AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ +AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) +AM_CCASFLAGS_PPC64_LINUX = $(AM_CPPFLAGS_PPC64_LINUX) @FLAG_M64@ -g + +AM_FLAG_M3264_PPC32_AIX5 = @FLAG_MAIX32@ +AM_CFLAGS_PPC32_AIX5 = @FLAG_MAIX32@ -mcpu=powerpc $(AM_CFLAGS_BASE) +AM_CCASFLAGS_PPC32_AIX5 = $(AM_CPPFLAGS_PPC32_AIX5) \ + @FLAG_MAIX32@ -mcpu=powerpc -g + +AM_FLAG_M3264_PPC64_AIX5 = @FLAG_MAIX64@ +AM_CFLAGS_PPC64_AIX5 = @FLAG_MAIX64@ -mcpu=powerpc64 $(AM_CFLAGS_BASE) +AM_CCASFLAGS_PPC64_AIX5 = $(AM_CPPFLAGS_PPC64_AIX5) \ + @FLAG_MAIX64@ -mcpu=powerpc64 -g + +AM_FLAG_M3264_X86_DARWIN = -arch i386 +AM_CFLAGS_X86_DARWIN = $(WERROR) -arch i386 $(AM_CFLAGS_BASE) \ + -mmacosx-version-min=10.5 -fno-stack-protector \ + -mdynamic-no-pic +AM_CCASFLAGS_X86_DARWIN = $(AM_CPPFLAGS_X86_DARWIN) -arch i386 -g + +AM_FLAG_M3264_AMD64_DARWIN = -arch x86_64 +AM_CFLAGS_AMD64_DARWIN = $(WERROR) -arch x86_64 $(AM_CFLAGS_BASE) \ + -mmacosx-version-min=10.5 -fno-stack-protector +AM_CCASFLAGS_AMD64_DARWIN = $(AM_CPPFLAGS_AMD64_DARWIN) -arch x86_64 -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 + AM_FLAG_M3264_SEC = $(AM_FLAG_M3264_@VGCONF_PLATFORM_SEC_CAPS@) +else + AM_FLAG_M3264_SEC = +endif + + +# Baseline link flags for making vgpreload 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_COMMON_DARWIN = -dynamic -dynamiclib -all_load + +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@ +PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 +PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 + Deleted: branches/BUILD_TWEAKS/Makefile.flags.am =================================================================== --- branches/BUILD_TWEAKS/Makefile.flags.am 2009-06-15 06:42:40 UTC (rev 10334) +++ branches/BUILD_TWEAKS/Makefile.flags.am 2009-06-15 06:52:58 UTC (rev 10335) @@ -1,117 +0,0 @@ - -# 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. -if VGCONF_OS_IS_DARWIN -AM_CFLAGS_PIC = -dynamic -O -g -fno-omit-frame-pointer -fno-strict-aliasing -mno-dynamic-no-pic -else -AM_CFLAGS_PIC = -fpic -O -g -fno-omit-frame-pointer -fno-strict-aliasing -endif - - -# Flags for specific targets. -# -# Nb: the AM_CPPFLAGS_* values are suitable for building tools and auxprogs. -# For building the core, coregrind/Makefile.am files add some extra things. -# -# Also: in newer versions of automake (1.10 onwards?) asm files ending with -# '.S' are considered "pre-processed" (as opposed to those ending in '.s') -# and so the CPPFLAGS are passed to the assembler. But this is not true for -# older automakes (e.g. 1.8.5, 1.9.6), sigh. So we include -# AM_CPPFLAGS_<PLATFORM> in each AM_CCASFLAGS_<PLATFORM> variable. This -# means some of the flags are duplicated on systems with newer versions of -# automake, but this does not really matter and seems hard to avoid. - -AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@ = \ - -I$(top_srcdir) \ - -I$(top_srcdir)/include \ - -I@VEX_DIR@/pub \ - -DVGA_@VGCONF_ARCH_PRI@=1 \ - -DVGO_@VGCONF_OS@=1 \ - -DVGP_@VGCONF_ARCH_PRI@_@VGCONF_OS@=1 -if VGCONF_HAVE_PLATFORM_SEC -AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@ = \ - -I$(top_srcdir) \ - -I$(top_srcdir)/include \ - -I@VEX_DIR@/pub \ - -DVGA_@VGCONF_ARCH_SEC@=1 \ - -DVGO_@VGCONF_OS@=1 \ - -DVGP_@VGCONF_ARCH_SEC@_@VGCONF_OS@=1 -endif - -AM_FLAG_M3264_X86_LINUX = @FLAG_M32@ -AM_CFLAGS_X86_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ - $(AM_CFLAGS_BASE) -AM_CCASFLAGS_X86_LINUX = $(AM_CPPFLAGS_X86_LINUX) @FLAG_M32@ -g - -AM_FLAG_M3264_AMD64_LINUX = @FLAG_M64@ -AM_CFLAGS_AMD64_LINUX = @FLAG_M64@ -fomit-frame-pointer \ - @PREFERRED_STACK_BOUNDARY@ $(AM_CFLAGS_BASE) -AM_CCASFLAGS_AMD64_LINUX = $(AM_CPPFLAGS_AMD64_LINUX) @FLAG_M64@ -g - -AM_FLAG_M3264_PPC32_LINUX = @FLAG_M32@ -AM_CFLAGS_PPC32_LINUX = @FLAG_M32@ $(AM_CFLAGS_BASE) -AM_CCASFLAGS_PPC32_LINUX = $(AM_CPPFLAGS_PPC32_LINUX) @FLAG_M32@ -g - -AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ -AM_CFLAGS_PPC64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) -AM_CCASFLAGS_PPC64_LINUX = $(AM_CPPFLAGS_PPC64_LINUX) @FLAG_M64@ -g - -AM_FLAG_M3264_PPC32_AIX5 = @FLAG_MAIX32@ -AM_CFLAGS_PPC32_AIX5 = @FLAG_MAIX32@ -mcpu=powerpc $(AM_CFLAGS_BASE) -AM_CCASFLAGS_PPC32_AIX5 = $(AM_CPPFLAGS_PPC32_AIX5) \ - @FLAG_MAIX32@ -mcpu=powerpc -g - -AM_FLAG_M3264_PPC64_AIX5 = @FLAG_MAIX64@ -AM_CFLAGS_PPC64_AIX5 = @FLAG_MAIX64@ -mcpu=powerpc64 $(AM_CFLAGS_BASE) -AM_CCASFLAGS_PPC64_AIX5 = $(AM_CPPFLAGS_PPC64_AIX5) \ - @FLAG_MAIX64@ -mcpu=powerpc64 -g - -AM_FLAG_M3264_X86_DARWIN = -arch i386 -AM_CFLAGS_X86_DARWIN = $(WERROR) -arch i386 $(AM_CFLAGS_BASE) \ - -mmacosx-version-min=10.5 -fno-stack-protector \ - -mdynamic-no-pic -AM_CCASFLAGS_X86_DARWIN = $(AM_CPPFLAGS_X86_DARWIN) -arch i386 -g - -AM_FLAG_M3264_AMD64_DARWIN = -arch x86_64 -AM_CFLAGS_AMD64_DARWIN = $(WERROR) -arch x86_64 $(AM_CFLAGS_BASE) \ - -mmacosx-version-min=10.5 -fno-stack-protector -AM_CCASFLAGS_AMD64_DARWIN = $(AM_CPPFLAGS_AMD64_DARWIN) -arch x86_64 -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 - 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_COMMON_DARWIN = -dynamic -dynamiclib -all_load -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@ -PRELOAD_LDFLAGS_X86_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch i386 -PRELOAD_LDFLAGS_AMD64_DARWIN = $(PRELOAD_LDFLAGS_COMMON_DARWIN) -arch x86_64 Modified: branches/BUILD_TWEAKS/Makefile.tool-tests.am =================================================================== --- branches/BUILD_TWEAKS/Makefile.tool-tests.am 2009-06-15 06:42:40 UTC (rev 10334) +++ branches/BUILD_TWEAKS/Makefile.tool-tests.am 2009-06-15 06:52:58 UTC (rev 10335) @@ -1,7 +1,6 @@ # This file is used for tool tests, and also in perf/Makefile.am. include $(top_srcdir)/Makefile.all.am -include $(top_srcdir)/Makefile.flags.am # For AM_FLAG_M3264_PRI AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include \ -I$(top_srcdir)/coregrind -I$(top_builddir)/include \ @@ -14,7 +13,7 @@ AM_CFLAGS = -Winline -Wall -Wshadow -g AM_CXXFLAGS = -Winline -Wall -Wshadow -g # Include AM_CPPFLAGS in AM_CCASFLAGS to allow for older versions of -# automake; see comments in Makefile.flags.am for more detail. +# automake; see comments in Makefile.all.am for more detail. AM_CCASFLAGS = $(AM_CPPFLAGS) if VGCONF_OS_IS_DARWIN Modified: branches/BUILD_TWEAKS/Makefile.tool.am =================================================================== --- branches/BUILD_TWEAKS/Makefile.tool.am 2009-06-15 06:42:40 UTC (rev 10334) +++ branches/BUILD_TWEAKS/Makefile.tool.am 2009-06-15 06:52:58 UTC (rev 10335) @@ -2,7 +2,6 @@ SUBDIRS = . tests docs include $(top_srcdir)/Makefile.all.am -include $(top_srcdir)/Makefile.flags.am #---------------------------------------------------------------------------- # <tool>-<platform> stuff Modified: branches/BUILD_TWEAKS/auxprogs/Makefile.am =================================================================== --- branches/BUILD_TWEAKS/auxprogs/Makefile.am 2009-06-15 06:42:40 UTC (rev 10334) +++ branches/BUILD_TWEAKS/auxprogs/Makefile.am 2009-06-15 06:52:58 UTC (rev 10335) @@ -1,5 +1,4 @@ include $(top_srcdir)/Makefile.all.am -include $(top_srcdir)/Makefile.flags.am noinst_SCRIPTS = \ gen-mdg \ Modified: branches/BUILD_TWEAKS/coregrind/Makefile.am =================================================================== --- branches/BUILD_TWEAKS/coregrind/Makefile.am 2009-06-15 06:42:40 UTC (rev 10334) +++ branches/BUILD_TWEAKS/coregrind/Makefile.am 2009-06-15 06:52:58 UTC (rev 10335) @@ -4,7 +4,6 @@ # particular forms. include $(top_srcdir)/Makefile.all.am -include $(top_srcdir)/Makefile.flags.am #---------------------------------------------------------------------------- # Basics, flags Modified: branches/BUILD_TWEAKS/mpi/Makefile.am =================================================================== --- branches/BUILD_TWEAKS/mpi/Makefile.am 2009-06-15 06:42:40 UTC (rev 10334) +++ branches/BUILD_TWEAKS/mpi/Makefile.am 2009-06-15 06:52:58 UTC (rev 10335) @@ -1,5 +1,4 @@ include $(top_srcdir)/Makefile.all.am -include $(top_srcdir)/Makefile.flags.am # HACK WARNING: automake isn't good at supporting non-$(CC) compilers. # But we need to use $(MPI_CC) for the MPI stuff. So we have this mpi stuff |