mirror of
https://github.com/b4tman/armhf-alpine-qemu.git
synced 2024-12-05 01:26:54 +00:00
xbuild: pass the -execve flag and propagate the correct arg0
from: ae8e2da0ac
This commit is contained in:
parent
c6545f9846
commit
1dc895f5ef
@ -31,7 +31,7 @@ func crossBuildEnd() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func runShell() error {
|
func runShell() error {
|
||||||
cmd := exec.Command("/usr/bin/qemu-arm-static", append([]string{"-0", "/bin/sh", "/bin/sh"}, os.Args[1:]...)...)
|
cmd := exec.Command("/usr/bin/qemu-arm-static", append([]string{"-execve", "-0", os.Args[0], "/bin/sh", "/bin/sh"}, os.Args[1:]...)...)
|
||||||
cmd.Stdin = os.Stdin
|
cmd.Stdin = os.Stdin
|
||||||
cmd.Stdout = os.Stdout
|
cmd.Stdout = os.Stdout
|
||||||
cmd.Stderr = os.Stderr
|
cmd.Stderr = os.Stderr
|
||||||
@ -46,7 +46,7 @@ func main() {
|
|||||||
crossBuildStart()
|
crossBuildStart()
|
||||||
case "cross-build-end":
|
case "cross-build-end":
|
||||||
crossBuildEnd()
|
crossBuildEnd()
|
||||||
case "/bin/sh":
|
default:
|
||||||
code := 0
|
code := 0
|
||||||
crossBuildEnd()
|
crossBuildEnd()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user