diff --git a/sdk_container/src/third_party/portage-stable/dev-util/perf/Manifest b/sdk_container/src/third_party/portage-stable/dev-util/perf/Manifest index 1429fb2af9..2b586b7e41 100644 --- a/sdk_container/src/third_party/portage-stable/dev-util/perf/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-util/perf/Manifest @@ -1,22 +1,3 @@ -AUX perf-4.1.5-prefix.patch 1637 SHA256 dac4671e909a0af78345f6253e4c7ca04f0d3d400c76eecaf0149ad51639b241 SHA512 ff7179d7b06513a83f0909723ad47774c07ad089079f43750c24a1dca685745048bce5ea6b0766e65e48b75b50d5a26866e827a89b0206800769ea2779355d6b WHIRLPOOL b9015891fcb48d113b8015a54a7dae290b041ab1cb607c7ea196fc6aeec74c6b14d221c3197efa2ff2040249498082a5fb9588c51428489a1fc9d349b5e799d1 -DIST linux-3.12.tar.bz2 91111381 SHA256 43129defd9079c99cf5e57506d36b6b01614c734a5ed9e604d3a7c1510ab8b22 SHA512 bea14d044c8a0257d8312f45db6a39ca4f9dffe8ac32a11198e90762ee1735c8b6975bb81c635a4755d451793fa7c7e5b2d7d692c9e57133b15b4cdc941febf1 WHIRLPOOL 1889c3f689cf305856112f350e3901175b9f6c4f1e4143d62b40e502000685ade3e75b211a8a9fd948f6225e1c57a68cae10ceb649ff7976981089290d562926 -DIST linux-3.13.tar.xz 77187032 SHA256 4d5e5eee5f276424c32e9591f1b6c971baedc7b49f28ce03d1f48b1e5d6226a2 SHA512 1ba223bb4b885d691a67196d86a8aaf7b4a1c351bf2a762f50f1b0c32da00dd0c28895872a66b49e8d244498d996876609268e64861d28ac4048886ef9f79b87 WHIRLPOOL 2992257a17e85b3eb16fcaf21678fa6dbf31f80c2099fd1ad0ff9852ac1d16122ac8e2c0b46421d8895d4368253a724e439cd625307ee7af7bd1e50cb2c9b62a -DIST linux-3.15.tar.xz 79676484 SHA256 c3927e87be4040fa8aca1b58663dc0776aaf00485604ff88a623be2f3fb07794 SHA512 d5dc477cad4584e56e2e2ef9e0950c2b22e76e5cf5090a896ba099cb7c5e5db1853a4aeb96b199189653dc66d461557e95198e37516a619f7ddc01ba6b308e02 WHIRLPOOL 7f3dfde1a23aab75b7f40770ae2ca77c1b28f845e4abe6296b2aec9b56fe94f7afa76b00eb6cc7475305c31b726ebeb4643107dd48c12ac04c933cf1856b8e77 -DIST linux-4.1.tar.xz 83017828 SHA256 caf51f085aac1e1cea4d00dbbf3093ead07b551fc07b31b2a989c05f8ea72d9f SHA512 168ef84a4e67619f9f53f3574e438542a5747f9b43443363cb83597fcdac9f40d201625c66e375a23226745eaada9176eb006ca023613cec089349e91751f3c0 WHIRLPOOL 85fcfdb67ea7f865272a85d3b4c3ec1f5a1267f4664bf073c562bb3875e9d96ad68486259d8866a9aced98c95de16840ec531d89745aec75b7315a64ebe650b8 -DIST linux-4.4.tar.xz 87295988 SHA256 401d7c8fef594999a460d10c72c5a94e9c2e1022f16795ec51746b0d165418b2 SHA512 13c8459933a8b80608e226a1398e3d1848352ace84bcfb7e6a4a33cb230bbe1ab719d4b58e067283df91ce5311be6d2d595fc8c19e2ae6ecc652499415614b3e WHIRLPOOL 02abc203d867404b9934aaa4c1e5b5dcbb0b0021e91a03f3a7e7fd224eed106821d8b4949f32a590536db150e5a88c16fcde88538777a26d0c17900f0257b1bc -DIST linux-4.9.tar.xz 93192404 SHA256 029098dcffab74875e086ae970e3828456838da6e0ba22ce3f64ef764f3d7f1a SHA512 bf67ff812cc3cb7e5059e82cc5db0d9a7c5637f7ed9a42e4730c715bf7047c81ed3a571225f92a33ef0b6d65f35595bc32d773356646df2627da55e9bc7f1f1a WHIRLPOOL 072505b29972ad120eb25a074217847c9c2813416c4903e605a0433574f5f87616dbea0b1454e4b19acc48107f11274b682958b1d773373156e99f8163e6606a -DIST patch-3.13.1.xz 2884 SHA256 74a093b2cacddac0a105e0989b7bf0e9829b9923e2d71ca10382e90324a17e74 SHA512 164235a15e6a984e9aeaf9fe475a8b2975d5e4c4b28dd4ecf99064b0f0c72eea766d925340f1a7232cabcbd23d26773527c300b6d995bf5cde18a276208fdccc WHIRLPOOL 0ea0118960970b7d6465445252e7a21a6aeb494c0afefec5f52a68c0b7e0d63fd2ed59a3877fbe9ebd282ac03812235b021534866efa8f46d549b6f70228e4b6 -DIST patch-3.15.5.xz 122232 SHA256 9b0d000e0bdec7a25ee6303afdab8d2af77439995876eadd6ce248e5c954037d SHA512 6831200503334e839c3cccdad29058aecc0205171cc5b75205d0a2aada8636633889ebff35d9677d4567bbaeea249efc83571e016104cd67554fe72b3b405755 WHIRLPOOL 56e1e817c08b4557e18b34d148d8ffd0f73bf8dec92f2339ca9413ca2143b65ec35f6d48c87e37f140226e57d7df33f06d6c53a48dafa7ddf090a839fdabe024 -DIST patch-4.1.5.xz 170056 SHA256 b495cf8a7b978986dd2b757b687751c62f635d15cc2228edb80934bc0d449dcc SHA512 1325cdb35ea1f277d513932af37804f788b96ae63b94cedeb3c9b916ee8963bbd6aca5d0e13279e36a81f1de06005c5f3666ecfc845609932686f261fa4250c5 WHIRLPOOL 291ddfcde395c3d201a8172f7281ac560167a8bce78d3196b47e4c7be759545282cc1104fc7b2edc95d90250a834cc23103199275bc8c6974bd4229dd530d1a3 -DIST patch-4.4.4.xz 200972 SHA256 9061d8f57cc25d760387c4e6b7d5cceacaa808e8784a3e478012e7c2949853c8 SHA512 c206af7803cb0915fbe2bd27ed33282452db3fbd3070c73e4c7147443efd3c7588fb3be12d0abc08742381fbe892190602b29147684630aa9e6ff5e9efa49dbc WHIRLPOOL e6a004e32eecca1507354f97d3de85a07c1b9512fe3d4d87173e6d39c02ef1c2411abd0c26b6a077cd5eaefde11dd201445f72b9a0cf185e76635bdcc36df8dd -DIST patch-4.9.13.xz 295932 SHA256 87a0f07dd393e2d08850f0536417d091684535ff0c8ab8f8d9aeab1db38589bf SHA512 d7956cc8a4ab11514789af4f1f7023268e4b003216766c153f0f09aac659aabda5de634b363d53f8daeddfcf5820619c5bca31ff5f9aeb187c1df016c05f68d5 WHIRLPOOL 154747030245f5c1e9f6d9717c32584e3901372fdfe7945497b294c7454f2da4ae4959cf9f1bdd091dca70d346125023a0b5d0c75cc3745342eb8bb56c68e023 -EBUILD perf-3.12.ebuild 5006 SHA256 a549d1bcbeddd0b503fd4bbb4d2f960018e51069333a738086a5cf7999a57403 SHA512 dc69ba512aa1a9f2647dd48f32e5891db94bb3cd8a0294f39e6cf15a76571afeab29956cbb75e76ddc151bb76821ad51c34e7830789bbd8c05a26a5c0de9f9f1 WHIRLPOOL c8ad0306046c2cb433d1229b2f9699956f72db8e9468bb6e4d609ca32608bbf823162ebf6ded248742cb8f06dbc7a2f0c5661b18ba8fbfd238afce9d45ed58c9 -EBUILD perf-3.13.1-r1.ebuild 5128 SHA256 e81a461d221ab947d0850f152de397d8e2e9221dc2934d3f149dba407f4e12de SHA512 19287c4ee43e11aa62748eb3ad40839e8cd27f78710d3f72d5cb10511247a37bcff55c8355a175ea6b155eb873701a080370f29e1d317d0252f929f134c09c26 WHIRLPOOL f78c3f0d591efaeb01ad7eaeb2b813c0f7f2ab46d0b94eaba8691e0e73cbc333a0619a9ba8f38810ddf1937305e446c5359e8a8c6e78d8b568737f44f9c00f2d -EBUILD perf-3.15.5.ebuild 5143 SHA256 d263ee8e8e944a6456a2cdbd7b32e9defcd8fa97c19dec354b0b5ee3d43b952f SHA512 c02b0e36e0cdf192c0a494994e1013d227d73c289471811270fc5877a6256ac52e3aeae0c926c21762adddde51ee61d54acbe5448cd2c13d6b0bffb6ad790038 WHIRLPOOL 3abf1eceb669b4c0e35d7889b885c323a4fad077163e83d475a9cb6588f05ab8990741684847b90a8bbb891a10c7e8ddbac9d0b008905456916f19a6896bec4a -EBUILD perf-4.1.5-r1.ebuild 5269 SHA256 60d3c288baea63e98d8c8f0b5dd9dbdb82cba98fad955d76de3b5abe8ffbeab9 SHA512 c99b7791b0d143519c4e511499420a773b789038a65503f58aabe536f1988cb7d2275008d9dc83e5772119b79b48c1172e76e01c1c7c5ca8d38bb9ddaee7e531 WHIRLPOOL 3cda17ba49e85886a11de6fe099228cfd2a2f9a1f0ccd3a0d3c1f40848f34a2930c228cc546bcce425520716b43e441ee2d95354a2f0e2f0bfd4f32009252876 -EBUILD perf-4.4.4.ebuild 5040 SHA256 abab8bc18347291e53577598ab3f127363e8b90add2641e8c787c17c6d13c02a SHA512 e5d37cfbd4d34f93950c13749a4317f6758b54bbd3c93599fa21eac709ae28b22c07000fbf5ecc69c512eca30b9492a1b71cccca58f48b754a28ecb7d81d24ed WHIRLPOOL 75aa62e82cbf15df3b34f84c728000e6c38452746c7b3918069bb6fc23e73b96c11151cd82fe83e1ef00e255ce9efc4b5e959997a8f37577efa57539783c8a93 -EBUILD perf-4.9.13.ebuild 4780 SHA256 1c4108a23d10577e90236a4a093f768af270bf049e61883962e8bc526f956d37 SHA512 d4c9064643b8688c3deb050bb519223259c80beb3e322239e76cb78f62595a80e90a7529ccd1e6c6cd01be94309f9f271953b26e95bc9a1435f7fea5e4cc6552 WHIRLPOOL a52684efafc6701421ed6b3d33a8d2430a8f1ffa9683137966ff0493dfd748886d6fe68c2ad9b7463cba423e553ec0b52f6cc1c7885c2c8f1ff9d7c3b5fab906 -MISC ChangeLog 3650 SHA256 0975840be7bd7127c7d5b83a130f6ae8621256a7f02eb80196c69298b918eca2 SHA512 742d129e590b0c36adc7cc3b81fa51184c1c147dec3aa5c844a704f81cbab7023f39229c7e06ffcf06f4a5af5d1ba44100b8421f4c52fa5b8f8c47df4016d7ae WHIRLPOOL effae523378dd7bbdfac3dbb990e7e1a0b8d0cb18c08128c138f3e84d8f6419a9c117c4e7ed867d2ebc4e32279ab12f6c99a921d596f36da2cac74c89c55abc3 -MISC ChangeLog-2015 6264 SHA256 740d932dcee9533fa7cb6a2a03eecdc04aeb744b5d456dcb9972f6c228b57e2f SHA512 aebf127fb17bd1fd086d9f0057dfb5f044e789f943dbda5ef2260b5145944c4f8f44d241610209ec9c9a65908aa932019d5f0d3c027dfb5869423daf6762cb08 WHIRLPOOL 0f040aa61460166d988e4becfe91449bab91e90c5ac2d5da04eeb8685142a96700f776625f21b4997d5518857597c851934ebcdf6e558407ee25adce0d5ca63f -MISC metadata.xml 1153 SHA256 880863b904a364fe264b2d6e4db2d5086b543df748a140aeab88bf531db1c88e SHA512 18e5b436d7ae5ba8c9da8bd4007e33006e25f351d9e01e55127bd35f47446663faafa1de37283410e0cec9f00b8b4422afb4a8d256b8161d88c3c084e8c9a09d WHIRLPOOL 2f765f9167d86eb0317b673f91f2c44190dc6d1a231d2fc047cdea57c8c0fcc03083bdfa03fae2abae1263d225141f1b9f6109f91026c77d47f7e532fb907c31 +DIST linux-5.12.tar.xz 118112412 BLAKE2B 842d921b9a73d2aaade763dbd2ec67bdfe0275baa6d628b775f5c87574ad7dc86f0419afcd48c10c1235f4bffa16084243f2cf4556e6afcd391e975fe8ba530b SHA512 be03b6fee1d1ea8087b09874d27c0a602c0b04fd90ad38b975bd2c8455a07e83c29b56814aaf1389e82305fae0e4c2d1701075a7f0a7295dd28149f967ec5b3d +DIST linux-5.15.tar.xz 121913744 BLAKE2B 3921274b23f7938abdf3ed9334534b4581e13d7484303d3a5280eddb038999aaa8b836666a487472d9c4a219af0f06b9fecccaf348fb5510ab8762f4ef4b7e83 SHA512 d25ad40b5bcd6a4c6042fd0fd84e196e7a58024734c3e9a484fd0d5d54a0c1d87db8a3c784eff55e43b6f021709dc685eb0efa18d2aec327e4f88a79f405705a DIST linux-5.8.tar.xz 114459324 BLAKE2B 7bd97f8fa4527840754434414c07283e89731dc8ebb1e95fa5bc1469a60af1122582c0d3b6e262e77882f023190068df3537bd8b65964b3caa820bb2c8e579c7 SHA512 45a53ecf351096ef6e98242cca4228b8da9b9139ecc6963695791ea6fb7a9484a4e1c19dcca7ce7cbfdfa49de0451b70973bb078f12bdae9cbaddbc3f8092556 diff --git a/sdk_container/src/third_party/portage-stable/dev-util/perf/files/perf-4.1.5-prefix.patch b/sdk_container/src/third_party/portage-stable/dev-util/perf/files/perf-4.1.5-prefix.patch deleted file mode 100644 index 0c4dff0113..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-util/perf/files/perf-4.1.5-prefix.patch +++ /dev/null @@ -1,43 +0,0 @@ -commit 75e84ab906ef8935cff3df3d8929f1bafea81599 -Author: Lukas Wunner -Date: Thu Jun 18 13:00:32 2015 +0200 - - perf tools: Fix build breakage if prefix= is specified - - Invoking Makefile.perf with prefix= breaks the build since Makefile.perf - hands that variable down to Makefile.build where it overrides - - prefix := $(subst ./,,$(OUTPUT)$(dir)/) - - leading to errors like this: - - No rule to make target '/usrabspath.o', needed by '/usrlibperf-in.o' - - Signed-off-by: Lukas Wunner - Acked-by: Jiri Olsa - Cc: David Ahern - Fixes: c819e2cf2eb6f65d3208d195d7a0edef6108d5 - Link: http://lkml.kernel.org/r/5582c48a.84a22b0a.a918.5285SMTPIN_ADDED_MISSING@mx.google.com - Signed-off-by: Arnaldo Carvalho de Melo - -diff --git a/tools/build/Makefile.build b/tools/build/Makefile.build -index 10df572..98cfc38 100644 ---- a/tools/build/Makefile.build -+++ b/tools/build/Makefile.build -@@ -94,12 +94,12 @@ obj-y := $(patsubst %/, %/$(obj)-in.o, $(obj-y)) - subdir-obj-y := $(filter %/$(obj)-in.o, $(obj-y)) - - # '$(OUTPUT)/dir' prefix to all objects --prefix := $(subst ./,,$(OUTPUT)$(dir)/) --obj-y := $(addprefix $(prefix),$(obj-y)) --subdir-obj-y := $(addprefix $(prefix),$(subdir-obj-y)) -+objprefix := $(subst ./,,$(OUTPUT)$(dir)/) -+obj-y := $(addprefix $(objprefix),$(obj-y)) -+subdir-obj-y := $(addprefix $(objprefix),$(subdir-obj-y)) - - # Final '$(obj)-in.o' object --in-target := $(prefix)$(obj)-in.o -+in-target := $(objprefix)$(obj)-in.o - - PHONY += $(subdir-y) - diff --git a/sdk_container/src/third_party/portage-stable/dev-util/perf/files/perf-5.1.15-fix-clang8.patch b/sdk_container/src/third_party/portage-stable/dev-util/perf/files/perf-5.1.15-fix-clang8.patch deleted file mode 100644 index 743f4b017b..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-util/perf/files/perf-5.1.15-fix-clang8.patch +++ /dev/null @@ -1,17 +0,0 @@ -https://bugs.gentoo.org/678652 -Created-By: Maciej S. Szmigiero ---- ---- a/tools/build/feature/test-clang.cpp 2018-12-24 00:55:59.000000000 +0100 -+++ b/tools/build/feature/test-clang.cpp 2019-04-06 16:05:56.828757243 +0200 -@@ -1,10 +1,10 @@ - // SPDX-License-Identifier: GPL-2.0 --#include "clang/Basic/VirtualFileSystem.h" - #include "clang/Driver/Driver.h" - #include "clang/Frontend/TextDiagnosticPrinter.h" - #include "llvm/ADT/IntrusiveRefCntPtr.h" - #include "llvm/Support/ManagedStatic.h" - #include "llvm/Support/raw_ostream.h" -+#include "llvm/Support/VirtualFileSystem.h" - - using namespace clang; - using namespace clang::driver; diff --git a/sdk_container/src/third_party/portage-stable/dev-util/perf/files/perf-5.15-clang.patch b/sdk_container/src/third_party/portage-stable/dev-util/perf/files/perf-5.15-clang.patch new file mode 100644 index 0000000000..5ea0c75f27 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-util/perf/files/perf-5.15-clang.patch @@ -0,0 +1,231 @@ +From e1f1cbfe812e4a019034105ab5e81fd9f0742353 Mon Sep 17 00:00:00 2001 +From: Ian Rogers +Date: Mon, 11 Oct 2021 19:13:20 -0700 +Subject: [PATCH 1/3] tools: Bump minimum LLVM C++ std to GNU++14 + +LLVM 9 (current release is LLVM 13) moved the minimum C++ version to +GNU++14. Bump the version numbers in the feature test and perf build. + +Reviewed-by: Fangrui Song +Signed-off-by: Ian Rogers +Cc: Alexander Shishkin +Cc: Daniel Borkmann +Cc: Ingo Molnar +Cc: Jiri Olsa +Cc: Leo Yan +Cc: Mark Rutland +Cc: Michael Petlan +Cc: Namhyung Kim +Cc: Nathan Chancellor +Cc: Nick Desaulniers +Cc: Peter Zijlstra +Cc: Sedat Dilek +Cc: llvm@lists.linux.dev +Link: https://lore.kernel.org/r/20211012021321.291635-1-irogers@google.com +Signed-off-by: Arnaldo Carvalho de Melo +--- + tools/build/feature/Makefile | 6 +++--- + tools/perf/Makefile.config | 2 +- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile +index eff55d287db1..9756e589e4ae 100644 +--- a/tools/build/feature/Makefile ++++ b/tools/build/feature/Makefile +@@ -296,7 +296,7 @@ $(OUTPUT)test-jvmti-cmlr.bin: + $(BUILD) + + $(OUTPUT)test-llvm.bin: +- $(BUILDXX) -std=gnu++11 \ ++ $(BUILDXX) -std=gnu++14 \ + -I$(shell $(LLVM_CONFIG) --includedir) \ + -L$(shell $(LLVM_CONFIG) --libdir) \ + $(shell $(LLVM_CONFIG) --libs Core BPF) \ +@@ -304,12 +304,12 @@ $(OUTPUT)test-llvm.bin: + > $(@:.bin=.make.output) 2>&1 + + $(OUTPUT)test-llvm-version.bin: +- $(BUILDXX) -std=gnu++11 \ ++ $(BUILDXX) -std=gnu++14 \ + -I$(shell $(LLVM_CONFIG) --includedir) \ + > $(@:.bin=.make.output) 2>&1 + + $(OUTPUT)test-clang.bin: +- $(BUILDXX) -std=gnu++11 \ ++ $(BUILDXX) -std=gnu++14 \ + -I$(shell $(LLVM_CONFIG) --includedir) \ + -L$(shell $(LLVM_CONFIG) --libdir) \ + -Wl,--start-group -lclangBasic -lclangDriver \ +diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config +index 14e3e8d702a0..ddbe86defe39 100644 +--- a/tools/perf/Makefile.config ++++ b/tools/perf/Makefile.config +@@ -285,7 +285,7 @@ CORE_CFLAGS += -Wall + CORE_CFLAGS += -Wextra + CORE_CFLAGS += -std=gnu99 + +-CXXFLAGS += -std=gnu++11 -fno-exceptions -fno-rtti ++CXXFLAGS += -std=gnu++14 -fno-exceptions -fno-rtti + CXXFLAGS += -Wall + CXXFLAGS += -fno-omit-frame-pointer + CXXFLAGS += -ggdb3 +-- +2.33.1 + + +From 3e5c11995e04a9e3351330c34c4c802ce50df46c Mon Sep 17 00:00:00 2001 +From: Ian Rogers +Date: Mon, 11 Oct 2021 19:13:21 -0700 +Subject: [PATCH 2/3] perf clang: Fixes for more recent LLVM/clang + +The parameters to two functions and the location of a variable have +changed in more recent LLVM/clang releases. + +Remove the unneecessary -fmessage-length and -ferror-limit flags, the +former causes failures like: + + 58: builtin clang support : + 58.1: builtin clang compile C source to IR : + --- start --- + test child forked, pid 279307 + error: unknown argument: '-fmessage-length' + 1 error generated. + test child finished with -1 + +Tested with LLVM 6, 8, 9, 10 and 11. + +Reviewed-by: Fangrui Song +Signed-off-by: Ian Rogers +Cc: Alexander Shishkin +Cc: Daniel Borkmann +Cc: Ingo Molnar +Cc: Jiri Olsa +Cc: Leo Yan +Cc: Mark Rutland +Cc: Michael Petlan +Cc: Namhyung Kim +Cc: Nathan Chancellor +Cc: Nick Desaulniers +Cc: Peter Zijlstra +Cc: Sedat Dilek , +Cc: llvm@lists.linux.dev +Signed-off-by: Arnaldo Carvalho de Melo +--- + tools/perf/util/c++/clang.cpp | 21 +++++++++++++-------- + 1 file changed, 13 insertions(+), 8 deletions(-) + +diff --git a/tools/perf/util/c++/clang.cpp b/tools/perf/util/c++/clang.cpp +index c8885dfa3667..df7b18fb6b6e 100644 +--- a/tools/perf/util/c++/clang.cpp ++++ b/tools/perf/util/c++/clang.cpp +@@ -43,8 +43,6 @@ createCompilerInvocation(llvm::opt::ArgStringList CFlags, StringRef& Path, + "-cc1", + "-triple", "bpf-pc-linux", + "-fsyntax-only", +- "-ferror-limit", "19", +- "-fmessage-length", "127", + "-O2", + "-nostdsysteminc", + "-nobuiltininc", +@@ -55,7 +53,11 @@ createCompilerInvocation(llvm::opt::ArgStringList CFlags, StringRef& Path, + "-x", "c"}; + + CCArgs.append(CFlags.begin(), CFlags.end()); +- CompilerInvocation *CI = tooling::newInvocation(&Diags, CCArgs); ++ CompilerInvocation *CI = tooling::newInvocation(&Diags, CCArgs ++#if CLANG_VERSION_MAJOR >= 11 ++ ,/*BinaryName=*/nullptr ++#endif ++ ); + + FrontendOptions& Opts = CI->getFrontendOpts(); + Opts.Inputs.clear(); +@@ -151,13 +153,16 @@ getBPFObjectFromModule(llvm::Module *Module) + + legacy::PassManager PM; + bool NotAdded; +-#if CLANG_VERSION_MAJOR < 7 +- NotAdded = TargetMachine->addPassesToEmitFile(PM, ostream, +- TargetMachine::CGFT_ObjectFile); ++ NotAdded = TargetMachine->addPassesToEmitFile(PM, ostream ++#if CLANG_VERSION_MAJOR >= 7 ++ , /*DwoOut=*/nullptr ++#endif ++#if CLANG_VERSION_MAJOR < 10 ++ , TargetMachine::CGFT_ObjectFile + #else +- NotAdded = TargetMachine->addPassesToEmitFile(PM, ostream, nullptr, +- TargetMachine::CGFT_ObjectFile); ++ , llvm::CGFT_ObjectFile + #endif ++ ); + if (NotAdded) { + llvm::errs() << "TargetMachine can't emit a file of this type\n"; + return std::unique_ptr>(nullptr); +-- +2.33.1 + + +From aa2b4e5e920cbaadc0fed9b8aa7c4498feee3dd5 Mon Sep 17 00:00:00 2001 +From: Guilherme Amadio +Date: Thu, 29 Apr 2021 13:44:48 +0200 +Subject: [PATCH 3/3] tools feature: update LLVM/Clang detection + +Since LLVM/Clang 10, individual libraries have been merged into +monolithic libraries libLLVM.so, libclang.so, and libclang-cpp.so. +--- + tools/build/feature/Makefile | 8 +++----- + tools/perf/Makefile.perf | 7 ++----- + 2 files changed, 5 insertions(+), 10 deletions(-) + +diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile +index 9756e589e4ae..23478bd06093 100644 +--- a/tools/build/feature/Makefile ++++ b/tools/build/feature/Makefile +@@ -299,7 +299,7 @@ $(OUTPUT)test-llvm.bin: + $(BUILDXX) -std=gnu++14 \ + -I$(shell $(LLVM_CONFIG) --includedir) \ + -L$(shell $(LLVM_CONFIG) --libdir) \ +- $(shell $(LLVM_CONFIG) --libs Core BPF) \ ++ $(shell $(LLVM_CONFIG) --libs) \ + $(shell $(LLVM_CONFIG) --system-libs) \ + > $(@:.bin=.make.output) 2>&1 + +@@ -312,11 +312,9 @@ $(OUTPUT)test-clang.bin: + $(BUILDXX) -std=gnu++14 \ + -I$(shell $(LLVM_CONFIG) --includedir) \ + -L$(shell $(LLVM_CONFIG) --libdir) \ +- -Wl,--start-group -lclangBasic -lclangDriver \ +- -lclangFrontend -lclangEdit -lclangLex \ +- -lclangAST -Wl,--end-group \ +- $(shell $(LLVM_CONFIG) --libs Core option) \ ++ $(shell $(LLVM_CONFIG) --libs) \ + $(shell $(LLVM_CONFIG) --system-libs) \ ++ -lclang-cpp \ + > $(@:.bin=.make.output) 2>&1 + + -include $(OUTPUT)*.d +diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf +index b856afa6eb52..d0ff0ddf9c18 100644 +--- a/tools/perf/Makefile.perf ++++ b/tools/perf/Makefile.perf +@@ -410,14 +410,11 @@ EXTLIBS := $(call filter-out,$(EXCLUDE_EXTLIBS),$(EXTLIBS)) + LIBS = -Wl,--whole-archive $(PERFLIBS) $(EXTRA_PERFLIBS) -Wl,--no-whole-archive -Wl,--start-group $(EXTLIBS) -Wl,--end-group + + ifeq ($(USE_CLANG), 1) +- CLANGLIBS_LIST = AST Basic CodeGen Driver Frontend Lex Tooling Edit Sema Analysis Parse Serialization +- CLANGLIBS_NOEXT_LIST = $(foreach l,$(CLANGLIBS_LIST),$(shell $(LLVM_CONFIG) --libdir)/libclang$(l)) +- LIBCLANG = $(foreach l,$(CLANGLIBS_NOEXT_LIST),$(wildcard $(l).a $(l).so)) +- LIBS += -Wl,--start-group $(LIBCLANG) -Wl,--end-group ++ LIBS += -lclang-cpp + endif + + ifeq ($(USE_LLVM), 1) +- LIBLLVM = $(shell $(LLVM_CONFIG) --libs all) $(shell $(LLVM_CONFIG) --system-libs) ++ LIBLLVM = $(shell $(LLVM_CONFIG) --libs) $(shell $(LLVM_CONFIG) --system-libs) + LIBS += -L$(shell $(LLVM_CONFIG) --libdir) $(LIBLLVM) + endif + +-- +2.33.1 + diff --git a/sdk_container/src/third_party/portage-stable/dev-util/perf/files/perf-5.4.20-binutil-libs-2.34.patch b/sdk_container/src/third_party/portage-stable/dev-util/perf/files/perf-5.4.20-binutil-libs-2.34.patch deleted file mode 100644 index 9fa191f720..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-util/perf/files/perf-5.4.20-binutil-libs-2.34.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 0ada120c883d4f1f6aafd01cf0fbb10d8bbba015 Mon Sep 17 00:00:00 2001 -From: Changbin Du -Date: Tue, 28 Jan 2020 23:29:38 +0800 -Subject: perf: Make perf able to build with latest libbfd - -libbfd has changed the bfd_section_* macros to inline functions -bfd_section_ since 2019-09-18. See below two commits: - o http://www.sourceware.org/ml/gdb-cvs/2019-09/msg00064.html - o https://www.sourceware.org/ml/gdb-cvs/2019-09/msg00072.html - -This fix make perf able to build with both old and new libbfd. - -Signed-off-by: Changbin Du -Acked-by: Jiri Olsa -Cc: Peter Zijlstra -Link: http://lore.kernel.org/lkml/20200128152938.31413-1-changbin.du@gmail.com -Signed-off-by: Arnaldo Carvalho de Melo ---- - tools/perf/util/srcline.c | 16 +++++++++++++++- - 1 file changed, 15 insertions(+), 1 deletion(-) - -diff --git a/tools/perf/util/srcline.c b/tools/perf/util/srcline.c -index 6ccf6f6..5b7d6c1 100644 ---- a/tools/perf/util/srcline.c -+++ b/tools/perf/util/srcline.c -@@ -193,16 +193,30 @@ static void find_address_in_section(bfd *abfd, asection *section, void *data) - bfd_vma pc, vma; - bfd_size_type size; - struct a2l_data *a2l = data; -+ flagword flags; - - if (a2l->found) - return; - -- if ((bfd_get_section_flags(abfd, section) & SEC_ALLOC) == 0) -+#ifdef bfd_get_section_flags -+ flags = bfd_get_section_flags(abfd, section); -+#else -+ flags = bfd_section_flags(section); -+#endif -+ if ((flags & SEC_ALLOC) == 0) - return; - - pc = a2l->addr; -+#ifdef bfd_get_section_vma - vma = bfd_get_section_vma(abfd, section); -+#else -+ vma = bfd_section_vma(section); -+#endif -+#ifdef bfd_get_section_size - size = bfd_get_section_size(section); -+#else -+ size = bfd_section_size(section); -+#endif - - if (pc < vma || pc >= vma + size) - return; --- -cgit v1.1 - diff --git a/sdk_container/src/third_party/portage-stable/dev-util/perf/files/perf-5.4.6-fix-clang9.patch b/sdk_container/src/third_party/portage-stable/dev-util/perf/files/perf-5.4.6-fix-clang9.patch deleted file mode 100644 index 614e62f676..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-util/perf/files/perf-5.4.6-fix-clang9.patch +++ /dev/null @@ -1,17 +0,0 @@ -https://bugs.gentoo.org/695726 -Created-By: Maciej S. Szmigiero -Created-By: Dennis Schridde ---- a/tools/perf/util/c++/clang.cpp.orig 2019-12-20 16:39:21.015363866 +0100 -+++ b/tools/perf/util/c++/clang.cpp 2019-12-20 16:40:04.051639185 +0100 -@@ -71,7 +71,11 @@ - CompilerInstance Clang; - Clang.createDiagnostics(); - -+#if CLANG_VERSION_MAJOR < 9 - Clang.setVirtualFileSystem(&*VFS); -+#else -+ Clang.createFileManager(&*VFS); -+#endif - - #if CLANG_VERSION_MAJOR < 4 - IntrusiveRefCntPtr CI = diff --git a/sdk_container/src/third_party/portage-stable/dev-util/perf/files/perf-5.4.7-propagate-cflags.patch b/sdk_container/src/third_party/portage-stable/dev-util/perf/files/perf-5.4.7-propagate-cflags.patch deleted file mode 100644 index b1a9bcc25a..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-util/perf/files/perf-5.4.7-propagate-cflags.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 55542113c690a567e728e40d4181d7d037fc21b0 Mon Sep 17 00:00:00 2001 -From: Jiri Olsa -Date: Fri, 11 Oct 2019 14:21:55 +0200 -Subject: perf tools: Propagate CFLAGS to libperf - -Andi reported that 'make DEBUG=1' does not propagate to the libbperf -code. It's true also for the other flags. Changing the code to propagate -the global build flags to libperf compilation. - -Reported-by: Andi Kleen -Signed-off-by: Jiri Olsa -Cc: Alexander Shishkin -Cc: Michael Petlan -Cc: Namhyung Kim -Cc: Peter Zijlstra -Link: http://lore.kernel.org/lkml/20191011122155.15738-1-jolsa@kernel.org -Signed-off-by: Arnaldo Carvalho de Melo ---- - tools/perf/lib/core.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -(limited to 'tools/perf/lib/core.c') - -diff --git a/tools/perf/lib/core.c b/tools/perf/lib/core.c -index d0b9ae422b9f..58fc894b76c5 100644 ---- a/tools/perf/lib/core.c -+++ b/tools/perf/lib/core.c -@@ -5,11 +5,12 @@ - #include - #include - #include -+#include - #include - #include - #include "internal.h" - --static int __base_pr(enum libperf_print_level level, const char *format, -+static int __base_pr(enum libperf_print_level level __maybe_unused, const char *format, - va_list args) - { - return vfprintf(stderr, format, args); --- -cgit 1.2-0.3.lf.el7 - diff --git a/sdk_container/src/third_party/portage-stable/dev-util/perf/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-util/perf/metadata.xml index 6755b76325..3d3ce6d908 100644 --- a/sdk_container/src/third_party/portage-stable/dev-util/perf/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/dev-util/perf/metadata.xml @@ -1,41 +1,47 @@ - + - - naota@gentoo.org - - - dlan@gentoo.org - Yixun Lan - - - amadio@gentoo.org - Guilherme Amadio - - - Enable builtin clang and LLVM support - - Enable C++ symbol name demangling, using libbfd from - sys-devel/binutils. When this flag is enabled, the - package will have to be rebuilt after every version bump of - binutils. - - - Build documentation and man pages. With this USE flag disabled, - the --help parameter for perf and its sub-tools will not be - available. This is optional because it depends on a few - documentation handling tools that are not always welcome on user - systems. - - Enable NUMA support - - Add support for Perl as a scripting language for perf tools. - - - Add support to define SDT event in perf tools. - - - Use sys-libs/libunwind for frame unwinding support. - - + + naota@gentoo.org + + + dlan@gentoo.org + Yixun Lan + + + amadio@gentoo.org + Guilherme Amadio + + + zlogene@gentoo.org + Mikle Kolyada + + + Enable dev-util/babeltrace support + Enable builtin clang and LLVM support + + Enable C++ symbol name demangling, using libbfd from + sys-devel/binutils. When this flag is enabled, the + package will have to be rebuilt after every version bump of + binutils. + + + Build documentation and man pages. With this USE flag disabled, + the --help parameter for perf and its sub-tools will not be + available. This is optional because it depends on a few + documentation handling tools that are not always welcome on user + systems. + + Enable dev-libs/libpfm support + Enable NUMA support + + Add support for Perl as a scripting language for perf tools. + + + Add support to define SDT event in perf tools. + + + Use sys-libs/libunwind for frame unwinding support. + + diff --git a/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-3.12.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-3.12.ebuild deleted file mode 100644 index aca34af0c6..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-3.12.ebuild +++ /dev/null @@ -1,177 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -PYTHON_COMPAT=( python2_7 ) -inherit versionator eutils toolchain-funcs python-single-r1 linux-info - -MY_PV="${PV/_/-}" -MY_PV="${MY_PV/-pre/-git}" - -DESCRIPTION="Userland tools for Linux Performance Counters" -HOMEPAGE="https://perf.wiki.kernel.org/" - -LINUX_V="${PV:0:1}.x" -if [[ ${PV/_rc} != ${PV} ]] ; then - LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1)) - PATCH_VERSION=$(get_version_component_range 1-3) - LINUX_PATCH=patch-${PV//_/-}.bz2 - SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/${LINUX_PATCH} - https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/v${PATCH_VERSION}/${LINUX_PATCH}" -elif [[ $(get_version_component_count) == 4 ]] ; then - # stable-release series - LINUX_VER=$(get_version_component_range 1-3) - LINUX_PATCH=patch-${PV}.bz2 - SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_PATCH}" -else - LINUX_VER=${PV} - SRC_URI="" -fi - -LINUX_SOURCES="linux-${LINUX_VER}.tar.bz2" -SRC_URI+=" https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~arm ~ppc ~x86" -IUSE="audit +demangle +doc perl python slang unwind" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -RDEPEND="audit? ( sys-process/audit ) - demangle? ( sys-devel/binutils ) - perl? ( dev-lang/perl ) - slang? ( dev-libs/newt ) - unwind? ( sys-libs/libunwind ) - dev-libs/elfutils" -DEPEND="${RDEPEND} - ${LINUX_PATCH+dev-util/patchutils} - sys-devel/bison - sys-devel/flex - doc? ( - app-text/asciidoc - app-text/sgml-common - app-text/xmlto - sys-process/time - ) - python? ( ${PYTHON_DEPS} )" - -S_K="${WORKDIR}/linux-${LINUX_VER}" -S="${S_K}/tools/perf" - -CONFIG_CHECK="~PERF_EVENTS ~KALLSYMS" - -pkg_setup() { - linux-info_pkg_setup - use python && python-single-r1_pkg_setup -} - -src_unpack() { - local paths=( tools/perf tools/scripts tools/lib include lib "arch/*/include" "arch/*/lib" ) - - # We expect the tar implementation to support the -j option (both - # GNU tar and libarchive's tar support that). - echo ">>> Unpacking ${LINUX_SOURCES} (${paths[*]}) to ${PWD}" - tar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} \ - "${paths[@]/#/linux-${LINUX_VER}/}" || die - - if [[ -n ${LINUX_PATCH} ]] ; then - eshopts_push -o noglob - ebegin "Filtering partial source patch" - filterdiff -p1 ${paths[@]/#/-i } -z "${DISTDIR}"/${LINUX_PATCH} > ${P}.patch || die - eend $? || die "filterdiff failed" - eshopts_pop - fi - - local a - for a in ${A}; do - [[ ${a} == ${LINUX_SOURCES} ]] && continue - [[ ${a} == ${LINUX_PATCH} ]] && continue - unpack ${a} - done -} - -src_prepare() { - if [[ -n ${LINUX_PATCH} ]] ; then - cd "${S_K}" - epatch "${WORKDIR}"/${P}.patch - fi - - # Drop some upstream too-developer-oriented flags and fix the - # Makefile in general - sed -i \ - -e 's:-Werror::' \ - -e 's:-ggdb3::' \ - -e 's:-fstack-protector-all::' \ - -e 's:^LDFLAGS =:EXTLIBS +=:' \ - -e '/\(PERL\|PYTHON\)_EMBED_LDOPTS/s:ALL_LDFLAGS +=:EXTLIBS +=:' \ - -e '/-x c - /s:\$(ALL_LDFLAGS):\0 $(EXTLIBS):' \ - -e '/^ALL_CFLAGS =/s:$: $(CFLAGS_OPTIMIZE):' \ - -e '/^ALL_LDFLAGS =/s:$: $(LDFLAGS_OPTIMIZE):' \ - -e 's:$(sysconfdir_SQ)/bash_completion.d:/usr/share/bash-completion:' \ - "${S}"/Makefile || die - sed -i -e 's:-Werror::' "${S_K}"/tools/lib/lk/Makefile || die - sed -i \ - -e '/.FORCE-PERF-VERSION-FILE/s,.FORCE-PERF-VERSION-FILE,,g' \ - "${S}"/Makefile \ - "${S}"/Documentation/Makefile || die - - # Avoid the call to make kernelversion - echo "#define PERF_VERSION \"${MY_PV}\"" > PERF-VERSION-FILE - - # The code likes to compile local assembly files which lack ELF markings. - find -name '*.S' -exec sed -i '$a.section .note.GNU-stack,"",%progbits' {} + -} - -puse() { usex $1 "" no; } -perf_make() { - # The arch parsing is a bit funky. The perf tools package is integrated - # into the kernel, so it wants an ARCH that looks like the kernel arch, - # but it also wants to know about the split value -- i386/x86_64 vs just - # x86. We can get that by telling the func to use an older linux version. - # It's kind of a hack, but not that bad ... - local arch=$(KV=2.6.23 tc-arch-kernel) - emake -j1 V=1 \ - CC="$(tc-getCC)" AR="$(tc-getAR)" \ - prefix="/usr" bindir_relative="sbin" \ - CFLAGS_OPTIMIZE="${CFLAGS}" \ - LDFLAGS_OPTIMIZE="${LDFLAGS}" \ - ARCH="${arch}" \ - NO_DEMANGLE=$(puse demangle) \ - NO_LIBAUDIT=$(puse audit) \ - NO_LIBPERL=$(puse perl) \ - NO_LIBPYTHON=$(puse python) \ - NO_LIBUNWIND=$(puse unwind) \ - NO_NEWT=$(puse slang) \ - WERROR=0 \ - "$@" -} - -src_compile() { - perf_make - use doc && perf_make -C Documentation -} - -src_test() { - : -} - -src_install() { - perf_make install DESTDIR="${D}" - - dodoc CREDITS - - dodoc *txt Documentation/*.txt - if use doc ; then - dohtml Documentation/*.html - doman Documentation/*.1 - fi -} - -pkg_postinst() { - if ! use doc ; then - elog "Without the doc USE flag you won't get any documentation nor man pages." - elog "And without man pages, you won't get any --help output for perf and its" - elog "sub-tools." - fi -} diff --git a/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-3.13.1-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-3.13.1-r1.ebuild deleted file mode 100644 index 611fe2c9a0..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-3.13.1-r1.ebuild +++ /dev/null @@ -1,182 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -PYTHON_COMPAT=( python2_7 ) -inherit versionator eutils toolchain-funcs python-single-r1 linux-info - -MY_PV="${PV/_/-}" -MY_PV="${MY_PV/-pre/-git}" - -DESCRIPTION="Userland tools for Linux Performance Counters" -HOMEPAGE="https://perf.wiki.kernel.org/" - -LINUX_V="${PV:0:1}.x" -if [[ ${PV} == *_rc* ]] ; then - LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1)) - PATCH_VERSION=$(get_version_component_range 1-3) - LINUX_PATCH=patch-${PV//_/-}.xz - SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/${LINUX_PATCH} - https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/v${PATCH_VERSION}/${LINUX_PATCH}" -else - VER_COUNT=$(get_version_component_count) - if [[ ${VER_COUNT} -gt 2 ]] ; then - # stable-release series - LINUX_VER=$(get_version_component_range 1-2) - LINUX_PATCH=patch-${PV}.xz - SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_PATCH}" - else - LINUX_VER=${PV} - SRC_URI="" - fi -fi - -LINUX_SOURCES="linux-${LINUX_VER}.tar.xz" -SRC_URI+=" https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86" -IUSE="audit +demangle +doc gtk perl python slang unwind" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -RDEPEND="audit? ( sys-process/audit ) - demangle? ( sys-devel/binutils ) - gtk? ( x11-libs/gtk+:2 ) - perl? ( dev-lang/perl ) - slang? ( dev-libs/newt ) - unwind? ( sys-libs/libunwind ) - dev-libs/elfutils" -DEPEND="${RDEPEND} - ${LINUX_PATCH+dev-util/patchutils} - sys-devel/bison - sys-devel/flex - doc? ( - app-text/asciidoc - app-text/sgml-common - app-text/xmlto - sys-process/time - ) - python? ( ${PYTHON_DEPS} )" - -S_K="${WORKDIR}/linux-${LINUX_VER}" -S="${S_K}/tools/perf" - -CONFIG_CHECK="~PERF_EVENTS ~KALLSYMS" - -pkg_setup() { - linux-info_pkg_setup - use python && python-single-r1_pkg_setup -} - -src_unpack() { - local paths=( tools/perf tools/scripts tools/lib include lib "arch/*/include" "arch/*/lib" ) - - # We expect the tar implementation to support the -j option (both - # GNU tar and libarchive's tar support that). - echo ">>> Unpacking ${LINUX_SOURCES} (${paths[*]}) to ${PWD}" - tar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} \ - "${paths[@]/#/linux-${LINUX_VER}/}" || die - - if [[ -n ${LINUX_PATCH} ]] ; then - eshopts_push -o noglob - ebegin "Filtering partial source patch" - filterdiff -p1 ${paths[@]/#/-i } -z "${DISTDIR}"/${LINUX_PATCH} > ${P}.patch || die - eend $? || die "filterdiff failed" - eshopts_pop - fi - - local a - for a in ${A}; do - [[ ${a} == ${LINUX_SOURCES} ]] && continue - [[ ${a} == ${LINUX_PATCH} ]] && continue - unpack ${a} - done -} - -src_prepare() { - if [[ -n ${LINUX_PATCH} ]] ; then - cd "${S_K}" - epatch "${WORKDIR}"/${P}.patch - fi - - # Drop some upstream too-developer-oriented flags and fix the - # Makefile in general - sed -i \ - -e 's:-Werror::' \ - -e 's:-ggdb3::' \ - -e 's:-fstack-protector-all::' \ - -e 's:^LDFLAGS =:EXTLIBS +=:' \ - -e '/\(PERL\|PYTHON\)_EMBED_LDOPTS/s:ALL_LDFLAGS +=:EXTLIBS +=:' \ - -e '/-x c - /s:\$(ALL_LDFLAGS):\0 $(EXTLIBS):' \ - -e '/^ALL_CFLAGS =/s:$: $(CFLAGS_OPTIMIZE):' \ - -e '/^ALL_LDFLAGS =/s:$: $(LDFLAGS_OPTIMIZE):' \ - -e 's:$(sysconfdir_SQ)/bash_completion.d:/usr/share/bash-completion:' \ - "${S}"/Makefile || die - sed -i -e 's:-Werror::' "${S_K}"/tools/lib/lk/Makefile || die - sed -i \ - -e '/.FORCE-PERF-VERSION-FILE/s,.FORCE-PERF-VERSION-FILE,,g' \ - "${S}"/Makefile \ - "${S}"/Documentation/Makefile || die - - # Avoid the call to make kernelversion - echo "#define PERF_VERSION \"${MY_PV}\"" > PERF-VERSION-FILE - - # The code likes to compile local assembly files which lack ELF markings. - find -name '*.S' -exec sed -i '$a.section .note.GNU-stack,"",%progbits' {} + -} - -puse() { usex $1 "" no; } -perf_make() { - # The arch parsing is a bit funky. The perf tools package is integrated - # into the kernel, so it wants an ARCH that looks like the kernel arch, - # but it also wants to know about the split value -- i386/x86_64 vs just - # x86. We can get that by telling the func to use an older linux version. - # It's kind of a hack, but not that bad ... - local arch=$(KV=2.6.23 tc-arch-kernel) - emake V=1 \ - CC="$(tc-getCC)" AR="$(tc-getAR)" \ - prefix="/usr" bindir_relative="bin" \ - CFLAGS_OPTIMIZE="${CFLAGS}" \ - LDFLAGS_OPTIMIZE="${LDFLAGS}" \ - ARCH="${arch}" \ - NO_DEMANGLE=$(puse demangle) \ - NO_GTK2=$(puse gtk) \ - NO_LIBAUDIT=$(puse audit) \ - NO_LIBPERL=$(puse perl) \ - NO_LIBPYTHON=$(puse python) \ - NO_LIBUNWIND=$(puse unwind) \ - NO_NEWT=$(puse slang) \ - WERROR=0 \ - "$@" -} - -src_compile() { - perf_make -f Makefile.perf - use doc && perf_make -C Documentation -} - -src_test() { - : -} - -src_install() { - perf_make -f Makefile.perf install DESTDIR="${D}" - - dodoc CREDITS - - dodoc *txt Documentation/*.txt - if use doc ; then - dohtml Documentation/*.html - doman Documentation/*.1 - fi -} - -pkg_postinst() { - if ! use doc ; then - elog "Without the doc USE flag you won't get any documentation nor man pages." - elog "And without man pages, you won't get any --help output for perf and its" - elog "sub-tools." - fi -} diff --git a/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-3.15.5.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-3.15.5.ebuild deleted file mode 100644 index 5d12d19784..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-3.15.5.ebuild +++ /dev/null @@ -1,182 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -PYTHON_COMPAT=( python2_7 ) -inherit versionator eutils toolchain-funcs python-single-r1 linux-info - -MY_PV="${PV/_/-}" -MY_PV="${MY_PV/-pre/-git}" - -DESCRIPTION="Userland tools for Linux Performance Counters" -HOMEPAGE="https://perf.wiki.kernel.org/" - -LINUX_V="${PV:0:1}.x" -if [[ ${PV} == *_rc* ]] ; then - LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1)) - PATCH_VERSION=$(get_version_component_range 1-3) - LINUX_PATCH=patch-${PV//_/-}.xz - SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/${LINUX_PATCH} - https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/v${PATCH_VERSION}/${LINUX_PATCH}" -else - VER_COUNT=$(get_version_component_count) - if [[ ${VER_COUNT} -gt 2 ]] ; then - # stable-release series - LINUX_VER=$(get_version_component_range 1-2) - LINUX_PATCH=patch-${PV}.xz - SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_PATCH}" - else - LINUX_VER=${PV} - SRC_URI="" - fi -fi - -LINUX_SOURCES="linux-${LINUX_VER}.tar.xz" -SRC_URI+=" https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~arm ~ppc ~x86" -IUSE="audit debug +demangle +doc gtk perl python slang unwind" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -RDEPEND="audit? ( sys-process/audit ) - demangle? ( sys-devel/binutils ) - gtk? ( x11-libs/gtk+:2 ) - perl? ( dev-lang/perl ) - slang? ( dev-libs/newt ) - unwind? ( sys-libs/libunwind ) - dev-libs/elfutils" -DEPEND="${RDEPEND} - ${LINUX_PATCH+dev-util/patchutils} - sys-devel/bison - sys-devel/flex - doc? ( - app-text/asciidoc - app-text/sgml-common - app-text/xmlto - sys-process/time - ) - python? ( ${PYTHON_DEPS} )" - -S_K="${WORKDIR}/linux-${LINUX_VER}" -S="${S_K}/tools/perf" - -CONFIG_CHECK="~PERF_EVENTS ~KALLSYMS" - -pkg_setup() { - linux-info_pkg_setup - use python && python-single-r1_pkg_setup -} - -src_unpack() { - local paths=( tools/perf tools/scripts tools/include tools/lib include lib "arch/*/include" "arch/*/lib" ) - - # We expect the tar implementation to support the -j option (both - # GNU tar and libarchive's tar support that). - echo ">>> Unpacking ${LINUX_SOURCES} (${paths[*]}) to ${PWD}" - tar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} \ - "${paths[@]/#/linux-${LINUX_VER}/}" || die - - if [[ -n ${LINUX_PATCH} ]] ; then - eshopts_push -o noglob - ebegin "Filtering partial source patch" - filterdiff -p1 ${paths[@]/#/-i } -z "${DISTDIR}"/${LINUX_PATCH} > ${P}.patch || die - eend $? || die "filterdiff failed" - eshopts_pop - fi - - local a - for a in ${A}; do - [[ ${a} == ${LINUX_SOURCES} ]] && continue - [[ ${a} == ${LINUX_PATCH} ]] && continue - unpack ${a} - done -} - -src_prepare() { - if [[ -n ${LINUX_PATCH} ]] ; then - cd "${S_K}" - epatch "${WORKDIR}"/${P}.patch - fi - - # Drop some upstream too-developer-oriented flags and fix the - # Makefile in general - sed -i \ - -e 's:-Werror::' \ - -e 's:-ggdb3::' \ - -e 's:-fstack-protector-all::' \ - -e 's:^LDFLAGS =:EXTLIBS +=:' \ - -e '/\(PERL\|PYTHON\)_EMBED_LDOPTS/s:ALL_LDFLAGS +=:EXTLIBS +=:' \ - -e '/-x c - /s:\$(ALL_LDFLAGS):\0 $(EXTLIBS):' \ - -e '/^ALL_CFLAGS =/s:$: $(CFLAGS_OPTIMIZE):' \ - -e '/^ALL_LDFLAGS =/s:$: $(LDFLAGS_OPTIMIZE):' \ - -e 's:$(sysconfdir_SQ)/bash_completion.d:/usr/share/bash-completion:' \ - "${S}"/Makefile || die - sed -i -e 's:-Werror::' "${S_K}"/tools/lib/api/Makefile || die - sed -i \ - -e '/.FORCE-PERF-VERSION-FILE/s,.FORCE-PERF-VERSION-FILE,,g' \ - "${S}"/Makefile \ - "${S}"/Documentation/Makefile || die - - # Avoid the call to make kernelversion - echo "#define PERF_VERSION \"${MY_PV}\"" > PERF-VERSION-FILE - - # The code likes to compile local assembly files which lack ELF markings. - find -name '*.S' -exec sed -i '$a.section .note.GNU-stack,"",%progbits' {} + -} - -puse() { usex $1 "" no; } -perf_make() { - # The arch parsing is a bit funky. The perf tools package is integrated - # into the kernel, so it wants an ARCH that looks like the kernel arch, - # but it also wants to know about the split value -- i386/x86_64 vs just - # x86. We can get that by telling the func to use an older linux version. - # It's kind of a hack, but not that bad ... - local arch=$(KV=2.6.23 tc-arch-kernel) - emake V=1 \ - CC="$(tc-getCC)" AR="$(tc-getAR)" \ - prefix="/usr" bindir_relative="bin" \ - CFLAGS_OPTIMIZE="${CFLAGS}" \ - LDFLAGS_OPTIMIZE="${LDFLAGS}" \ - ARCH="${arch}" \ - NO_DEMANGLE=$(puse demangle) \ - NO_GTK2=$(puse gtk) \ - NO_LIBAUDIT=$(puse audit) \ - NO_LIBPERL=$(puse perl) \ - NO_LIBPYTHON=$(puse python) \ - NO_LIBUNWIND=$(puse unwind) \ - NO_NEWT=$(puse slang) \ - WERROR=0 \ - "$@" -} - -src_compile() { - perf_make -f Makefile.perf - use doc && perf_make -C Documentation -} - -src_test() { - : -} - -src_install() { - perf_make -f Makefile.perf install DESTDIR="${D}" - - dodoc CREDITS - - dodoc *txt Documentation/*.txt - if use doc ; then - dohtml Documentation/*.html - doman Documentation/*.1 - fi -} - -pkg_postinst() { - if ! use doc ; then - elog "Without the doc USE flag you won't get any documentation nor man pages." - elog "And without man pages, you won't get any --help output for perf and its" - elog "sub-tools." - fi -} diff --git a/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-4.1.5-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-4.1.5-r1.ebuild deleted file mode 100644 index eae2c68bad..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-4.1.5-r1.ebuild +++ /dev/null @@ -1,190 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -PYTHON_COMPAT=( python2_7 ) -inherit versionator eutils toolchain-funcs python-single-r1 linux-info - -MY_PV="${PV/_/-}" -MY_PV="${MY_PV/-pre/-git}" - -DESCRIPTION="Userland tools for Linux Performance Counters" -HOMEPAGE="https://perf.wiki.kernel.org/" - -LINUX_V="${PV:0:1}.x" -if [[ ${PV} == *_rc* ]] ; then - LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1)) - PATCH_VERSION=$(get_version_component_range 1-3) - LINUX_PATCH=patch-${PV//_/-}.xz - SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/${LINUX_PATCH} - https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/v${PATCH_VERSION}/${LINUX_PATCH}" -else - VER_COUNT=$(get_version_component_count) - if [[ ${VER_COUNT} -gt 2 ]] ; then - # stable-release series - LINUX_VER=$(get_version_component_range 1-2) - LINUX_PATCH=patch-${PV}.xz - SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_PATCH}" - else - LINUX_VER=${PV} - SRC_URI="" - fi -fi - -LINUX_SOURCES="linux-${LINUX_VER}.tar.xz" -SRC_URI+=" https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~ppc ~x86" -IUSE="audit debug +demangle +doc gtk numa perl python slang unwind" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -RDEPEND="audit? ( sys-process/audit ) - demangle? ( sys-devel/binutils:= ) - gtk? ( x11-libs/gtk+:2 ) - numa? ( sys-process/numactl ) - perl? ( dev-lang/perl ) - slang? ( dev-libs/newt ) - unwind? ( sys-libs/libunwind ) - dev-libs/elfutils" -DEPEND="${RDEPEND} - ${LINUX_PATCH+dev-util/patchutils} - sys-devel/bison - sys-devel/flex - doc? ( - app-text/asciidoc - app-text/sgml-common - app-text/xmlto - sys-process/time - ) - python? ( ${PYTHON_DEPS} )" - -S_K="${WORKDIR}/linux-${LINUX_VER}" -S="${S_K}/tools/perf" - -CONFIG_CHECK="~PERF_EVENTS ~KALLSYMS" - -pkg_setup() { - linux-info_pkg_setup - use python && python-single-r1_pkg_setup -} - -src_unpack() { - local paths=( - tools/build tools/include tools/lib tools/perf tools/scripts - include lib "arch/*/include" "arch/*/lib" - ) - - # We expect the tar implementation to support the -j option (both - # GNU tar and libarchive's tar support that). - echo ">>> Unpacking ${LINUX_SOURCES} (${paths[*]}) to ${PWD}" - tar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} \ - "${paths[@]/#/linux-${LINUX_VER}/}" || die - - if [[ -n ${LINUX_PATCH} ]] ; then - eshopts_push -o noglob - ebegin "Filtering partial source patch" - filterdiff -p1 ${paths[@]/#/-i } -z "${DISTDIR}"/${LINUX_PATCH} \ - > ${P}.patch || die - eend $? || die "filterdiff failed" - eshopts_pop - fi - - local a - for a in ${A}; do - [[ ${a} == ${LINUX_SOURCES} ]] && continue - [[ ${a} == ${LINUX_PATCH} ]] && continue - unpack ${a} - done -} - -src_prepare() { - if [[ -n ${LINUX_PATCH} ]] ; then - cd "${S_K}" - epatch "${WORKDIR}"/${P}.patch - fi - - epatch "${FILESDIR}"/${P}-prefix.patch - - # Drop some upstream too-developer-oriented flags and fix the - # Makefile in general - sed -i \ - -e 's:-Werror::' \ - -e 's:-ggdb3::' \ - -e 's:-fstack-protector-all::' \ - -e 's:^LDFLAGS =:EXTLIBS +=:' \ - -e '/\(PERL\|PYTHON\)_EMBED_LDOPTS/s:ALL_LDFLAGS +=:EXTLIBS +=:' \ - -e '/-x c - /s:\$(ALL_LDFLAGS):\0 $(EXTLIBS):' \ - -e '/^ALL_CFLAGS =/s:$: $(CFLAGS_OPTIMIZE):' \ - -e '/^ALL_LDFLAGS =/s:$: $(LDFLAGS_OPTIMIZE):' \ - -e 's:$(sysconfdir_SQ)/bash_completion.d:/usr/share/bash-completion:' \ - "${S}"/Makefile || die - sed -i -e 's:-Werror::' "${S_K}"/tools/lib/api/Makefile || die - sed -i \ - -e '/.FORCE-PERF-VERSION-FILE/s,.FORCE-PERF-VERSION-FILE,,g' \ - "${S}"/Makefile \ - "${S}"/Documentation/Makefile || die - - # Avoid the call to make kernelversion - echo "#define PERF_VERSION \"${MY_PV}\"" > PERF-VERSION-FILE - - # The code likes to compile local assembly files which lack ELF markings. - find -name '*.S' -exec sed -i '$a.section .note.GNU-stack,"",%progbits' {} + -} - -puse() { usex $1 "" no; } -perf_make() { - # The arch parsing is a bit funky. The perf tools package is integrated - # into the kernel, so it wants an ARCH that looks like the kernel arch, - # but it also wants to know about the split value -- i386/x86_64 vs just - # x86. We can get that by telling the func to use an older linux version. - # It's kind of a hack, but not that bad ... - local arch=$(tc-arch-kernel) - emake V=1 \ - CC="$(tc-getCC)" AR="$(tc-getAR)" \ - prefix="/usr" bindir_relative="bin" \ - CFLAGS_OPTIMIZE="${CFLAGS}" \ - LDFLAGS_OPTIMIZE="${LDFLAGS}" \ - ARCH="${arch}" \ - NO_DEMANGLE=$(puse demangle) \ - NO_GTK2=$(puse gtk) \ - NO_LIBAUDIT=$(puse audit) \ - NO_LIBPERL=$(puse perl) \ - NO_LIBPYTHON=$(puse python) \ - NO_LIBUNWIND=$(puse unwind) \ - NO_NEWT=$(puse slang) \ - NO_LIBNUMA=$(puse numa) \ - WERROR=0 \ - "$@" -} - -src_compile() { - perf_make -f Makefile.perf - use doc && perf_make -C Documentation -} - -src_test() { - : -} - -src_install() { - perf_make -f Makefile.perf install DESTDIR="${D}" - - dodoc CREDITS - - dodoc *txt Documentation/*.txt - if use doc ; then - dohtml Documentation/*.html - doman Documentation/*.1 - fi -} - -pkg_postinst() { - if ! use doc ; then - elog "Without the doc USE flag you won't get any documentation nor man pages." - elog "And without man pages, you won't get any --help output for perf and its" - elog "sub-tools." - fi -} diff --git a/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-4.4.4.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-4.4.4.ebuild deleted file mode 100644 index 5e0ea1294a..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-4.4.4.ebuild +++ /dev/null @@ -1,184 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -PYTHON_COMPAT=( python2_7 ) -inherit versionator eutils toolchain-funcs python-single-r1 linux-info - -MY_PV="${PV/_/-}" -MY_PV="${MY_PV/-pre/-git}" - -DESCRIPTION="Userland tools for Linux Performance Counters" -HOMEPAGE="https://perf.wiki.kernel.org/" - -LINUX_V="${PV:0:1}.x" -if [[ ${PV} == *_rc* ]] ; then - LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1)) - PATCH_VERSION=$(get_version_component_range 1-3) - LINUX_PATCH=patch-${PV//_/-}.xz - SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/${LINUX_PATCH} - https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/v${PATCH_VERSION}/${LINUX_PATCH}" -else - VER_COUNT=$(get_version_component_count) - if [[ ${VER_COUNT} -gt 2 ]] ; then - # stable-release series - LINUX_VER=$(get_version_component_range 1-2) - LINUX_PATCH=patch-${PV}.xz - SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_PATCH}" - else - LINUX_VER=${PV} - SRC_URI="" - fi -fi - -LINUX_SOURCES="linux-${LINUX_VER}.tar.xz" -SRC_URI+=" https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~arm ~ppc ~x86" -IUSE="audit debug +demangle +doc gtk numa perl python slang unwind" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -RDEPEND="audit? ( sys-process/audit ) - demangle? ( sys-devel/binutils:= ) - gtk? ( x11-libs/gtk+:2 ) - numa? ( sys-process/numactl ) - perl? ( dev-lang/perl ) - slang? ( dev-libs/newt ) - unwind? ( sys-libs/libunwind ) - dev-libs/elfutils" -DEPEND="${RDEPEND} - >=sys-kernel/linux-headers-4.4 - ${LINUX_PATCH+dev-util/patchutils} - sys-devel/bison - sys-devel/flex - doc? ( - app-text/asciidoc - app-text/sgml-common - app-text/xmlto - sys-process/time - ) - python? ( ${PYTHON_DEPS} )" - -S_K="${WORKDIR}/linux-${LINUX_VER}" -S="${S_K}/tools/perf" - -CONFIG_CHECK="~PERF_EVENTS ~KALLSYMS" - -pkg_setup() { - linux-info_pkg_setup - use python && python-single-r1_pkg_setup -} - -src_unpack() { - local paths=( - tools/arch tools/build tools/include tools/lib tools/perf tools/scripts - include lib "arch/*/lib" - ) - - # We expect the tar implementation to support the -j option (both - # GNU tar and libarchive's tar support that). - echo ">>> Unpacking ${LINUX_SOURCES} (${paths[*]}) to ${PWD}" - tar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} \ - "${paths[@]/#/linux-${LINUX_VER}/}" || die - - if [[ -n ${LINUX_PATCH} ]] ; then - eshopts_push -o noglob - ebegin "Filtering partial source patch" - filterdiff -p1 ${paths[@]/#/-i } -z "${DISTDIR}"/${LINUX_PATCH} \ - > ${P}.patch || die - eend $? || die "filterdiff failed" - eshopts_pop - fi - - local a - for a in ${A}; do - [[ ${a} == ${LINUX_SOURCES} ]] && continue - [[ ${a} == ${LINUX_PATCH} ]] && continue - unpack ${a} - done -} - -src_prepare() { - if [[ -n ${LINUX_PATCH} ]] ; then - cd "${S_K}" - epatch "${WORKDIR}"/${P}.patch - fi - - # Drop some upstream too-developer-oriented flags and fix the - # Makefile in general - sed -i \ - -e 's:-Werror::' \ - -e 's:-ggdb3::' \ - -e 's:-fstack-protector-all::' \ - -e 's:^LDFLAGS =:EXTLIBS +=:' \ - -e '/\(PERL\|PYTHON\)_EMBED_LDOPTS/s:ALL_LDFLAGS +=:EXTLIBS +=:' \ - -e '/-x c - /s:\$(ALL_LDFLAGS):\0 $(EXTLIBS):' \ - "${S}"/config/Makefile || die - sed -i \ - -e 's:$(sysconfdir_SQ)/bash_completion.d:/usr/share/bash-completion:' \ - "${S}"/Makefile.perf || die - sed -i -e 's:-Werror::' "${S_K}"/tools/lib/api/Makefile || die - - # Avoid the call to make kernelversion - echo "#define PERF_VERSION \"${MY_PV}\"" > PERF-VERSION-FILE - - # The code likes to compile local assembly files which lack ELF markings. - find -name '*.S' -exec sed -i '$a.section .note.GNU-stack,"",%progbits' {} + -} - -puse() { usex $1 "" no; } -perf_make() { - # The arch parsing is a bit funky. The perf tools package is integrated - # into the kernel, so it wants an ARCH that looks like the kernel arch, - # but it also wants to know about the split value -- i386/x86_64 vs just - # x86. We can get that by telling the func to use an older linux version. - # It's kind of a hack, but not that bad ... - local arch=$(tc-arch-kernel) - emake V=1 \ - CC="$(tc-getCC)" AR="$(tc-getAR)" LD="$(tc-getLD)" \ - prefix="/usr" bindir_relative="bin" \ - EXTRA_CFLAGS="${CFLAGS}" \ - ARCH="${arch}" \ - NO_DEMANGLE=$(puse demangle) \ - NO_GTK2=$(puse gtk) \ - NO_LIBAUDIT=$(puse audit) \ - NO_LIBPERL=$(puse perl) \ - NO_LIBPYTHON=$(puse python) \ - NO_LIBUNWIND=$(puse unwind) \ - NO_NEWT=$(puse slang) \ - NO_LIBNUMA=$(puse numa) \ - WERROR=0 \ - "$@" -} - -src_compile() { - perf_make -f Makefile.perf - use doc && perf_make -C Documentation -} - -src_test() { - : -} - -src_install() { - perf_make -f Makefile.perf install DESTDIR="${D}" - - dodoc CREDITS - - dodoc *txt Documentation/*.txt - if use doc ; then - dohtml Documentation/*.html - doman Documentation/*.1 - fi -} - -pkg_postinst() { - if ! use doc ; then - elog "Without the doc USE flag you won't get any documentation nor man pages." - elog "And without man pages, you won't get any --help output for perf and its" - elog "sub-tools." - fi -} diff --git a/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-4.9.13.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-4.9.13.ebuild deleted file mode 100644 index f5543c72d2..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-4.9.13.ebuild +++ /dev/null @@ -1,176 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -PYTHON_COMPAT=( python2_7 ) -inherit bash-completion-r1 versionator eutils toolchain-funcs python-single-r1 linux-info - -MY_PV="${PV/_/-}" -MY_PV="${MY_PV/-pre/-git}" - -DESCRIPTION="Userland tools for Linux Performance Counters" -HOMEPAGE="https://perf.wiki.kernel.org/" - -LINUX_V="${PV:0:1}.x" -if [[ ${PV} == *_rc* ]] ; then - LINUX_VER=$(get_version_component_range 1-2).$(($(get_version_component_range 3)-1)) - PATCH_VERSION=$(get_version_component_range 1-3) - LINUX_PATCH=patch-${PV//_/-}.xz - SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/${LINUX_PATCH} - https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/v${PATCH_VERSION}/${LINUX_PATCH}" -else - VER_COUNT=$(get_version_component_count) - if [[ ${VER_COUNT} -gt 2 ]] ; then - # stable-release series - LINUX_VER=$(get_version_component_range 1-2) - LINUX_PATCH=patch-${PV}.xz - SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_PATCH}" - else - LINUX_VER=${PV} - SRC_URI="" - fi -fi - -LINUX_SOURCES="linux-${LINUX_VER}.tar.xz" -SRC_URI+=" https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~arm ~ppc ~x86" -IUSE="audit debug +demangle +doc gtk numa perl python slang unwind" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -RDEPEND="audit? ( sys-process/audit ) - demangle? ( sys-devel/binutils ) - gtk? ( x11-libs/gtk+:2 ) - numa? ( sys-process/numactl ) - perl? ( dev-lang/perl ) - slang? ( dev-libs/newt ) - unwind? ( sys-libs/libunwind ) - dev-libs/elfutils" -DEPEND="${RDEPEND} - >=sys-kernel/linux-headers-4.4 - ${LINUX_PATCH+dev-util/patchutils} - sys-devel/bison - sys-devel/flex - doc? ( - app-text/asciidoc - app-text/sgml-common - app-text/xmlto - sys-process/time - ) - python? ( ${PYTHON_DEPS} )" - -S_K="${WORKDIR}/linux-${LINUX_VER}" -S="${S_K}/tools/perf" - -CONFIG_CHECK="~PERF_EVENTS ~KALLSYMS" - -pkg_setup() { - linux-info_pkg_setup - use python && python-single-r1_pkg_setup -} - -src_unpack() { - local paths=( - tools/arch tools/build tools/include tools/lib tools/perf tools/scripts - include lib "arch/*/lib" - ) - - # We expect the tar implementation to support the -j option (both - # GNU tar and libarchive's tar support that). - echo ">>> Unpacking ${LINUX_SOURCES} (${paths[*]}) to ${PWD}" - tar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} \ - "${paths[@]/#/linux-${LINUX_VER}/}" || die - - if [[ -n ${LINUX_PATCH} ]] ; then - eshopts_push -o noglob - ebegin "Filtering partial source patch" - filterdiff -p1 ${paths[@]/#/-i } -z "${DISTDIR}"/${LINUX_PATCH} \ - > ${P}.patch || die - eend $? || die "filterdiff failed" - eshopts_pop - fi - - local a - for a in ${A}; do - [[ ${a} == ${LINUX_SOURCES} ]] && continue - [[ ${a} == ${LINUX_PATCH} ]] && continue - unpack ${a} - done -} - -src_prepare() { - if [[ -n ${LINUX_PATCH} ]] ; then - cd "${S_K}" - epatch "${WORKDIR}"/${P}.patch - fi - - # Drop some upstream too-developer-oriented flags and fix the - # Makefile in general - sed -i \ - -e "s:\$(sysconfdir_SQ)/bash_completion.d:$(get_bashcompdir):" \ - "${S}"/Makefile.perf || die - sed -i -e 's:-Werror::' "${S_K}"/tools/lib/api/Makefile || die - - # Avoid the call to make kernelversion - echo "#define PERF_VERSION \"${MY_PV}\"" > PERF-VERSION-FILE - - # The code likes to compile local assembly files which lack ELF markings. - find -name '*.S' -exec sed -i '$a.section .note.GNU-stack,"",%progbits' {} + -} - -puse() { usex $1 "" no; } -perf_make() { - # The arch parsing is a bit funky. The perf tools package is integrated - # into the kernel, so it wants an ARCH that looks like the kernel arch, - # but it also wants to know about the split value -- i386/x86_64 vs just - # x86. We can get that by telling the func to use an older linux version. - # It's kind of a hack, but not that bad ... - local arch=$(tc-arch-kernel) - emake V=1 \ - CC="$(tc-getCC)" AR="$(tc-getAR)" LD="$(tc-getLD)" \ - prefix="/usr" bindir_relative="bin" \ - EXTRA_CFLAGS="${CFLAGS}" \ - ARCH="${arch}" \ - NO_DEMANGLE=$(puse demangle) \ - NO_GTK2=$(puse gtk) \ - NO_LIBAUDIT=$(puse audit) \ - NO_LIBPERL=$(puse perl) \ - NO_LIBPYTHON=$(puse python) \ - NO_LIBUNWIND=$(puse unwind) \ - NO_NEWT=$(puse slang) \ - NO_LIBNUMA=$(puse numa) \ - WERROR=0 \ - "$@" -} - -src_compile() { - perf_make -f Makefile.perf - use doc && perf_make -C Documentation -} - -src_test() { - : -} - -src_install() { - perf_make -f Makefile.perf install DESTDIR="${D}" - - dodoc CREDITS - - dodoc *txt Documentation/*.txt - if use doc ; then - dohtml Documentation/*.html - doman Documentation/*.1 - fi -} - -pkg_postinst() { - if ! use doc ; then - elog "Without the doc USE flag you won't get any documentation nor man pages." - elog "And without man pages, you won't get any --help output for perf and its" - elog "sub-tools." - fi -} diff --git a/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-5.12-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-5.12-r1.ebuild new file mode 100644 index 0000000000..3d3079203e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-5.12-r1.ebuild @@ -0,0 +1,267 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7..10} ) +inherit bash-completion-r1 estack llvm toolchain-funcs prefix python-r1 linux-info + +DESCRIPTION="Userland tools for Linux Performance Counters" +HOMEPAGE="https://perf.wiki.kernel.org/" + +LINUX_V="${PV:0:1}.x" +if [[ ${PV} == *_rc* ]] ; then + LINUX_VER=$(ver_cut 1-2).$(($(ver_cut 3)-1)) + PATCH_VERSION=$(ver_cut 1-3) + LINUX_PATCH=patch-${PV//_/-}.xz + SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/${LINUX_PATCH} + https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/v${PATCH_VERSION}/${LINUX_PATCH}" +elif [[ ${PV} == *.*.* ]] ; then + # stable-release series + LINUX_VER=$(ver_cut 1-2) + LINUX_PATCH=patch-${PV}.xz + SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_PATCH}" +else + LINUX_VER=${PV} + SRC_URI="" +fi + +LINUX_SOURCES="linux-${LINUX_VER}.tar.xz" +SRC_URI+=" https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux" +IUSE="audit babeltrace clang crypt debug +doc gtk java libpfm lzma numa perl python slang systemtap unwind zlib zstd" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +BDEPEND=" + ${LINUX_PATCH+dev-util/patchutils} + sys-devel/bison + sys-devel/flex + virtual/pkgconfig + doc? ( + app-text/asciidoc + app-text/sgml-common + app-text/xmlto + sys-process/time + ) + ${PYTHON_DEPS} +" + +RDEPEND="audit? ( sys-process/audit ) + babeltrace? ( dev-util/babeltrace ) + crypt? ( virtual/libcrypt:= ) + clang? ( + =sys-kernel/linux-headers-5.10 + java? ( virtual/jdk ) +" + +S_K="${WORKDIR}/linux-${LINUX_VER}" +S="${S_K}/tools/perf" + +CONFIG_CHECK="~PERF_EVENTS ~KALLSYMS" + +QA_FLAGS_IGNORED=( + usr/bin/perf-read-vdso32 # not linked with anything except for libc + usr/libexec/perf-core/dlfilters/dlfilter-test-api-v0.so # not installed +) + +pkg_pretend() { + if ! use doc ; then + ewarn "Without the doc USE flag you won't get any documentation nor man pages." + ewarn "And without man pages, you won't get any --help output for perf and its" + ewarn "sub-tools." + fi +} + +pkg_setup() { + use clang && LLVM_MAX_SLOT=9 llvm_pkg_setup + # We enable python unconditionally as libbpf always generates + # API headers using python script + python_setup +} + +# src_unpack and src_prepare are copied to dev-util/bpftool since +# it's building from the same tarball, please keep it in sync with bpftool +src_unpack() { + local paths=( + tools/arch tools/build tools/include tools/lib tools/perf tools/scripts + scripts include lib "arch/*/lib" + ) + + # We expect the tar implementation to support the -j option (both + # GNU tar and libarchive's tar support that). + echo ">>> Unpacking ${LINUX_SOURCES} (${paths[*]}) to ${PWD}" + tar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} \ + "${paths[@]/#/linux-${LINUX_VER}/}" || die + + if [[ -n ${LINUX_PATCH} ]] ; then + eshopts_push -o noglob + ebegin "Filtering partial source patch" + filterdiff -p1 ${paths[@]/#/-i } -z "${DISTDIR}"/${LINUX_PATCH} \ + > ${P}.patch + eend $? || die "filterdiff failed" + eshopts_pop + fi + + local a + for a in ${A}; do + [[ ${a} == ${LINUX_SOURCES} ]] && continue + [[ ${a} == ${LINUX_PATCH} ]] && continue + unpack ${a} + done +} + +src_prepare() { + default + if [[ -n ${LINUX_PATCH} ]] ; then + pushd "${S_K}" >/dev/null || die + eapply "${WORKDIR}"/${P}.patch + popd || die + fi + + # Drop some upstream too-developer-oriented flags and fix the + # Makefile in general + sed -i \ + -e "s:\$(sysconfdir_SQ)/bash_completion.d:$(get_bashcompdir):" \ + "${S}"/Makefile.perf || die + # A few places still use -Werror w/out $(WERROR) protection. + sed -i -e 's:-Werror::' \ + "${S}"/Makefile.perf "${S_K}"/tools/lib/bpf/Makefile || die + + # Avoid the call to make kernelversion + sed -i -e '/PERF-VERSION-GEN/d' Makefile.perf || die + echo "#define PERF_VERSION \"${PV}\"" > PERF-VERSION-FILE + + # The code likes to compile local assembly files which lack ELF markings. + find -name '*.S' -exec sed -i '$a.section .note.GNU-stack,"",%progbits' {} + + + # Fix shebang to use python from prefix + if [[ -n "${EPREFIX}" ]]; then + hprefixify ${S_K}/scripts/bpf_helpers_doc.py + fi +} + +puse() { usex $1 "" no; } +perf_make() { + # The arch parsing is a bit funky. The perf tools package is integrated + # into the kernel, so it wants an ARCH that looks like the kernel arch, + # but it also wants to know about the split value -- i386/x86_64 vs just + # x86. We can get that by telling the func to use an older linux version. + # It's kind of a hack, but not that bad ... + + # LIBDIR sets a search path of perf-gtk.so. Bug 515954 + + local arch=$(tc-arch-kernel) + local java_dir + use java && java_dir="${EPREFIX}/etc/java-config-2/current-system-vm" + # FIXME: NO_CORESIGHT + emake V=1 VF=1 \ + HOSTCC="$(tc-getBUILD_CC)" HOSTLD="$(tc-getBUILD_LD)" \ + CC="$(tc-getCC)" CXX="$(tc-getCXX)" AR="$(tc-getAR)" LD="$(tc-getLD)" NM="$(tc-getNM)" \ + PKG_CONFIG="$(tc-getPKG_CONFIG)" \ + prefix="${EPREFIX}/usr" bindir_relative="bin" \ + tipdir="share/doc/${PF}" \ + EXTRA_CFLAGS="${CFLAGS}" \ + EXTRA_LDFLAGS="${LDFLAGS}" \ + ARCH="${arch}" \ + JDIR="${java_dir}" \ + LIBCLANGLLVM=$(usex clang 1 "") \ + LIBPFM4=$(usex libpfm 1 "") \ + NO_AUXTRACE="" \ + NO_BACKTRACE="" \ + NO_CORESIGHT=1 \ + NO_DEMANGLE= \ + GTK2=$(usex gtk 1 "") \ + feature-gtk2-infobar=$(usex gtk 1 "") \ + NO_JVMTI=$(puse java) \ + NO_LIBAUDIT=$(puse audit) \ + NO_LIBBABELTRACE=$(puse babeltrace) \ + NO_LIBBIONIC=1 \ + NO_LIBBPF= \ + NO_LIBCRYPTO=$(puse crypt) \ + NO_LIBDW_DWARF_UNWIND= \ + NO_LIBELF= \ + NO_LIBNUMA=$(puse numa) \ + NO_LIBPERL=$(puse perl) \ + NO_LIBPYTHON=$(puse python) \ + NO_LIBUNWIND=$(puse unwind) \ + NO_LIBZSTD=$(puse zstd) \ + NO_SDT=$(puse systemtap) \ + NO_SLANG=$(puse slang) \ + NO_LZMA=$(puse lzma) \ + NO_ZLIB=$(puse zlib) \ + WERROR=0 \ + LIBDIR="/usr/libexec/perf-core" \ + libdir="${EPREFIX}/usr/$(get_libdir)" \ + plugindir="${EPREFIX}/usr/$(get_libdir)/perf/plugins" \ + "$@" +} + +src_compile() { + # test-clang.bin not build with g++ + if use clang; then + pushd "${S_K}/tools/build/feature/" || die + make V=1 CXX=${CHOST}-clang++ test-clang.bin || die + popd + fi + perf_make -f Makefile.perf + use doc && perf_make -C Documentation man +} + +src_test() { + : +} + +src_install() { + _install_python_ext() { + perf_make -f Makefile.perf install-python_ext DESTDIR="${D}" + } + + perf_make -f Makefile.perf install DESTDIR="${D}" + + if use python; then + python_foreach_impl _install_python_ext + fi + + if use gtk; then + local libdir + libdir="$(get_libdir)" + # on some arches it ends up in lib even on 64bit, ppc64 for instance. + [[ -f "${ED}"/usr/lib/libperf-gtk.so ]] && libdir="lib" + mv "${ED}"/usr/${libdir}/libperf-gtk.so \ + "${ED}"/usr/libexec/perf-core || die + fi + + dodoc CREDITS + + dodoc *txt Documentation/*.txt + + # perf needs this decompressed to print out tips for users + docompress -x /usr/share/doc/${PF}/tips.txt + + if use doc ; then + doman Documentation/*.1 + fi +} diff --git a/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-5.15-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-5.15-r1.ebuild new file mode 100644 index 0000000000..d676dd9534 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-5.15-r1.ebuild @@ -0,0 +1,266 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7..10} ) +inherit bash-completion-r1 estack llvm toolchain-funcs prefix python-r1 linux-info + +DESCRIPTION="Userland tools for Linux Performance Counters" +HOMEPAGE="https://perf.wiki.kernel.org/" + +LINUX_V="${PV:0:1}.x" +if [[ ${PV} == *_rc* ]] ; then + LINUX_VER=$(ver_cut 1-2).$(($(ver_cut 3)-1)) + PATCH_VERSION=$(ver_cut 1-3) + LINUX_PATCH=patch-${PV//_/-}.xz + SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/${LINUX_PATCH} + https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/v${PATCH_VERSION}/${LINUX_PATCH}" +elif [[ ${PV} == *.*.* ]] ; then + # stable-release series + LINUX_VER=$(ver_cut 1-2) + LINUX_PATCH=patch-${PV}.xz + SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_PATCH}" +else + LINUX_VER=${PV} + SRC_URI="" +fi + +LINUX_SOURCES="linux-${LINUX_VER}.tar.xz" +SRC_URI+=" https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux" +IUSE="audit babeltrace clang crypt debug +doc gtk java libpfm lzma numa perl python slang systemtap unwind zlib zstd" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +BDEPEND=" + ${LINUX_PATCH+dev-util/patchutils} + sys-devel/bison + sys-devel/flex + virtual/pkgconfig + doc? ( + app-text/asciidoc + app-text/sgml-common + app-text/xmlto + sys-process/time + ) + ${PYTHON_DEPS} +" + +RDEPEND="audit? ( sys-process/audit ) + babeltrace? ( dev-util/babeltrace ) + crypt? ( virtual/libcrypt:= ) + clang? ( + sys-devel/clang:= + sys-devel/llvm:= + ) + gtk? ( x11-libs/gtk+:2 ) + java? ( virtual/jre:* ) + libpfm? ( dev-libs/libpfm ) + lzma? ( app-arch/xz-utils ) + numa? ( sys-process/numactl ) + perl? ( dev-lang/perl:= ) + python? ( ${PYTHON_DEPS} ) + slang? ( sys-libs/slang ) + systemtap? ( dev-util/systemtap ) + unwind? ( sys-libs/libunwind ) + zlib? ( sys-libs/zlib ) + zstd? ( app-arch/zstd ) + dev-libs/elfutils + sys-libs/binutils-libs:=" + +DEPEND="${RDEPEND} + >=sys-kernel/linux-headers-5.10 + java? ( virtual/jdk ) +" + +S_K="${WORKDIR}/linux-${LINUX_VER}" +S="${S_K}/tools/perf" + +CONFIG_CHECK="~PERF_EVENTS ~KALLSYMS" + +QA_FLAGS_IGNORED=( + usr/bin/perf-read-vdso32 # not linked with anything except for libc + usr/libexec/perf-core/dlfilters/dlfilter-test-api-v0.so # not installed +) + +pkg_pretend() { + if ! use doc ; then + ewarn "Without the doc USE flag you won't get any documentation nor man pages." + ewarn "And without man pages, you won't get any --help output for perf and its" + ewarn "sub-tools." + fi +} + +pkg_setup() { + use clang && llvm_pkg_setup + # We enable python unconditionally as libbpf always generates + # API headers using python script + python_setup +} + +# src_unpack and src_prepare are copied to dev-util/bpftool since +# it's building from the same tarball, please keep it in sync with bpftool +src_unpack() { + local paths=( + tools/arch tools/build tools/include tools/lib tools/perf tools/scripts + scripts include lib "arch/*/lib" + ) + + # We expect the tar implementation to support the -j option (both + # GNU tar and libarchive's tar support that). + echo ">>> Unpacking ${LINUX_SOURCES} (${paths[*]}) to ${PWD}" + tar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} \ + "${paths[@]/#/linux-${LINUX_VER}/}" || die + + if [[ -n ${LINUX_PATCH} ]] ; then + eshopts_push -o noglob + ebegin "Filtering partial source patch" + filterdiff -p1 ${paths[@]/#/-i } -z "${DISTDIR}"/${LINUX_PATCH} \ + > ${P}.patch + eend $? || die "filterdiff failed" + eshopts_pop + fi + + local a + for a in ${A}; do + [[ ${a} == ${LINUX_SOURCES} ]] && continue + [[ ${a} == ${LINUX_PATCH} ]] && continue + unpack ${a} + done +} + +src_prepare() { + default + if [[ -n ${LINUX_PATCH} ]] ; then + pushd "${S_K}" >/dev/null || die + eapply "${WORKDIR}"/${P}.patch + popd || die + fi + + if use clang; then + pushd "${S_K}" >/dev/null || die + eapply "${FILESDIR}"/${P}-clang.patch + popd || die + fi + + # Drop some upstream too-developer-oriented flags and fix the + # Makefile in general + sed -i \ + -e "s:\$(sysconfdir_SQ)/bash_completion.d:$(get_bashcompdir):" \ + "${S}"/Makefile.perf || die + # A few places still use -Werror w/out $(WERROR) protection. + sed -i -e 's:-Werror::' \ + "${S}"/Makefile.perf "${S_K}"/tools/lib/bpf/Makefile || die + + # Avoid the call to make kernelversion + sed -i -e '/PERF-VERSION-GEN/d' Makefile.perf || die + echo "#define PERF_VERSION \"${PV}\"" > PERF-VERSION-FILE + + # The code likes to compile local assembly files which lack ELF markings. + find -name '*.S' -exec sed -i '$a.section .note.GNU-stack,"",%progbits' {} + +} + +puse() { usex $1 "" no; } +perf_make() { + # The arch parsing is a bit funky. The perf tools package is integrated + # into the kernel, so it wants an ARCH that looks like the kernel arch, + # but it also wants to know about the split value -- i386/x86_64 vs just + # x86. We can get that by telling the func to use an older linux version. + # It's kind of a hack, but not that bad ... + + # LIBDIR sets a search path of perf-gtk.so. Bug 515954 + + local arch=$(tc-arch-kernel) + local java_dir + use java && java_dir="${EPREFIX}/etc/java-config-2/current-system-vm" + # FIXME: NO_CORESIGHT + emake V=1 VF=1 \ + HOSTCC="$(tc-getBUILD_CC)" HOSTLD="$(tc-getBUILD_LD)" \ + CC="$(tc-getCC)" CXX="$(tc-getCXX)" AR="$(tc-getAR)" LD="$(tc-getLD)" NM="$(tc-getNM)" \ + PKG_CONFIG="$(tc-getPKG_CONFIG)" \ + prefix="${EPREFIX}/usr" bindir_relative="bin" \ + tipdir="share/doc/${PF}" \ + EXTRA_CFLAGS="${CFLAGS}" \ + EXTRA_LDFLAGS="${LDFLAGS}" \ + ARCH="${arch}" \ + JDIR="${java_dir}" \ + LIBCLANGLLVM=$(usex clang 1 "") \ + LIBPFM4=$(usex libpfm 1 "") \ + NO_AUXTRACE="" \ + NO_BACKTRACE="" \ + NO_CORESIGHT=1 \ + NO_DEMANGLE= \ + GTK2=$(usex gtk 1 "") \ + feature-gtk2-infobar=$(usex gtk 1 "") \ + NO_JVMTI=$(puse java) \ + NO_LIBAUDIT=$(puse audit) \ + NO_LIBBABELTRACE=$(puse babeltrace) \ + NO_LIBBIONIC=1 \ + NO_LIBBPF= \ + NO_LIBCRYPTO=$(puse crypt) \ + NO_LIBDW_DWARF_UNWIND= \ + NO_LIBELF= \ + NO_LIBNUMA=$(puse numa) \ + NO_LIBPERL=$(puse perl) \ + NO_LIBPYTHON=$(puse python) \ + NO_LIBUNWIND=$(puse unwind) \ + NO_LIBZSTD=$(puse zstd) \ + NO_SDT=$(puse systemtap) \ + NO_SLANG=$(puse slang) \ + NO_LZMA=$(puse lzma) \ + NO_ZLIB=$(puse zlib) \ + WERROR=0 \ + LIBDIR="/usr/libexec/perf-core" \ + libdir="${EPREFIX}/usr/$(get_libdir)" \ + plugindir="${EPREFIX}/usr/$(get_libdir)/perf/plugins" \ + "$@" +} + +src_compile() { + # test-clang.bin not build with g++ + if use clang; then + make -C "${S_K}/tools/build/feature" V=1 CXX=${CHOST}-clang++ test-clang.bin || die + fi + perf_make -f Makefile.perf + use doc && perf_make -C Documentation man +} + +src_test() { + : +} + +src_install() { + _install_python_ext() { + perf_make -f Makefile.perf install-python_ext DESTDIR="${D}" + } + + perf_make -f Makefile.perf install DESTDIR="${D}" + + if use python; then + python_foreach_impl _install_python_ext + fi + + if use gtk; then + local libdir + libdir="$(get_libdir)" + # on some arches it ends up in lib even on 64bit, ppc64 for instance. + [[ -f "${ED}"/usr/lib/libperf-gtk.so ]] && libdir="lib" + mv "${ED}"/usr/${libdir}/libperf-gtk.so \ + "${ED}"/usr/libexec/perf-core || die + fi + + dodoc CREDITS + + dodoc *txt Documentation/*.txt + + # perf needs this decompressed to print out tips for users + docompress -x /usr/share/doc/${PF}/tips.txt + + if use doc ; then + doman Documentation/*.1 + fi +} diff --git a/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-5.8.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-5.8.ebuild index ef18f14722..38ceee391a 100644 --- a/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-5.8.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-5.8.ebuild @@ -1,10 +1,10 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -PYTHON_COMPAT=( python3_{6,7} ) -inherit bash-completion-r1 estack eutils llvm toolchain-funcs prefix python-r1 linux-info +PYTHON_COMPAT=( python3_{7,8} ) +inherit bash-completion-r1 estack llvm toolchain-funcs prefix python-r1 linux-info MY_PV="${PV/_/-}" MY_PV="${MY_PV/-pre/-git}" @@ -34,7 +34,7 @@ SRC_URI+=" https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}" LICENSE="GPL-2" SLOT="0" -KEYWORDS="~alpha amd64 ~arm arm64 ~mips ~ppc ~ppc64 ~x86 amd64-linux ~x86-linux" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" IUSE="audit clang crypt debug +demangle +doc gtk java lzma numa perl python slang systemtap unwind zlib" # TODO babeltrace REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" @@ -62,6 +62,7 @@ DEPEND="${RDEPEND} ${LINUX_PATCH+dev-util/patchutils} sys-devel/bison sys-devel/flex + virtual/pkgconfig java? ( virtual/jdk ) doc? ( app-text/asciidoc @@ -184,6 +185,8 @@ perf_make() { NO_ZLIB= \ WERROR=0 \ LIBDIR="/usr/libexec/perf-core" \ + libdir="${EPREFIX}/usr/$(get_libdir)" \ + plugindir="${EPREFIX}/usr/$(get_libdir)/perf/plugins" \ "$@" }