mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Add in support for running a cross-shell directly in qemu (bug 807936, r=ted)
This commit is contained in:
parent
4a93ce1d26
commit
66fb4793b4
24
build/qemu-wrap
Executable file
24
build/qemu-wrap
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# this script creates a wrapper shell script for an executable. The idea is the actual executable cannot be
|
||||||
|
# executed natively (it was cross compiled), but we want to run tests natively. Running this script
|
||||||
|
# as part of the compilation process will move the non-native executable to a new location, and replace it
|
||||||
|
# with a script that will run it under qemu.
|
||||||
|
while [[ -n $1 ]]; do
|
||||||
|
case $1 in
|
||||||
|
--qemu) QEMU="$2"; shift 2;;
|
||||||
|
--libdir) LIBDIR="$2"; shift 2;;
|
||||||
|
--ld) LD="$2"; shift 2;;
|
||||||
|
*) exe="$1"; shift;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
if [[ -z $LIBDIR ]]; then
|
||||||
|
echo "You need to specify a directory for the cross libraries when you configure the shell"
|
||||||
|
echo "You can do this with --with-cross-lib="
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
LD=${LD:-$LIBDIR/ld-linux.so.3}
|
||||||
|
mv $exe $exe.target
|
||||||
|
# Just hardcode the path to the executable. It'll be pretty obvious if it is doing the wrong thing.
|
||||||
|
|
||||||
|
echo $'#!/bin/bash\n' $QEMU -E LD_LIBRARY_PATH="${LIBDIR}" "$LD" "$(readlink -f "$exe.target")" '"$@"' >"$exe"
|
||||||
|
chmod +x $exe
|
24
js/src/build/qemu-wrap
Executable file
24
js/src/build/qemu-wrap
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# this script creates a wrapper shell script for an executable. The idea is the actual executable cannot be
|
||||||
|
# executed natively (it was cross compiled), but we want to run tests natively. Running this script
|
||||||
|
# as part of the compilation process will move the non-native executable to a new location, and replace it
|
||||||
|
# with a script that will run it under qemu.
|
||||||
|
while [[ -n $1 ]]; do
|
||||||
|
case $1 in
|
||||||
|
--qemu) QEMU="$2"; shift 2;;
|
||||||
|
--libdir) LIBDIR="$2"; shift 2;;
|
||||||
|
--ld) LD="$2"; shift 2;;
|
||||||
|
*) exe="$1"; shift;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
if [[ -z $LIBDIR ]]; then
|
||||||
|
echo "You need to specify a directory for the cross libraries when you configure the shell"
|
||||||
|
echo "You can do this with --with-cross-lib="
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
LD=${LD:-$LIBDIR/ld-linux.so.3}
|
||||||
|
mv $exe $exe.target
|
||||||
|
# Just hardcode the path to the executable. It'll be pretty obvious if it is doing the wrong thing.
|
||||||
|
|
||||||
|
echo $'#!/bin/bash\n' $QEMU -E LD_LIBRARY_PATH="${LIBDIR}" "$LD" "$(readlink -f "$exe.target")" '"$@"' >"$exe"
|
||||||
|
chmod +x $exe
|
@ -4136,6 +4136,21 @@ if test "$MOZ_DEBUG" -o "$NS_TRACE_MALLOC"; then
|
|||||||
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS=
|
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dnl ========================================================
|
||||||
|
dnl =
|
||||||
|
dnl = Options for generating the shell as a script
|
||||||
|
dnl =
|
||||||
|
dnl ========================================================
|
||||||
|
|
||||||
|
MOZ_ARG_WITH_STRING(qemu-exe,
|
||||||
|
[ --with-qemu-exe=path Use path as an arm emulator on host platforms],
|
||||||
|
QEMU_EXE=$withval)
|
||||||
|
AC_SUBST(QEMU_EXE)
|
||||||
|
MOZ_ARG_WITH_STRING(cross-lib,
|
||||||
|
[ --with-cross-lib=dir Use dir as the location for arm libraries],
|
||||||
|
CROSS_LIB=$withval,
|
||||||
|
CROSS_LIB=/usr/$target)
|
||||||
|
AC_SUBST(CROSS_LIB)
|
||||||
dnl ========================================================
|
dnl ========================================================
|
||||||
dnl =
|
dnl =
|
||||||
dnl = Maintainer debug option (no --enable equivalent)
|
dnl = Maintainer debug option (no --enable equivalent)
|
||||||
|
@ -85,6 +85,10 @@ LIBS = $(DEPTH)/$(LIB_PREFIX)js_static.$(LIB_SUFFIX) $(NSPR_LIBS) $(MOZ_ZLI
|
|||||||
|
|
||||||
LOCAL_INCLUDES += -I$(topsrcdir) -I..
|
LOCAL_INCLUDES += -I$(topsrcdir) -I..
|
||||||
|
|
||||||
|
ifdef QEMU_EXE
|
||||||
|
MOZ_POST_PROGRAM_COMMAND = $(topsrcdir)/build/qemu-wrap --qemu $(QEMU_EXE) --libdir $(CROSS_LIB)
|
||||||
|
endif
|
||||||
|
|
||||||
include $(topsrcdir)/config/rules.mk
|
include $(topsrcdir)/config/rules.mk
|
||||||
|
|
||||||
check::
|
check::
|
||||||
|
@ -36,6 +36,10 @@ DARWIN_EXE_LDFLAGS += -pagezero_size 10000 -image_base 100000000
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef QEMU_EXE
|
||||||
|
MOZ_POST_PROGRAM_COMMAND = $(topsrcdir)/build/qemu-wrap --qemu $(QEMU_EXE) --libdir $(CROSS_LIB)
|
||||||
|
endif
|
||||||
|
|
||||||
include $(topsrcdir)/config/rules.mk
|
include $(topsrcdir)/config/rules.mk
|
||||||
|
|
||||||
ifdef MOZ_SHARK
|
ifdef MOZ_SHARK
|
||||||
|
Loading…
Reference in New Issue
Block a user