All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] package/clang: delete unnecessary files from target
@ 2018-05-02 10:04 Valentin Korenblit
  2018-05-02 12:51 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Valentin Korenblit @ 2018-05-02 10:04 UTC (permalink / raw)
  To: buildroot

Delete:
	Binaries in: /usr/bin
		     /usr/libexec

	Directories: /usr/lib/clang
		     /usr/share/clang
		     /usr/share/opt-viewer
		     /usr/share/scan-build
		     /usr/share/scan-view

	Manual:	     /usr/share/man/man1/scan-build.1

Signed-off-by: Valentin Korenblit <valentin.korenblit@smile.fr>
---
Changes v1 -> v2:

List files to be removed in CLANG_FILES_TO_REMOVE (Thomas)

 package/clang/clang.mk | 23 +++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/package/clang/clang.mk b/package/clang/clang.mk
index 88bce9af0b..8d86c5edda 100644
--- a/package/clang/clang.mk
+++ b/package/clang/clang.mk
@@ -56,11 +56,26 @@ CLANG_CONF_OPTS += -DLLVM_CONFIG:FILEPATH=$(STAGING_DIR)/usr/bin/llvm-config \
 
 # Clang can't be used as compiler on the target since there are no
 # development files (headers) and other build tools. So remove clang
-# binaries from target.
-define CLANG_DELETE_BINARIES_FROM_TARGET
-	rm -f $(TARGET_DIR)/usr/bin/clang*
+# binaries and some other unnecessary files from target.
+CLANG_FILES_TO_REMOVE = \
+	/usr/bin/clang* \
+	/usr/bin/c-index-test \
+	/usr/bin/git-clang-format \
+	/usr/bin/scan-build \
+	/usr/bin/scan-view \
+	/usr/libexec/c++-analyzer \
+	/usr/libexec/ccc-analyzer \
+	/usr/share/clang \
+	/usr/share/opt-viewer \
+	/usr/share/scan-build \
+	/usr/share/scan-view \
+	/usr/share/man/man1/scan-build.1 \
+	/usr/lib/clang
+
+define CLANG_CLEANUP_TARGET
+	rm -rf $(addprefix $(TARGET_DIR),$(CLANG_FILES_TO_REMOVE))
 endef
-CLANG_POST_INSTALL_TARGET_HOOKS += CLANG_DELETE_BINARIES_FROM_TARGET
+CLANG_POST_INSTALL_TARGET_HOOKS += CLANG_CLEANUP_TARGET
 
 # clang-tblgen is not installed by default, however it is necessary
 # for cross-compiling clang
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH v2] package/clang: delete unnecessary files from target
  2018-05-02 10:04 [Buildroot] [PATCH v2] package/clang: delete unnecessary files from target Valentin Korenblit
@ 2018-05-02 12:51 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2018-05-02 12:51 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed,  2 May 2018 12:04:38 +0200, Valentin Korenblit wrote:
> Delete:
> 	Binaries in: /usr/bin
> 		     /usr/libexec
> 
> 	Directories: /usr/lib/clang
> 		     /usr/share/clang
> 		     /usr/share/opt-viewer
> 		     /usr/share/scan-build
> 		     /usr/share/scan-view
> 
> 	Manual:	     /usr/share/man/man1/scan-build.1
> 
> Signed-off-by: Valentin Korenblit <valentin.korenblit@smile.fr>
> ---
> Changes v1 -> v2:

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-05-02 12:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-02 10:04 [Buildroot] [PATCH v2] package/clang: delete unnecessary files from target Valentin Korenblit
2018-05-02 12:51 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.