summaryrefslogtreecommitdiffstats
path: root/debian/rules.d/tools/objtool/Makefile
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-11 08:28:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-11 08:28:00 +0000
commit3565071f226432336a54d0193d729fa4508a3394 (patch)
tree4cde13f078f84c0a7785d234fd52edce7c90546a /debian/rules.d/tools/objtool/Makefile
parentAdding upstream version 6.6.15. (diff)
downloadlinux-3565071f226432336a54d0193d729fa4508a3394.tar.xz
linux-3565071f226432336a54d0193d729fa4508a3394.zip
Adding debian version 6.6.15-2.debian/6.6.15-2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/rules.d/tools/objtool/Makefile')
-rw-r--r--debian/rules.d/tools/objtool/Makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/debian/rules.d/tools/objtool/Makefile b/debian/rules.d/tools/objtool/Makefile
new file mode 100644
index 000000000..8666355f6
--- /dev/null
+++ b/debian/rules.d/tools/objtool/Makefile
@@ -0,0 +1,18 @@
+PROGS = \
+ objtool \
+ objtool.real-powerpc \
+ objtool.real-x86
+
+include $(top_rulesdir)/Makefile.inc
+
+objtool.real-%:
+ mkdir -p $*
+# objtool always uses HOSTCC, HOSTLD, and HOSTAR; we need to override
+# these on the command line to make cross-builds work. But it also
+# builds fixdep which still needs to be native in a cross-build. Set
+# REALHOSTCC and REALHOSTLD variables which will be used for fixdep.
+ $(MAKE) -C $(top_srcdir)/tools/objtool O=$(CURDIR)/$* HOSTARCH=$(KERNEL_ARCH) ARCH=$* HOSTCC=$(CC) HOSTLD=$(CROSS_COMPILE)ld HOSTAR=$(CROSS_COMPILE)ar REALHOSTCC=gcc REALHOSTLD=ld V=1 EXTRA_CFLAGS='$(CFLAGS) $(CPPFLAGS)'
+ ln -f $*/objtool $@
+
+%: %.o
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^