1 Commits

Author SHA256 Message Date
6eb88c34e4 Sync changes to SLFO-1.2 branch 2025-08-20 13:42:39 +02:00
4 changed files with 0 additions and 172 deletions

View File

@@ -1,54 +0,0 @@
From: Frank Ch. Eigler <fche@redhat.com>
Date: Thu Jan 9 18:30:13 2025 -0500
Subject: linux 6.13/fedora compatibility
Git-commit: ebee5ff5bda46f331ae5eade5185f1816e4b45f0
Signed-off-by: Tony Jones <tonyj@suse.de>
PR32458: linux 6.13/fedora compatibility
It appears as though an unnecessarily complicated bit of our
module-building process, invoking a nested $(MAKE) to generate the
STAPCONF_HEADER header file. This stopped working with a fedora
rawhide 6.13-rc thing, leading to frankly mystifying phenomena,
including our own generated Makefile being rewritten (!!!). This
is now simplified.
diff --git a/buildrun.cxx b/buildrun.cxx
index e5cb563b8..1dae071d1 100644
--- a/buildrun.cxx
+++ b/buildrun.cxx
@@ -345,11 +345,6 @@ compile_pass (systemtap_session& s)
o << "STAPCONF_HEADER := " << s.tmpdir << "/" << s.stapconf_name << endl;
o << ".DELETE_ON_ERROR: $(STAPCONF_HEADER)" << endl;
- o << "$(STAPCONF_HEADER):" << endl;
- o << "\t";
- if (s.verbose < 4)
- o << "@";
- o << "$(MAKE) -f \"$(firstword $(MAKEFILE_LIST))\" gen-stapconf" << endl;
vector<string> cs; // to hold autoconf C file names
@@ -570,8 +565,10 @@ compile_pass (systemtap_session& s)
o2.close ();
- o << ".PHONY: gen-stapconf" << endl;
- o << "gen-stapconf: " << stap_export_nm;
+ // PR32458 (!) Build the combined conf header as an ordinary
+ // dependency of the module.o file. Don't invoke a sub-$(MAKE) with
+ // crude command line parsing.
+ o << "$(STAPCONF_HEADER): " << stap_export_nm;
for (unsigned i=0; i<cs.size(); i++)
o << " " << s.tmpdir << "/" << cs[i] << ".h";
o << endl;
@@ -580,7 +577,8 @@ compile_pass (systemtap_session& s)
if (s.verbose < 4)
o << "@";
o << "cat $^ > $(STAPCONF_HEADER)" << endl;
-
+ o << s.module_name <<".o : $(STAPCONF_HEADER)" << endl;
+
o << module_cflags << " += -include $(STAPCONF_HEADER)" << endl;
for (unsigned i=0; i<s.c_macros.size(); i++)

View File

