From 1f38919afab8241e06a1676775cab3d02fce18c0 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Sun, 6 May 2012 03:51:00 +0000 Subject: [PATCH] Avoid regtest failures on x86_64 and ppc64 when toolchains for the seconday platform (x86 and ppc32, respectively) is not available. Add -DVGA_SEC_xxxxx and -DVGP_SEC_... to the GCC command line indicating that a seconday platform is supported. Make arch_test.c recognise those flags. Fixes bugzilla #296983. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12556 --- Makefile.tool-tests.am | 6 ++++++ NEWS | 1 + tests/arch_test.c | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/Makefile.tool-tests.am b/Makefile.tool-tests.am index 79110dfd3e..da07ec7338 100644 --- a/Makefile.tool-tests.am +++ b/Makefile.tool-tests.am @@ -9,6 +9,12 @@ AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include \ -DVGO_@VGCONF_OS@=1 \ -DVGP_@VGCONF_ARCH_PRI@_@VGCONF_OS@=1 \ -DVGPV_@VGCONF_ARCH_PRI@_@VGCONF_OS@_@VGCONF_PLATVARIANT@=1 + +if VGCONF_HAVE_PLATFORM_SEC +AM_CPPFLAGS += -DVGA_SEC_@VGCONF_ARCH_SEC@=1 \ + -DVGP_SEC_@VGCONF_ARCH_PRI@_@VGCONF_OS@=1 +endif + # Nb: Tools need to augment these flags with an arch-selection option, such # as $(AM_FLAG_M3264_PRI). AM_CFLAGS = -Winline -Wall -Wshadow -g diff --git a/NEWS b/NEWS index 7fbeddf26a..d87487466c 100644 --- a/NEWS +++ b/NEWS @@ -78,6 +78,7 @@ where XXXXXX is the bug number as listed below. 294055 regtest none/tests/shell fails when locale is not set to C 294190 --vgdb-error=xxx can be out of sync with errors shown to the user 295799 Missing \n with get_vbits in gdbserver when line is % 80 and there are some unaddressable bytes +296983 Fix build issues on x86_64/ppc64 without 32-bit toolchains n-i-bz s390x: Shadow registers can now be examined using vgdb 297078 gdbserver signal handling problems caused by diff vki nr/gdb nr and non reset of "C-ontinued" signal diff --git a/tests/arch_test.c b/tests/arch_test.c index 4263c89b67..6f3d944e29 100644 --- a/tests/arch_test.c +++ b/tests/arch_test.c @@ -38,7 +38,9 @@ static Bool go(char* arch) if ( 0 == strcmp( arch, "x86" ) ) return True; #elif defined(VGP_amd64_linux) || defined(VGP_amd64_darwin) +#if defined(VGA_SEC_x86) if ( 0 == strcmp( arch, "x86" ) ) return True; +#endif if ( 0 == strcmp( arch, "amd64" ) ) return True; #elif defined(VGP_ppc32_linux) @@ -46,7 +48,9 @@ static Bool go(char* arch) #elif defined(VGP_ppc64_linux) if ( 0 == strcmp( arch, "ppc64" ) ) return True; +#if defined(VGA_SEC_ppc32) if ( 0 == strcmp( arch, "ppc32" ) ) return True; +#endif #elif defined(VGP_s390x_linux) if ( 0 == strcmp( arch, "s390x" ) ) return True; -- 2.47.2