diff options
Diffstat (limited to 'meta-oe/recipes-support/daemontools/daemontools/cross-compile.patch')
-rw-r--r-- | meta-oe/recipes-support/daemontools/daemontools/cross-compile.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/daemontools/daemontools/cross-compile.patch b/meta-oe/recipes-support/daemontools/daemontools/cross-compile.patch new file mode 100644 index 000000000..f164c2d10 --- /dev/null +++ b/meta-oe/recipes-support/daemontools/daemontools/cross-compile.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | make sure it can be compiled for cross target | ||
2 | |||
3 | 1. never try to compile target binary by native gcc | ||
4 | 2. target's chkshsgr doesn't work on native. | ||
5 | 3. it's wrong to do target tests on native. | ||
6 | |||
7 | Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com> | ||
8 | |||
9 | diff -Nurp daemontools-0.76.orig/src/conf-cc daemontools-0.76/src/conf-cc | ||
10 | --- daemontools-0.76.orig/src/conf-cc 2001-07-13 00:49:49.000000000 +0800 | ||
11 | +++ daemontools-0.76/src/conf-cc 2014-11-26 09:34:38.828812162 +0800 | ||
12 | @@ -1,3 +1,3 @@ | ||
13 | -gcc -O2 -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings | ||
14 | +${CC} -O2 -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings | ||
15 | |||
16 | This will be used to compile .c files. | ||
17 | diff -Nurp daemontools-0.76.orig/src/conf-ld daemontools-0.76/src/conf-ld | ||
18 | --- daemontools-0.76.orig/src/conf-ld 2001-07-13 00:49:49.000000000 +0800 | ||
19 | +++ daemontools-0.76/src/conf-ld 2014-11-26 09:34:49.880811730 +0800 | ||
20 | @@ -1,3 +1,3 @@ | ||
21 | -gcc -s | ||
22 | +${CC} | ||
23 | |||
24 | This will be used to link .o files into an executable. | ||
25 | diff -Nurp daemontools-0.76.orig/src/Makefile daemontools-0.76/src/Makefile | ||
26 | --- daemontools-0.76.orig/src/Makefile 2001-07-13 00:49:49.000000000 +0800 | ||
27 | +++ daemontools-0.76/src/Makefile 2014-11-26 09:38:47.120802459 +0800 | ||
28 | @@ -165,7 +165,7 @@ hassgprm.h: choose compile hassgprm.h1 h | ||
29 | |||
30 | hasshsgr.h: chkshsgr choose compile hasshsgr.h1 hasshsgr.h2 load \ | ||
31 | tryshsgr.c warn-shsgr | ||
32 | - ./chkshsgr || ( cat warn-shsgr; exit 1 ) | ||
33 | + chkshsgr || ( cat warn-shsgr; exit 1 ) | ||
34 | ./choose clr tryshsgr hasshsgr.h1 hasshsgr.h2 > hasshsgr.h | ||
35 | |||
36 | haswaitp.h: choose compile haswaitp.h1 haswaitp.h2 load trywaitp.c | ||
37 | @@ -265,7 +265,7 @@ readproctitle.o: compile error.h readpro | ||
38 | rts: envdir envuidgid fghack matchtest multilog pgrphack \ | ||
39 | readproctitle rts.tests setlock setuidgid softlimit supervise svc \ | ||
40 | svok svscan svscanboot svstat tai64n tai64nlocal | ||
41 | - env - /bin/sh rts.tests 2>&1 | cat -v > rts | ||
42 | + echo "Warning: We can not run test on cross target." | ||
43 | |||
44 | scan_ulong.o: compile scan.h scan_ulong.c | ||
45 | ./compile scan_ulong.c | ||