From 1b443f7dbdd7916643a9c6cf65e8698f0c8dd888 Mon Sep 17 00:00:00 2001 From: Sean Nyekjaer Date: Fri, 6 Nov 2015 22:08:43 +0100 Subject: [PATCH] elfwrapper: make wrapper fix When recursing into subdirectories, make calls $MAKE, which defaults to the make binary instead of the make elf wrapper. Fix this by exporting MAKE in the wrapper to point at the wrapper itself. --- classes/elfwrapper.oeclass | 2 ++ 1 file changed, 2 insertions(+) diff --git a/classes/elfwrapper.oeclass b/classes/elfwrapper.oeclass index c8b30ae8..575933f4 100644 --- a/classes/elfwrapper.oeclass +++ b/classes/elfwrapper.oeclass @@ -69,6 +69,8 @@ def image_preprocess_elf_sowrap(d): dirparts = len(os.path.dirname(path).split('/')) relative_root = "/".join([".."] * dirparts) wrapper.write("#!/bin/sh\n") + if file == "make": + wrapper.write("export MAKE=$(dirname $(realpath $0))/%s\n"%(os.path.basename(path))) wrapper.write("$(dirname $(readlink -f $0))/%s%s $(dirname $(readlink -f $0))/%s \"$@\""%( relative_root, ld_so, os.path.basename(dotpath))) os.chmod(path, stat.S_IRWXU|stat.S_IRWXG|stat.S_IROTH|stat.S_IXOTH)