From: Nadav Har'El <[email protected]>
Committer: Nadav Har'El <[email protected]>
Branch: master
build: possibly use cross-compilation strip
In the previous patch, scripts/mkbootfs.py started to use 'strip'.
However, this is run from the Makefile which allows cross-compilation,
and in that case, we need to use $STRIP instead of 'strip'.
So in this patch, we export the correct $STRIP from the Makefile to
its children, and use it in scripts/mkbootfs.py.
Signed-off-by: Nadav Har'El <[email protected]>
---
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -88,7 +88,7 @@ CROSS_PREFIX ?= $(if $(filter-out $(arch), $(host_arch)),
$(arch)-linux-gnu-)
CXX=$(CROSS_PREFIX)g++
CC=$(CROSS_PREFIX)gcc
LD=$(CROSS_PREFIX)ld.bfd
-STRIP=$(CROSS_PREFIX)strip
+export STRIP=$(CROSS_PREFIX)strip
OBJCOPY=$(CROSS_PREFIX)objcopy
# Our makefile puts all compilation results in a single directory, $(out),
diff --git a/scripts/mkbootfs.py b/scripts/mkbootfs.py
--- a/scripts/mkbootfs.py
+++ b/scripts/mkbootfs.py
@@ -66,7 +66,7 @@ def strip_file(filename):
if not os.path.exists(stripped_filename) \
or (os.path.getmtime(stripped_filename) < \
os.path.getmtime(filename)):
- subprocess.call(["strip", "-o", stripped_filename, filename])
+ subprocess.call([os.getenv("STRIP", "strip"), "-o",
stripped_filename, filename])
return stripped_filename
def main():
--
You received this message because you are subscribed to the Google Groups "OSv
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.