Verified Commit 0bb57254 authored by Josef Schlehofer's avatar Josef Schlehofer 💬
Browse files

patches/openwrt: perf: backport patches from OpenWrt master

parent 2c83b69e
Pipeline #76462 failed with stage
in 26 seconds
From 6228236e1b75513b4708f5c3749093fbe4759ed5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marek=20Beh=C3=BAn?= <kabel@blackhole.sk>
Date: Sat, 26 Sep 2020 21:42:52 +0000
Subject: [PATCH 1/2] perf: fix building with musl when NLS is enabled
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This package fails with a strange error when building with musl when NLS
is enabled. The configuration thinks that libelf is not present, even
though DEPENDS contains +libelf, because when NLS is enabled, libelf.so
depends on libintl, and the correct LDFLAGS are missing for
libintl-full. This then causes the configuration script to check for
glibc, but this fails because we are using musl.
Signed-off-by: Marek Behún <kabel@blackhole.sk>
(cherry picked from commit d4161798dd4061bd861aac5b34bca0e2900bc3fd)
---
package/devel/perf/Makefile | 3 +++
1 file changed, 3 insertions(+)
diff --git a/package/devel/perf/Makefile b/package/devel/perf/Makefile
index ff5eb2e033..61ea339fef 100644
--- a/package/devel/perf/Makefile
+++ b/package/devel/perf/Makefile
@@ -22,6 +22,7 @@ PKG_FLAGS:=nonshared
PKG_BUILD_DIR:=$(LINUX_DIR)/tools/perf-$(TARGET_DIR_NAME)
include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
define Package/perf
SECTION:=devel
@@ -40,6 +41,8 @@ define Build/Prepare
$(CP) $(LINUX_DIR)/tools/perf/* $(PKG_BUILD_DIR)/
endef
+TARGET_LDFLAGS += $(INTL_LDFLAGS)
+
MAKE_FLAGS = \
ARCH="$(LINUX_KARCH)" \
NO_LIBPERL=1 \
--
2.25.1
From ca7d625b3acb5ac66ec0b803de0a75414865f8de Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marek=20Beh=C3=BAn?= <kabel@blackhole.sk>
Date: Sat, 26 Sep 2020 21:49:50 +0000
Subject: [PATCH 2/2] perf: pass CFLAGS correctly
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
For this package CFLAGS have to be passed via EXTRA_CFLAGS.
On arm this bug causes build to fail because no -fPIC is present in CFLAGS.
Signed-off-by: Marek Behún <kabel@blackhole.sk>
(cherry picked from commit 3d0fa1a012a9e67cad19274c35719f77a243ac82)
---
package/devel/perf/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/devel/perf/Makefile b/package/devel/perf/Makefile
index 61ea339fef..2f58154461 100644
--- a/package/devel/perf/Makefile
+++ b/package/devel/perf/Makefile
@@ -59,7 +59,7 @@ MAKE_FLAGS = \
CROSS_COMPILE="$(TARGET_CROSS)" \
CC="$(TARGET_CC)" \
LD="$(TARGET_CROSS)ld" \
- CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
+ EXTRA_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
$(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='') \
WERROR=0 \
--
2.25.1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment