@@ -31,6 +31,11 @@ def image_preprocess_elf_sowrap(d):
filetype = filemagic.file(path)
return bool(host_elf_re.match(filetype))
+ def is_static(path):
+ filetype = filemagic.file(path)
+ static_re = re.compile(".*statically.*")
+ return bool(static_re.match(filetype))
+
def sowrap_dir(dir, recursive=False):
if not os.path.exists(dir):
return True
@@ -49,6 +54,8 @@ def image_preprocess_elf_sowrap(d):
print "ERROR: file already exists:", os.path.join(dir, path)
ok = False
continue
+ if is_elf(path) and is_static(path):
+ continue
os.rename(path, dotpath)
with open(path, "w") as wrapper:
dirparts = len(os.path.dirname(path).split('/'))
@@ -67,8 +74,9 @@ def image_preprocess_elf_sowrap(d):
dir = dir.strip("/")
rc = sowrap_dir(dir, recursive)
if not rc:
+ filemagic.close()
return rc
-
+ filemagic.close()
return
image_preprocess_linux_netfilter_headers () {
From: Jacob Kjaergaard <jacob.kjaergaard@prevas.dk> ELF_SOWRAP was intended to fixup dynamically linked binaries. However it also did so for statically linked files. This patch avoids the latter behaviour. --- classes/sdk-image.oeclass | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)