@@ -1,101 +0,0 @@
From: Frank Ch. Eigler <fche@redhat.com>
Date: Fri Jan 17 19:40:56 2025 -0500
Subject: rawhide (6.13) kbuild compatibility
Git-commit: 048ee97b8d57209e824c7078b34f4a130da40363
Signed-off-by: Tony Jones <tonyj@suse.de>
PR32458: rawhide (6.13) kbuild compatibility
Subject kernel versions introduce changes to the kbuild $(MAKE)
invocations process command line options, and twiddle with working
directories, making our systemtap module Makefile not quite
compatible. Sprinkle $(obj)/ liberally around all the generated
header files (used for autoconf* purposes) and nearby. This appears
to make both >6.13 and <6.13 kbuilds happy.
diff --git a/buildrun.cxx b/buildrun.cxx
index 1dae071d1..f369135af 100644
--- a/buildrun.cxx
+++ b/buildrun.cxx
@@ -186,7 +186,7 @@ output_autoconf(systemtap_session& s, ofstream& o,
const char *deffalse)
{
autoconf_c_files.push_back (autoconf_c);
- o << endl << s.tmpdir << "/" << autoconf_c << ".h:" << endl;
+ o << endl << "$(obj)/" << autoconf_c << ".h:" << endl;
o << "\t";
if (s.verbose < 4)
o << "@";
@@ -286,7 +286,8 @@ compile_pass (systemtap_session& s)
string makefile_nm = s.tmpdir + "/Makefile";
ofstream o (makefile_nm.c_str());
- string stap_export_nm = s.tmpdir + "/stapconf_export.h";
+ string stap_export_basenm = "stapconf_export.h";
+ string stap_export_nm = s.tmpdir + "/" + stap_export_basenm;
ofstream o2 (stap_export_nm.c_str());
// Create makefile
@@ -343,7 +344,7 @@ compile_pass (systemtap_session& s)
o << module_cflags << " += -Wmissing-prototypes" << endl; // GCC14 prep, PR31288
- o << "STAPCONF_HEADER := " << s.tmpdir << "/" << s.stapconf_name << endl;
+ o << "STAPCONF_HEADER := " << "$(obj)/" << s.stapconf_name << endl;
o << ".DELETE_ON_ERROR: $(STAPCONF_HEADER)" << endl;
vector<string> cs; // to hold autoconf C file names
@@ -568,16 +569,16 @@ compile_pass (systemtap_session& s)
// PR32458 (!) Build the combined conf header as an ordinary
// dependency of the module.o file. Don't invoke a sub-$(MAKE) with
// crude command line parsing.
- o << "$(STAPCONF_HEADER): " << stap_export_nm;
+ o << "$(STAPCONF_HEADER): " << "$(obj)/" << stap_export_basenm;
for (unsigned i=0; i<cs.size(); i++)
- o << " " << s.tmpdir << "/" << cs[i] << ".h";
+ o << " " << "$(obj)/" << cs[i] << ".h";
o << endl;
o << "\t";
if (s.verbose < 4)
o << "@";
o << "cat $^ > $(STAPCONF_HEADER)" << endl;
- o << s.module_name <<".o : $(STAPCONF_HEADER)" << endl;
+ o << "$(obj)/" << s.module_name <<".o : $(STAPCONF_HEADER)" << endl;
o << module_cflags << " += -include $(STAPCONF_HEADER)" << endl;
@@ -692,18 +693,20 @@ compile_pass (systemtap_session& s)
}
o << " stap_symbols.o" << endl;
- o << s.tmpdir << "/stap_symbols.o: $(STAPCONF_HEADER)" << endl;
+ o << "$(obj)/stap_symbols.o: $(STAPCONF_HEADER)" << endl;
// add all stapconf dependencies
string translated = s.translated_source;
+ translated = translated.substr(translated.rfind('/')+1); // basename
translated[translated.size()-1] = 'o';
- o << translated << ": $(STAPCONF_HEADER)" << endl;
+ o << "$(obj)/" << translated << ": $(STAPCONF_HEADER)" << endl;
translated[translated.size()-1] = 'i';
- o << translated << ": $(STAPCONF_HEADER)" << endl;
+ o << "$(obj)/" << translated << ": $(STAPCONF_HEADER)" << endl;
for (unsigned i=0; i<s.auxiliary_outputs.size(); i++) {
translated = s.auxiliary_outputs[i]->filename;
+ translated = translated.substr(translated.rfind('/')+1); // basename
translated[translated.size()-1] = 'o';
- o << translated << ": $(STAPCONF_HEADER)" << endl;
+ o << "$(obj)/" << translated << ": $(STAPCONF_HEADER)" << endl;
}
o.close ();
@@ -723,7 +726,7 @@ compile_pass (systemtap_session& s)
// Run make
vector<string> make_cmd = make_make_cmd(s, s.tmpdir);
- if (s.keep_tmpdir)
+ if (false && s.keep_tmpdir) // PR32458: kbuild 6.13+ can't abide multiple make targets
{
string E_source = s.translated_source.substr(s.translated_source.find_last_of("/")+1);
E_source.at(E_source.length() - 1) = 'i'; // overwrite the last character

View File

@@ -1,18 +1,3 @@
-------------------------------------------------------------------
Tue Feb 25 21:07:47 UTC 2025 - Tony Jones <tonyj@suse.com>
- Resolve errors with linux-6.13 based kernels.
Building trivial 'hello world' failed with:
<command-line>: fatal error: {path_to}stapconf.h: No such file or directory
Attemptng to preserve build directory (-k) caused an infinite loop of:
/usr/src/linux-6.13.4-1/scripts/Makefile.build:370: warning: overriding
recipe for target 'modules.order'
New patch: linux-6.13-fedora-compatibility.patch
New patch: rawhide-6.13-kbuild-compatibility.patch
-------------------------------------------------------------------
Mon Feb 24 18:11:09 UTC 2025 - Tony Jones <tonyj@suse.com>

View File

@@ -33,8 +33,6 @@ Source3: README-BEFORE-ADDING-PATCHES
Source4: README-KEYRING
Source5: stap-server.conf
Patch1: systemtap-build-source-dir.patch
Patch2: linux-6.13-fedora-compatibility.patch
Patch3: rawhide-6.13-kbuild-compatibility.patch
BuildRequires: autoconf >= 2.71
BuildRequires: automake