* [PATCH 2/2] media_build: Allow cross-environment strip command
@ 2021-03-13 14:51 Vincent Fortier
0 siblings, 0 replies; only message in thread
From: Vincent Fortier @ 2021-03-13 14:51 UTC (permalink / raw)
To: linux-media
Hi all,
The current framework assume the strip command is natively available.
While using external toolchain to cross-compile there is a need to point
towards such tool using a STRIP variable environment using spksrc
SynoCommunity framework.
The following patch tries to address this.
Signed-off-by: Vincent Fortier<th0ma7@gmail.com>
---
diff -uprN ../linuxtv.orig/v4l/Makefile v4l/Makefile
--- ../linuxtv.orig/v4l/Makefile 2021-02-08 10:24:43.000000000 +0000
+++ v4l/Makefile 2021-03-13 13:58:27.939468937 +0000
@@ -44,6 +44,11 @@ endif
endif # TOPDIR
+# Allow passing STRIP variable to use cross-compiler toolset
+ifeq ($(strip $(STRIP)),)
+STRIP = strip
+endif
+
#################################################
# default compilation rule
@@ -411,7 +416,7 @@ cx88-ivtv::
old-install:: rminstall
@echo -e "\nInstalling new V4L modules at $(DEST)..."
- @strip --strip-debug $(inst-m)
+ $(STRIP) --strip-debug $(inst-m)
-install -d $(DEST)
-install -m 644 -c $(inst-m) $(DEST)
diff -uprN ../linuxtv.orig/v4l/scripts/make_makefile.pl
v4l/scripts/make_makefile.pl
--- ../linuxtv.orig/v4l/scripts/make_makefile.pl 2021-02-08
10:24:43.000000000 +0000
+++ v4l/scripts/make_makefile.pl 2021-03-13 13:55:46.534414452 +0000
@@ -254,7 +254,7 @@ while (my ($dir, $files) = each %instdir
print OUT "echo -n \"\$\$i \"; ";
print OUT "install -m 644 -c \$\$i \$(DESTDIR)\$(KDIR26)/$dir; fi;
done; ";
print OUT "if [ \$\$n -ne 0 ]; then echo; ";
- print OUT "strip --strip-debug \$(DESTDIR)\$(KDIR26)/$dir/*.ko; ";
+ print OUT "\$(STRIP) --strip-debug \$(DESTDIR)\$(KDIR26)/$dir/*.ko; ";
print OUT "fi;\n\n";
}
print OUT "\t@echo\n";
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-13 14:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-13 14:51 [PATCH 2/2] media_build: Allow cross-environment strip command Vincent Fortier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).