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