diff options
Diffstat (limited to 'meta/recipes-connectivity/socat/files/0001-fix-compile-procan.c-failed.patch')
-rw-r--r-- | meta/recipes-connectivity/socat/files/0001-fix-compile-procan.c-failed.patch | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/socat/files/0001-fix-compile-procan.c-failed.patch b/meta/recipes-connectivity/socat/files/0001-fix-compile-procan.c-failed.patch new file mode 100644 index 0000000000..ea00dfa0a9 --- /dev/null +++ b/meta/recipes-connectivity/socat/files/0001-fix-compile-procan.c-failed.patch | |||
@@ -0,0 +1,62 @@ | |||
1 | From c4c3d5f2d4dfe8167205e8d20b4cb7a197706c16 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Wed, 27 Nov 2024 04:09:59 -0800 | ||
4 | Subject: [PATCH] fix compile procan.c failed | ||
5 | |||
6 | 1. Compile socat failed if out of tree build (build dir != source dir) | ||
7 | ... | ||
8 | gcc -c -D CC="gcc" -o procan.o procan.c | ||
9 | cc1: fatal error: procan.c: No such file or directory | ||
10 | ... | ||
11 | Explicitly add $srcdir to makefile rule | ||
12 | |||
13 | 2. Compile socat failed if multiple words in $(CC), such as CC="gcc -m64" | ||
14 | ... | ||
15 | from ../socat-1.8.0.0/procan.c:10: | ||
16 | ../socat-1.8.0.0/sysincludes.h:18:10: fatal error: inttypes.h: No such file or directory | ||
17 | 18 | #include <inttypes.h> /* uint16_t */ | ||
18 | ... | ||
19 | |||
20 | In commit [Procan: print umask, CC, and couple more new infos][1], | ||
21 | it defeines marcro CC in C source, the space in CC will break | ||
22 | C source compile. Use first word of $(CC) to defeine marco CC | ||
23 | |||
24 | [1] https://repo.or.cz/socat.git/commit/cd5673dbd0786c94e0b3ace7e35fab14c01e3185 | ||
25 | |||
26 | Upstream-Status: Submitted [socat@dest-unreach.org] | ||
27 | |||
28 | Rebase to 1.8.0.1 | ||
29 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
30 | --- | ||
31 | Makefile.in | 8 ++++---- | ||
32 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
33 | |||
34 | diff --git a/Makefile.in b/Makefile.in | ||
35 | index 631d31d..103d4d1 100644 | ||
36 | --- a/Makefile.in | ||
37 | +++ b/Makefile.in | ||
38 | @@ -110,7 +110,7 @@ socat: socat.o libxio.a | ||
39 | $(CC) $(CFLAGS) $(LDFLAGS) -o $@ socat.o libxio.a $(CLIBS) | ||
40 | |||
41 | procan.o: $(srcdir)/procan.c | ||
42 | - $(CC) $(CFLAGS) -c -D CC="\"$(CC)\"" -o $@ $(srcdir)/procan.c | ||
43 | + $(CC) $(CFLAGS) -c -D CC="\"$(firstword $(CC))\"" -o $@ $(srcdir)/procan.c | ||
44 | |||
45 | PROCAN_OBJS=procan_main.o procan.o procan-cdefs.o hostan.o error.o sycls.o sysutils.o utils.o vsnprintf_r.o snprinterr.o | ||
46 | procan: $(PROCAN_OBJS) | ||
47 | @@ -132,9 +132,9 @@ install: progs $(srcdir)/doc/socat.1 | ||
48 | mkdir -p $(DESTDIR)$(BINDEST) | ||
49 | $(INSTALL) -m 755 socat $(DESTDIR)$(BINDEST)/socat1 | ||
50 | ln -sf socat1 $(DESTDIR)$(BINDEST)/socat | ||
51 | - $(INSTALL) -m 755 socat-chain.sh $(DESTDIR)$(BINDEST) | ||
52 | - $(INSTALL) -m 755 socat-mux.sh $(DESTDIR)$(BINDEST) | ||
53 | - $(INSTALL) -m 755 socat-broker.sh $(DESTDIR)$(BINDEST) | ||
54 | + $(INSTALL) -m 755 $(srcdir)/socat-chain.sh $(DESTDIR)$(BINDEST) | ||
55 | + $(INSTALL) -m 755 $(srcdir)/socat-mux.sh $(DESTDIR)$(BINDEST) | ||
56 | + $(INSTALL) -m 755 $(srcdir)/socat-broker.sh $(DESTDIR)$(BINDEST) | ||
57 | $(INSTALL) -m 755 procan $(DESTDIR)$(BINDEST) | ||
58 | $(INSTALL) -m 755 filan $(DESTDIR)$(BINDEST) | ||
59 | mkdir -p $(DESTDIR)$(MANDEST)/man1 | ||
60 | -- | ||
61 | 2.25.1 | ||
62 | |||