blob: 1945177470e749d6df08bb588094ef2c87352894 [file] [log] [blame]
sewardj01262142006-01-04 01:20:28 +00001
sewardj944fbf22007-11-16 10:05:47 +00002# Baseline flags for all compilations. Aim here is to maximise
3# performance and get whatever useful warnings we can out of gcc.
sewardj8cd42de2007-11-16 12:31:27 +00004AM_CFLAGS_BASE = -O2 -g -Wmissing-prototypes -Wall -Wshadow \
sewardjb5f29642007-11-16 12:02:43 +00005 -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations \
bart9d865fa2008-06-23 12:11:49 +00006 @FLAG_W_NO_FORMAT_ZERO_LENGTH@ \
sewardjb5f29642007-11-16 12:02:43 +00007 -fno-strict-aliasing
tomfb7bcde2005-11-07 15:24:38 +00008
sewardj944fbf22007-11-16 10:05:47 +00009# These flags are used for building the preload shared objects.
10# The aim is to give reasonable performance but also to have good
11# stack traces, since users often see stack traces extending
12# into (and through) the preloads.
sewardjb5f29642007-11-16 12:02:43 +000013AM_CFLAGS_PIC = -O -g -fpic -fno-omit-frame-pointer -fno-strict-aliasing
tomfb7bcde2005-11-07 15:24:38 +000014
sewardj01262142006-01-04 01:20:28 +000015# Flags for specific targets
16AM_FLAG_M3264_X86_LINUX = @FLAG_M32@
17AM_CPPFLAGS_X86_LINUX = $(add_includes_x86_linux)
18AM_CFLAGS_X86_LINUX = $(WERROR) @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \
19 $(AM_CFLAGS_BASE)
20AM_CCASFLAGS_X86_LINUX = $(add_includes_x86_linux) @FLAG_M32@ -g
tomfb7bcde2005-11-07 15:24:38 +000021
sewardj01262142006-01-04 01:20:28 +000022AM_FLAG_M3264_AMD64_LINUX = @FLAG_M64@
23AM_CPPFLAGS_AMD64_LINUX = $(add_includes_amd64_linux)
24AM_CFLAGS_AMD64_LINUX = $(WERROR) @FLAG_M64@ -fomit-frame-pointer \
sewardj1eff82b2006-10-17 00:56:43 +000025 @PREFERRED_STACK_BOUNDARY@ $(AM_CFLAGS_BASE)
26AM_CCASFLAGS_AMD64_LINUX = $(add_includes_amd64_linux) @FLAG_M64@ -g
tomfb7bcde2005-11-07 15:24:38 +000027
sewardj01262142006-01-04 01:20:28 +000028AM_FLAG_M3264_PPC32_LINUX = @FLAG_M32@
29AM_CPPFLAGS_PPC32_LINUX = $(add_includes_ppc32_linux)
30AM_CFLAGS_PPC32_LINUX = $(WERROR) @FLAG_M32@ $(AM_CFLAGS_BASE)
31AM_CCASFLAGS_PPC32_LINUX = $(add_includes_ppc32_linux) -Wa,-maltivec @FLAG_M32@ -g
sewardj2c48c7b2005-11-29 13:05:56 +000032
sewardj01262142006-01-04 01:20:28 +000033AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@
34AM_CPPFLAGS_PPC64_LINUX = $(add_includes_ppc64_linux)
35AM_CFLAGS_PPC64_LINUX = $(WERROR) @FLAG_M64@ $(AM_CFLAGS_BASE)
sewardj1eff82b2006-10-17 00:56:43 +000036AM_CCASFLAGS_PPC64_LINUX = $(add_includes_ppc64_linux) -Wa,-maltivec @FLAG_M64@ -g
37
38AM_FLAG_M3264_PPC32_AIX5 = @FLAG_MAIX32@
39AM_CPPFLAGS_PPC32_AIX5 = $(add_includes_ppc32_aix5)
40AM_CFLAGS_PPC32_AIX5 = $(WERROR) @FLAG_MAIX32@ -mcpu=powerpc $(AM_CFLAGS_BASE)
41AM_CCASFLAGS_PPC32_AIX5 = $(add_includes_ppc32_aix5) \
42 @FLAG_MAIX32@ -mcpu=powerpc -g
43
44AM_FLAG_M3264_PPC64_AIX5 = @FLAG_MAIX64@
45AM_CPPFLAGS_PPC64_AIX5 = $(add_includes_ppc64_aix5)
46AM_CFLAGS_PPC64_AIX5 = $(WERROR) @FLAG_MAIX64@ -mcpu=powerpc64 $(AM_CFLAGS_BASE)
47AM_CCASFLAGS_PPC64_AIX5 = $(add_includes_ppc64_aix5) \
48 @FLAG_MAIX64@ -mcpu=powerpc64 -g
tomfb7bcde2005-11-07 15:24:38 +000049
sewardj01262142006-01-04 01:20:28 +000050# Flags for the primary target. These must be used to build the
51# regtests and performance tests. In fact, these must be used to
52# build anything which is built only once on a dual-arch build.
53#
54AM_FLAG_M3264_PRI = $(AM_FLAG_M3264_@VG_PLATFORM_PRI@)
55AM_CPPFLAGS_PRI = $(AM_CPPFLAGS_@VG_PLATFORM_PRI@)
56AM_CFLAGS_PRI = $(AM_CFLAGS_@VG_PLATFORM_PRI@)
57AM_CCASFLAGS_PRI = $(AM_CCASFLAGS_@VG_PLATFORM_PRI@)
sewardj1eff82b2006-10-17 00:56:43 +000058
59if VGP_HAVE_SECONDARY
60 AM_FLAG_M3264_SEC = $(AM_FLAG_M3264_@VG_PLATFORM_SEC@)
61else
62 AM_FLAG_M3264_SEC =
63endif
64
65
66# Baseline link flags for making dynamic shared objects.
67#
bart44ceea22008-04-16 18:19:45 +000068PRELOAD_LDFLAGS_COMMON_LINUX = -nodefaultlibs -shared -Wl,-z,interpose,-z,initfirst
69PRELOAD_LDFLAGS_COMMON_AIX5 = -nodefaultlibs -shared -Wl,-G -Wl,-bnogc
sewardj1eff82b2006-10-17 00:56:43 +000070PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@
71PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@
72PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@
73PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@
74PRELOAD_LDFLAGS_PPC32_AIX5 = $(PRELOAD_LDFLAGS_COMMON_AIX5) @FLAG_MAIX32@
75PRELOAD_LDFLAGS_PPC64_AIX5 = $(PRELOAD_LDFLAGS_COMMON_AIX5) @FLAG_MAIX64@