patches and low-level development discussion
 help / color / mirror / code / Atom feed
4f0d61930305e33c5dde3ea3e7b44811ee17bd9f blob 1448 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
 
From 59258caa6e02b5a7d5afc0bfde777b250ef74bbb Mon Sep 17 00:00:00 2001
From: Tero Tervala <tero.tervala@unikie.com>
Date: Wed, 18 May 2022 11:20:40 +0300
Subject: [PATCH] Use libfdt.a if building staticly

Signed-off-by: Tero Tervala <tero.tervala@unikie.com>
---
 Makefile | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index ea8c659..9474b63 100644
--- a/Makefile
+++ b/Makefile
@@ -151,7 +151,7 @@ BIN += fdtoverlay
 
 SCRIPTS = dtdiff
 
-all: $(BIN) libfdt
+all: libfdt $(BIN)
 
 # We need both Python and swig to build/install pylibfdt.
 # This builds the given make ${target} if those deps are found.
@@ -198,6 +198,12 @@ LIBFDT_lib = $(LIBFDT_dir)/$(LIBFDT_LIB)
 LIBFDT_include = $(addprefix $(LIBFDT_dir)/,$(LIBFDT_INCLUDES))
 LIBFDT_version = $(addprefix $(LIBFDT_dir)/,$(LIBFDT_VERSION))
 
+ifneq (,$(findstring -static,$(CFLAGS)))
+	LIBFDT_dep = $(LIBFDT_archive)
+else
+	LIBFDT_dep = $(LIBFDT_lib)
+endif
+
 include $(LIBFDT_dir)/Makefile.libfdt
 
 .PHONY: libfdt
@@ -261,11 +267,11 @@ convert-dtsv0: $(CONVERT_OBJS)
 
 fdtdump:	$(FDTDUMP_OBJS)
 
-fdtget:	$(FDTGET_OBJS) $(LIBFDT_lib)
+fdtget:	$(FDTGET_OBJS) $(LIBFDT_dep)
 
-fdtput:	$(FDTPUT_OBJS) $(LIBFDT_lib)
+fdtput:	$(FDTPUT_OBJS) $(LIBFDT_dep)
 
-fdtoverlay: $(FDTOVERLAY_OBJS) $(LIBFDT_lib)
+fdtoverlay: $(FDTOVERLAY_OBJS) $(LIBFDT_dep)
 
 dist:
 	git archive --format=tar --prefix=dtc-$(dtc_version)/ HEAD \
-- 
2.25.1

debug log:

solving 4f0d6193030 ...
found 4f0d6193030 in https://spectrum-os.org/lists/archives/spectrum-devel/20220520095257.23038-1-tero.tervala@unikie.com/

applying [1/1] https://spectrum-os.org/lists/archives/spectrum-devel/20220520095257.23038-1-tero.tervala@unikie.com/
diff --git a/pkgs/development/compilers/dtc/0001-Use-libfdt.a-if-building-staticly.patch b/pkgs/development/compilers/dtc/0001-Use-libfdt.a-if-building-staticly.patch
new file mode 100644
index 00000000000..4f0d6193030

1:22: trailing whitespace.
 
1:24: trailing whitespace.
 
1:27: trailing whitespace.
 
1:33: trailing whitespace.
 
1:41: trailing whitespace.
 
Checking patch pkgs/development/compilers/dtc/0001-Use-libfdt.a-if-building-staticly.patch...
Applied patch pkgs/development/compilers/dtc/0001-Use-libfdt.a-if-building-staticly.patch cleanly.
warning: squelched 8 whitespace errors
warning: 13 lines add whitespace errors.

index at:
100644 4f0d61930305e33c5dde3ea3e7b44811ee17bd9f	pkgs/development/compilers/dtc/0001-Use-libfdt.a-if-building-staticly.patch

Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/crosvm
	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/nixpkgs
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock
	https://spectrum-os.org/git/www

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).