sewardj | 0126214 | 2006-01-04 01:20:28 +0000 | [diff] [blame] | 1 | |
sewardj | 944fbf2 | 2007-11-16 10:05:47 +0000 | [diff] [blame] | 2 | # Baseline flags for all compilations. Aim here is to maximise |
| 3 | # performance and get whatever useful warnings we can out of gcc. |
sewardj | 8cd42de | 2007-11-16 12:31:27 +0000 | [diff] [blame] | 4 | AM_CFLAGS_BASE = -O2 -g -Wmissing-prototypes -Wall -Wshadow \ |
sewardj | b5f2964 | 2007-11-16 12:02:43 +0000 | [diff] [blame] | 5 | -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations \ |
bart | 9d865fa | 2008-06-23 12:11:49 +0000 | [diff] [blame] | 6 | @FLAG_W_NO_FORMAT_ZERO_LENGTH@ \ |
sewardj | b5f2964 | 2007-11-16 12:02:43 +0000 | [diff] [blame] | 7 | -fno-strict-aliasing |
tom | fb7bcde | 2005-11-07 15:24:38 +0000 | [diff] [blame] | 8 | |
sewardj | 944fbf2 | 2007-11-16 10:05:47 +0000 | [diff] [blame] | 9 | # 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. |
sewardj | b5f2964 | 2007-11-16 12:02:43 +0000 | [diff] [blame] | 13 | AM_CFLAGS_PIC = -O -g -fpic -fno-omit-frame-pointer -fno-strict-aliasing |
tom | fb7bcde | 2005-11-07 15:24:38 +0000 | [diff] [blame] | 14 | |
sewardj | 0126214 | 2006-01-04 01:20:28 +0000 | [diff] [blame] | 15 | # Flags for specific targets |
| 16 | AM_FLAG_M3264_X86_LINUX = @FLAG_M32@ |
| 17 | AM_CPPFLAGS_X86_LINUX = $(add_includes_x86_linux) |
| 18 | AM_CFLAGS_X86_LINUX = $(WERROR) @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \ |
| 19 | $(AM_CFLAGS_BASE) |
| 20 | AM_CCASFLAGS_X86_LINUX = $(add_includes_x86_linux) @FLAG_M32@ -g |
tom | fb7bcde | 2005-11-07 15:24:38 +0000 | [diff] [blame] | 21 | |
sewardj | 0126214 | 2006-01-04 01:20:28 +0000 | [diff] [blame] | 22 | AM_FLAG_M3264_AMD64_LINUX = @FLAG_M64@ |
| 23 | AM_CPPFLAGS_AMD64_LINUX = $(add_includes_amd64_linux) |
| 24 | AM_CFLAGS_AMD64_LINUX = $(WERROR) @FLAG_M64@ -fomit-frame-pointer \ |
sewardj | 1eff82b | 2006-10-17 00:56:43 +0000 | [diff] [blame] | 25 | @PREFERRED_STACK_BOUNDARY@ $(AM_CFLAGS_BASE) |
| 26 | AM_CCASFLAGS_AMD64_LINUX = $(add_includes_amd64_linux) @FLAG_M64@ -g |
tom | fb7bcde | 2005-11-07 15:24:38 +0000 | [diff] [blame] | 27 | |
sewardj | 0126214 | 2006-01-04 01:20:28 +0000 | [diff] [blame] | 28 | AM_FLAG_M3264_PPC32_LINUX = @FLAG_M32@ |
| 29 | AM_CPPFLAGS_PPC32_LINUX = $(add_includes_ppc32_linux) |
| 30 | AM_CFLAGS_PPC32_LINUX = $(WERROR) @FLAG_M32@ $(AM_CFLAGS_BASE) |
| 31 | AM_CCASFLAGS_PPC32_LINUX = $(add_includes_ppc32_linux) -Wa,-maltivec @FLAG_M32@ -g |
sewardj | 2c48c7b | 2005-11-29 13:05:56 +0000 | [diff] [blame] | 32 | |
sewardj | 0126214 | 2006-01-04 01:20:28 +0000 | [diff] [blame] | 33 | AM_FLAG_M3264_PPC64_LINUX = @FLAG_M64@ |
| 34 | AM_CPPFLAGS_PPC64_LINUX = $(add_includes_ppc64_linux) |
| 35 | AM_CFLAGS_PPC64_LINUX = $(WERROR) @FLAG_M64@ $(AM_CFLAGS_BASE) |
sewardj | 1eff82b | 2006-10-17 00:56:43 +0000 | [diff] [blame] | 36 | AM_CCASFLAGS_PPC64_LINUX = $(add_includes_ppc64_linux) -Wa,-maltivec @FLAG_M64@ -g |
| 37 | |
| 38 | AM_FLAG_M3264_PPC32_AIX5 = @FLAG_MAIX32@ |
| 39 | AM_CPPFLAGS_PPC32_AIX5 = $(add_includes_ppc32_aix5) |
| 40 | AM_CFLAGS_PPC32_AIX5 = $(WERROR) @FLAG_MAIX32@ -mcpu=powerpc $(AM_CFLAGS_BASE) |
| 41 | AM_CCASFLAGS_PPC32_AIX5 = $(add_includes_ppc32_aix5) \ |
| 42 | @FLAG_MAIX32@ -mcpu=powerpc -g |
| 43 | |
| 44 | AM_FLAG_M3264_PPC64_AIX5 = @FLAG_MAIX64@ |
| 45 | AM_CPPFLAGS_PPC64_AIX5 = $(add_includes_ppc64_aix5) |
| 46 | AM_CFLAGS_PPC64_AIX5 = $(WERROR) @FLAG_MAIX64@ -mcpu=powerpc64 $(AM_CFLAGS_BASE) |
| 47 | AM_CCASFLAGS_PPC64_AIX5 = $(add_includes_ppc64_aix5) \ |
| 48 | @FLAG_MAIX64@ -mcpu=powerpc64 -g |
tom | fb7bcde | 2005-11-07 15:24:38 +0000 | [diff] [blame] | 49 | |
sewardj | 0126214 | 2006-01-04 01:20:28 +0000 | [diff] [blame] | 50 | # 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 | # |
| 54 | AM_FLAG_M3264_PRI = $(AM_FLAG_M3264_@VG_PLATFORM_PRI@) |
| 55 | AM_CPPFLAGS_PRI = $(AM_CPPFLAGS_@VG_PLATFORM_PRI@) |
| 56 | AM_CFLAGS_PRI = $(AM_CFLAGS_@VG_PLATFORM_PRI@) |
| 57 | AM_CCASFLAGS_PRI = $(AM_CCASFLAGS_@VG_PLATFORM_PRI@) |
sewardj | 1eff82b | 2006-10-17 00:56:43 +0000 | [diff] [blame] | 58 | |
| 59 | if VGP_HAVE_SECONDARY |
| 60 | AM_FLAG_M3264_SEC = $(AM_FLAG_M3264_@VG_PLATFORM_SEC@) |
| 61 | else |
| 62 | AM_FLAG_M3264_SEC = |
| 63 | endif |
| 64 | |
| 65 | |
| 66 | # Baseline link flags for making dynamic shared objects. |
| 67 | # |
bart | 44ceea2 | 2008-04-16 18:19:45 +0000 | [diff] [blame] | 68 | PRELOAD_LDFLAGS_COMMON_LINUX = -nodefaultlibs -shared -Wl,-z,interpose,-z,initfirst |
| 69 | PRELOAD_LDFLAGS_COMMON_AIX5 = -nodefaultlibs -shared -Wl,-G -Wl,-bnogc |
sewardj | 1eff82b | 2006-10-17 00:56:43 +0000 | [diff] [blame] | 70 | PRELOAD_LDFLAGS_X86_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ |
| 71 | PRELOAD_LDFLAGS_AMD64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ |
| 72 | PRELOAD_LDFLAGS_PPC32_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M32@ |
| 73 | PRELOAD_LDFLAGS_PPC64_LINUX = $(PRELOAD_LDFLAGS_COMMON_LINUX) @FLAG_M64@ |
| 74 | PRELOAD_LDFLAGS_PPC32_AIX5 = $(PRELOAD_LDFLAGS_COMMON_AIX5) @FLAG_MAIX32@ |
| 75 | PRELOAD_LDFLAGS_PPC64_AIX5 = $(PRELOAD_LDFLAGS_COMMON_AIX5) @FLAG_MAIX64@ |