blob: 14ad4bea59e1c7996a6b77fd7298d125292c1395 [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 \
6 -fno-strict-aliasing
tomfb7bcde2005-11-07 15:24:38 +00007
sewardj944fbf22007-11-16 10:05:47 +00008# These flags are used for building the preload shared objects.
9# The aim is to give reasonable performance but also to have good
10# stack traces, since users often see stack traces extending
11# into (and through) the preloads.
sewardjb5f29642007-11-16 12:02:43 +000012AM_CFLAGS_PIC = -O -g -fpic -fno-omit-frame-pointer -fno-strict-aliasing
tomfb7bcde2005-11-07 15:24:38 +000013
sewardj01262142006-01-04 01:20:28 +000014# Flags for specific targets
15AM_FLAG_M3264_X86_LINUX = @FLAG_M32@
16AM_CPPFLAGS_X86_LINUX = $(add_includes_x86_linux)
17AM_CFLAGS_X86_LINUX = $(WERROR) @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \
18 $(AM_CFLAGS_BASE)
19AM_CCASFLAGS_X86_LINUX = $(add_includes_x86_linux) @FLAG_M32@ -g
tomfb7bcde2005-11-07 15:24:38 +000020
sewardj01262142006-01-04 01:20:28 +000021AM_FLAG_M3264_AMD64_LINUX = @FLAG_M64@
22AM_CPPFLAGS_AMD64_LINUX = $(add_includes_amd64_linux)
23AM_CFLAGS_AMD64_LINUX = $(WERROR) @FLAG_M64@ -fomit-frame-pointer \
sewardj1eff82b2006-10-17 00:56:43 +000024 @PREFERRED_STACK_BOUNDARY@ $(AM_CFLAGS_BASE)
25AM_CCASFLAGS_AMD64_LINUX = $(add_includes_amd64_linux) @FLAG_M64@ -g
tomfb7bcde2005-11-07 15:24:38 +000026
sewardj01262142006-01-04 01:20:28 +000027AM_FLAG_M3264_PPC32_LINUX = @FLAG_M32@
28AM_CPPFLAGS_PPC32_LINUX = $(add_includes_ppc32_linux)
29AM_CFLAGS_PPC32_LINUX = $(WERROR) @FLAG_M32@ $(AM_CFLAGS_BASE)
30AM_CCASFLAGS_PPC32_LINUX = $(add_includes_ppc32_linux) -Wa,-maltivec @FLAG_M32@ -g
sewardj2c48c7b2005-11-29 13:05:56 +000031
sewardj01262142006-01-04 01:20:28 +000032AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@
33AM_CPPFLAGS_PPC64_LINUX = $(add_includes_ppc64_linux)
34AM_CFLAGS_PPC64_LINUX = $(WERROR) @FLAG_M64@ $(AM_CFLAGS_BASE)
sewardj1eff82b2006-10-17 00:56:43 +000035AM_CCASFLAGS_PPC64_LINUX = $(add_includes_ppc64_linux) -Wa,-maltivec @FLAG_M64@ -g
36
37AM_FLAG_M3264_PPC32_AIX5 = @FLAG_MAIX32@
38AM_CPPFLAGS_PPC32_AIX5 = $(add_includes_ppc32_aix5)
39AM_CFLAGS_PPC32_AIX5 = $(WERROR) @FLAG_MAIX32@ -mcpu=powerpc $(AM_CFLAGS_BASE)
40AM_CCASFLAGS_PPC32_AIX5 = $(add_includes_ppc32_aix5) \
41 @FLAG_MAIX32@ -mcpu=powerpc -g
42
43AM_FLAG_M3264_PPC64_AIX5 = @FLAG_MAIX64@
44AM_CPPFLAGS_PPC64_AIX5 = $(add_includes_ppc64_aix5)
45AM_CFLAGS_PPC64_AIX5 = $(WERROR) @FLAG_MAIX64@ -mcpu=powerpc64 $(AM_CFLAGS_BASE)
46AM_CCASFLAGS_PPC64_AIX5 = $(add_includes_ppc64_aix5) \
47 @FLAG_MAIX64@ -mcpu=powerpc64 -g
tomfb7bcde2005-11-07 15:24:38 +000048
sewardj01262142006-01-04 01:20:28 +000049# Flags for the primary target. These must be used to build the
50# regtests and performance tests. In fact, these must be used to
51# build anything which is built only once on a dual-arch build.
52#
53AM_FLAG_M3264_PRI = $(AM_FLAG_M3264_@VG_PLATFORM_PRI@)
54AM_CPPFLAGS_PRI = $(AM_CPPFLAGS_@VG_PLATFORM_PRI@)
55AM_CFLAGS_PRI = $(AM_CFLAGS_@VG_PLATFORM_PRI@)
56AM_CCASFLAGS_PRI = $(AM_CCASFLAGS_@VG_PLATFORM_PRI@)
sewardj1eff82b2006-10-17 00:56:43 +000057
58if VGP_HAVE_SECONDARY
59 AM_FLAG_M3264_SEC = $(AM_FLAG_M3264_@VG_PLATFORM_SEC@)
60else
61 AM_FLAG_M3264_SEC =
62endif
63
64
65# Baseline link flags for making dynamic shared objects.
66#
bart44ceea22008-04-16 18:19:45 +000067PRELOAD_LDFLAGS_COMMON_LINUX = -nodefaultlibs -shared -Wl,-z,interpose,-z,initfirst
68PRELOAD_LDFLAGS_COMMON_AIX5 = -nodefaultlibs -shared -Wl,-G -Wl,-bnogc
sewardj1eff82b2006-10-17 00:56:43 +000069PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@
70PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@
71PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@
72PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@
73PRELOAD_LDFLAGS_PPC32_AIX5 = $(PRELOAD_LDFLAGS_COMMON_AIX5) @FLAG_MAIX32@
74PRELOAD_LDFLAGS_PPC64_AIX5 = $(PRELOAD_LDFLAGS_COMMON_AIX5) @FLAG_MAIX64@