diff --git a/0001-Fix-build-flag-passing-for-intel-speed-select.patch b/0001-Fix-build-flag-passing-for-intel-speed-select.patch new file mode 100644 index 0000000..ce347b7 --- /dev/null +++ b/0001-Fix-build-flag-passing-for-intel-speed-select.patch @@ -0,0 +1,46 @@ +From a0c122c4fb17f350396cb664d2fc184df9872279 Mon Sep 17 00:00:00 2001 +From: "Herton R. Krzesinski" +Date: Mon, 4 Apr 2022 17:43:26 -0300 +Subject: [PATCH] tools/power/x86/intel-speed-select: fix build failure when + using -Wl,--as-needed + +Upstream Status: patch submitted to platform-driver-x86/upstream maintainer + +Build of intel-speed-select will fail if you run: + +$ LDFLAGS="-Wl,--as-needed" /usr/bin/make V=1 +... +gcc -O2 -Wall -g -D_GNU_SOURCE -Iinclude -I/usr/include/libnl3 -Wl,--as-needed -lnl-genl-3 -lnl-3 intel-speed-select-in.o -o intel-speed-select +/usr/bin/ld: intel-speed-select-in.o: in function `handle_event': +(...)/linux/tools/power/x86/intel-speed-select/hfi-events.c:189: undefined reference to `nlmsg_hdr' +... + +In this case the problem is that order when linking matters when using +the flag -Wl,--as-needed, symbols not used at that point are discarded. +So since intel-speed-select-in.o comes after, at that point the +libraries/symbols are already discarded and then missing/undefined +references are reported. + +To fix this, make sure we specify LDFLAGS after the object file. + +Signed-off-by: Herton R. Krzesinski +--- + tools/power/x86/intel-speed-select/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/power/x86/intel-speed-select/Makefile b/tools/power/x86/intel-speed-select/Makefile +index 846f785e278d..7221f2f55e8b 100644 +--- a/tools/power/x86/intel-speed-select/Makefile ++++ b/tools/power/x86/intel-speed-select/Makefile +@@ -42,7 +42,7 @@ ISST_IN := $(OUTPUT)intel-speed-select-in.o + $(ISST_IN): prepare FORCE + $(Q)$(MAKE) $(build)=intel-speed-select + $(OUTPUT)intel-speed-select: $(ISST_IN) +- $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ ++ $(QUIET_LINK)$(CC) $(CFLAGS) $< $(LDFLAGS) -o $@ + + clean: + rm -f $(ALL_PROGRAMS) +-- +GitLab + diff --git a/0001-iio-Use-event-header-from-kernel-tree.patch b/0001-iio-Use-event-header-from-kernel-tree.patch deleted file mode 100644 index 1724db3..0000000 --- a/0001-iio-Use-event-header-from-kernel-tree.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 0eadbb65c0026fb4eec89c54f6b48a0febd87f92 Mon Sep 17 00:00:00 2001 -From: Laura Abbott -Date: Fri, 9 Sep 2016 08:19:17 -0700 -Subject: [PATCH] iio: Use type header from kernel tree -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit -To: Jonathan Cameron -To: Hartmut Knaack -To: Lars-Peter Clausen -To: Peter Meerwald-Stadler -Cc: linux-iio@vger.kernel.org -Cc: linux-kernel@vger.kernel.org - - -The iio tools have been updated as new event types have been added to -the kernel. The tools currently use the standard system headers which -means that the system may not have the newest defintitions. This leads -to build failures when building newer tools on older hosts: - -gcc -Wall -g -D_GNU_SOURCE -c -o iio_event_monitor.o -iio_event_monitor.c -iio_event_monitor.c:59:3: error: ‘IIO_UVINDEX’ undeclared here (not in a -function) - [IIO_UVINDEX] = "uvindex", - ^~~~~~~~~~~ -iio_event_monitor.c:59:3: error: array index in initializer not of -integer type -iio_event_monitor.c:59:3: note: (near initialization for -‘iio_chan_type_name_spec’) -iio_event_monitor.c:97:3: error: ‘IIO_MOD_LIGHT_UV’ undeclared here (not -in a function) - [IIO_MOD_LIGHT_UV] = "uv", - ^~~~~~~~~~~~~~~~ -iio_event_monitor.c:97:3: error: array index in initializer not of -integer type -iio_event_monitor.c:97:3: note: (near initialization for -‘iio_modifier_names’) -: recipe for target 'iio_event_monitor.o' failed - -Switch to using the header from the kernel tree to ensure the newest -defintions are always picked up. - -Signed-off-by: Laura Abbott ---- - tools/iio/iio_event_monitor.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c -index d9b7e0f..f02523d 100644 ---- a/tools/iio/iio_event_monitor.c -+++ b/tools/iio/iio_event_monitor.c -@@ -26,7 +26,7 @@ - #include - #include "iio_utils.h" - #include --#include -+#include "../../include/uapi/linux/iio/types.h" - - static const char * const iio_chan_type_name_spec[] = { - [IIO_VOLTAGE] = "voltage", --- -2.7.4 - diff --git a/kernel-tools.spec b/kernel-tools.spec index 607150e..94e3a06 100644 --- a/kernel-tools.spec +++ b/kernel-tools.spec @@ -4,7 +4,7 @@ # For a stable, released kernel, released_kernel should be 1. For rawhide # and/or a kernel built from an rc or git snapshot, released_kernel should # be 0. -%global released_kernel 1 +%global released_kernel 0 %global baserelease 1 %global fedora_build %{baserelease} @@ -31,7 +31,7 @@ %global upstream_sublevel %(echo $((%{base_sublevel} + 1))) # The rc snapshot level -%global rcrev 0 +%global rcrev 1 # Set rpm version accordingly %global rpmversion 5.%{upstream_sublevel}.0 %endif @@ -106,8 +106,7 @@ Source5000: patch-5.%{upstream_sublevel}-rc%{rcrev}.xz %endif %endif -# ongoing complaint, full discussion delayed until ksummit/plumbers -Patch0: 0001-iio-Use-event-header-from-kernel-tree.patch +Patch1: 0001-Fix-build-flag-passing-for-intel-speed-select.patch # rpmlint cleanup Patch6: 0002-perf-Don-t-make-sourced-script-executable.patch @@ -203,7 +202,7 @@ cd linux-%{kversion} xzcat %{SOURCE5000} | patch -p1 -F1 -s %endif -%patch0 -p1 +%patch1 -p1 %patch6 -p1 # END OF PATCH APPLICATIONS @@ -263,7 +262,7 @@ chmod +x tools/power/cpupower/utils/version-gen.sh %{tools_make} popd pushd tools/power/x86/intel-speed-select - %{tools_make} CFLAGS+="-D_GNU_SOURCE -Iinclude" + %{tools_make} CFLAGS+="-D_GNU_SOURCE -Iinclude -I/usr/include/libnl3" popd %endif pushd tools/thermal/tmon/ @@ -353,7 +352,7 @@ install -m644 %{SOURCE2001} %{buildroot}%{_sysconfdir}/sysconfig/cpupower %{tools_make} DESTDIR=%{buildroot} install popd pushd tools/power/x86/intel-speed-select - %{tools_make} CFLAGS+="-D_GNU_SOURCE -Iinclude" DESTDIR=%{buildroot} install + %{tools_make} CFLAGS+="-D_GNU_SOURCE -Iinclude -I/usr/include/libnl3" DESTDIR=%{buildroot} install popd %endif pushd tools/thermal/tmon @@ -490,6 +489,9 @@ popd %license linux-%{kversion}/COPYING %changelog +* Mon Apr 04 2022 Justin M. Forbes - 5.18.0-0.rc1.git0.1 +- Linux v5.18-rc1 + * Mon Mar 21 2022 Justin M. Forbes - 5.17.0-1 - Linux v5.17.0 diff --git a/sources b/sources index 2e5b539..bb471dc 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (linux-5.17.tar.xz) = 89f0a7ca69d20a539d4b612a7028a30a5e98b402e4b6b88516f14237e5da4b626d7929eab8b40fccc90766e8f3bae87e9858a19077ffad20d8204acf18794f5b +SHA512 (patch-5.18-rc1.xz) = 606d1866fe0b93f5770ec0e247dfd8e5a18119253cc8eba20618c394d6b3c0a9d38f591515b7d3275f55ed1b1c83a102bd41c9dd54550804ee55354facbf47a4