diff -ruN valgrind-3.5.0/coregrind/Makefile.am valgrind-3.5.0-fixed/coregrind/Makefile.am --- valgrind-3.5.0/coregrind/Makefile.am 2009-08-19 15:37:47.000000000 +0200 +++ valgrind-3.5.0-fixed/coregrind/Makefile.am 2009-11-16 21:38:32.000000000 +0100 @@ -277,22 +277,12 @@ m_demangle/demangle.c \ m_demangle/dyn-string.c \ m_demangle/safe-ctype.c \ - m_dispatch/dispatch-x86-linux.S \ - m_dispatch/dispatch-amd64-linux.S \ - m_dispatch/dispatch-ppc32-linux.S \ - m_dispatch/dispatch-ppc64-linux.S \ - m_dispatch/dispatch-ppc32-aix5.S \ - m_dispatch/dispatch-ppc64-aix5.S \ - m_dispatch/dispatch-x86-darwin.S \ - m_dispatch/dispatch-amd64-darwin.S \ m_initimg/initimg-linux.c \ m_initimg/initimg-aix5.c \ m_initimg/initimg-darwin.c \ m_initimg/initimg-pathscan.c \ m_mach/mach_basics.c \ m_mach/mach_msg.c \ - m_mach/mach_traps-x86-darwin.S \ - m_mach/mach_traps-amd64-darwin.S \ m_replacemalloc/replacemalloc_core.c \ m_scheduler/scheduler.c \ m_scheduler/sema.c \ @@ -304,16 +294,6 @@ m_sigframe/sigframe-ppc64-aix5.c \ m_sigframe/sigframe-x86-darwin.c \ m_sigframe/sigframe-amd64-darwin.c \ - m_start-x86-darwin.S \ - m_start-amd64-darwin.S \ - m_syswrap/syscall-x86-linux.S \ - m_syswrap/syscall-amd64-linux.S \ - m_syswrap/syscall-ppc32-linux.S \ - m_syswrap/syscall-ppc64-linux.S \ - m_syswrap/syscall-ppc32-aix5.S \ - m_syswrap/syscall-ppc64-aix5.S \ - m_syswrap/syscall-x86-darwin.S \ - m_syswrap/syscall-amd64-darwin.S \ m_syswrap/syswrap-main.c \ m_syswrap/syswrap-generic.c \ m_syswrap/syswrap-linux.c \ @@ -333,6 +313,24 @@ m_ume/main.c \ m_ume/script.c +COREGRIND_SOURCES_COMMON += \ + m_dispatch/dispatch-@VGCONF_ARCH_PRI@-@VGCONF_OS@.S \ + m_syswrap/syscall-@VGCONF_ARCH_PRI@-@VGCONF_OS@.S + +if VGCONF_HAVE_PLATFORM_SEC +COREGRIND_SOURCES_COMMON += \ + m_dispatch/dispatch-@VGCONF_ARCH_SEC@-@VGCONF_OS@.S \ + m_syswrap/syscall-@VGCONF_ARCH_SEC@-@VGCONF_OS@.S +endif + +if VGCONF_OS_IS_DARWIN +COREGRIND_SOURCES_COMMON += \ + m_start-@VGCONF_ARCH_PRI@-darwin.S \ + m_start-@VGCONF_ARCH_SEC@-darwin.S \ + m_mach/mach_traps-@VGCONF_ARCH_PRI@-darwin.S \ + m_mach/mach_traps-@VGCONF_ARCH_SEC@-darwin.S +endif + libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = \ $(COREGRIND_SOURCES_COMMON) nodist_libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = \ diff -ruN valgrind-3.5.0/coregrind/m_dispatch/dispatch-amd64-linux.S valgrind-3.5.0-fixed/coregrind/m_dispatch/dispatch-amd64-linux.S --- valgrind-3.5.0/coregrind/m_dispatch/dispatch-amd64-linux.S 2009-08-19 15:37:41.000000000 +0200 +++ valgrind-3.5.0-fixed/coregrind/m_dispatch/dispatch-amd64-linux.S 2009-11-16 21:38:08.000000000 +0100 @@ -338,11 +338,11 @@ ret .size VG_(run_a_noredir_translation), .-VG_(run_a_noredir_translation) +#endif // defined(VGP_amd64_linux) + /* Let the linker know we don't need an executable stack */ .section .note.GNU-stack,"",@progbits -#endif // defined(VGP_amd64_linux) - /*--------------------------------------------------------------------*/ /*--- end ---*/ /*--------------------------------------------------------------------*/ diff -ruN valgrind-3.5.0/coregrind/m_dispatch/dispatch-x86-linux.S valgrind-3.5.0-fixed/coregrind/m_dispatch/dispatch-x86-linux.S --- valgrind-3.5.0/coregrind/m_dispatch/dispatch-x86-linux.S 2009-08-19 15:37:41.000000000 +0200 +++ valgrind-3.5.0-fixed/coregrind/m_dispatch/dispatch-x86-linux.S 2009-11-16 21:38:08.000000000 +0100 @@ -305,11 +305,11 @@ .size VG_(run_a_noredir_translation), .-VG_(run_a_noredir_translation) +#endif // defined(VGP_x86_linux) + /* Let the linker know we don't need an executable stack */ .section .note.GNU-stack,"",@progbits -#endif // defined(VGP_x86_linux) - /*--------------------------------------------------------------------*/ /*--- end ---*/ /*--------------------------------------------------------------------*/ diff -ruN valgrind-3.5.0/coregrind/m_syswrap/syscall-amd64-linux.S valgrind-3.5.0-fixed/coregrind/m_syswrap/syscall-amd64-linux.S --- valgrind-3.5.0/coregrind/m_syswrap/syscall-amd64-linux.S 2009-08-19 15:37:42.000000000 +0200 +++ valgrind-3.5.0-fixed/coregrind/m_syswrap/syscall-amd64-linux.S 2009-11-16 21:38:08.000000000 +0100 @@ -205,11 +205,11 @@ ML_(blksys_finished): .quad 5b .previous +#endif // defined(VGP_amd64_linux) + /* Let the linker know we don't need an executable stack */ .section .note.GNU-stack,"",@progbits -#endif // defined(VGP_amd64_linux) - /*--------------------------------------------------------------------*/ /*--- end ---*/ /*--------------------------------------------------------------------*/ diff -ruN valgrind-3.5.0/coregrind/m_syswrap/syscall-x86-linux.S valgrind-3.5.0-fixed/coregrind/m_syswrap/syscall-x86-linux.S --- valgrind-3.5.0/coregrind/m_syswrap/syscall-x86-linux.S 2009-08-19 15:37:42.000000000 +0200 +++ valgrind-3.5.0-fixed/coregrind/m_syswrap/syscall-x86-linux.S 2009-11-16 21:38:08.000000000 +0100 @@ -165,11 +165,11 @@ ML_(blksys_finished): .long 5b .previous +#endif // defined(VGP_x86_linux) + /* Let the linker know we don't need an executable stack */ .section .note.GNU-stack,"",@progbits -#endif // defined(VGP_x86_linux) - /*--------------------------------------------------------------------*/ /*--- end ---*/ /*--------------------------------------------------------------------*/