1#! /bin/sh
2
3# prepare the hard or soft link allexec32 and allexec64
4# On 'single arch' compiled Valgrind, allexec32 and allexec64 will point
5# to the same executable.
6# On 'bi-arch', they will point respectively to the executable compiled
7# for the revelant arch.
8# This allows to test the various exec system calls the same way.
9
10
11pair()
12{
13  if ../../tests/arch_test $1 || ../../tests/arch_test $2
14  then
15      if ../../tests/arch_test $1
16      then
17         ln -f $1/allexec allexec32
18      else
19         ln -f -s allexec64 allexec32
20      fi
21      if ../../tests/arch_test $2
22      then
23         ln -f $2/allexec allexec64
24      else
25         ln -f -s allexec32 allexec64
26      fi
27  fi
28}
29
30
31pair x86                        amd64
32pair ppc32                      ppc64
33pair s390x_unexisting_in_32bits s390x
34pair arm                        arm64
35pair mips32                     mips64
36
37exit 0
38