[OE-core] [PATCH v3] make: 4.2.1 -> 4.3
Victor Kamensky (kamensky)
kamensky at cisco.com
Sat Feb 29 07:55:17 UTC 2020
[sorry for the top post: bad email client at work]
Hi Richard, Jens,
I was able to reproduce and debugged the mips new make issue. Workaround
patch attached.
In summary: kernelmodule.KernelModuleTest.test_kernel_module
fails with 'fatal error: opening dependency file scripts/basic/.fixdep.d: Permission denied'
New make-4.3 started using posix_spawn glibc call,
that happens to be broken on mips. On mips during posix_spawn call
__spawni_child function that is executed after clone makes
setresuid call with spurious/wrong value of ruid. Instead of -1
it passes 127, effectively switching real user id since test
runs under root. Subsequent gcc runs under wrong ruid and it
fails to write into /usr/src/kernel/scripts/basic directory.
__spawni_child uses direct system call invocation for setresuid
rather calling glibc function. And there is wrong code generation
issue somewhere in inline assembly for direct system call and/or
way how compiler processes it. I did not dig into it yet, it
looks as quite hard problem and needs more time.
For now I've made workaround patch that just through configure
ac_cv_func_posix_spawn=no parameter tells make configure not to use
posix_spawn on mips.
I will also send suggested patch through 'git send-mail'
Tested workaround on qemumips64, did not have time for
qemumips full test, verified build only and made sure that
posix_spawn is not used. But I believe it is the same issue.
Detailed debugging notes
=================
Running 'bitbake core-image-sato-sdk -c testimage' fails on qemumips64
----------------------------------------------------------------------
RESULTS - kernelmodule.KernelModuleTest.test_kernel_module: FAILED (36.71s)
Reproducing issue manually
--------------------------
root at qemumips64:~# cd /usr/src/kernel && make scripts prepare
HOSTCC scripts/basic/fixdep
scripts/basic/fixdep.c:410:1: fatal error: opening dependency file scripts/basic/.fixdep.d: Permission denied
410 | }
| ^
compilation terminated.
make[2]: *** [scripts/Makefile.host:107: scripts/basic/fixdep] Error 1
make[1]: *** [Makefile:500: scripts_basic] Error 2
make: *** [Makefile:678: include/config/auto.conf.cmd] Error 2
make: *** [include/config/auto.conf.cmd] Deleting file 'include/config/tristate.conf'
root at qemumips64:/usr/src/kernel# ls -al scripts/basic/.fixdep.d
ls: cannot access 'scripts/basic/.fixdep.d': No such file or directory
Calling the same gcc command manually from shell
------------------------------------------------
It works, no problem.
root at qemumips64:/usr/src/kernel# gcc -Wp,-MD,scripts/basic/.fixdep.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -o scripts/basic/fixdep scripts/basic/fixdep.c
root at qemumips64:/usr/src/kernel#
Means make changes context in such way that prevents gcc
command execution.
Looking at strace result
------------------------
Run the same make command under strace. In log see that
getuid return 127! I.e it is different user. It does not
have permission to write into scripts/basic/.fixdep.d
1144 getuid() = 127
1144 getgid() = 127
and earlier:
1144 getuid() = 0
1144 setresuid(127, 0, -1) = 0
1144 getgid() = 0
1144 setresgid(127, 0, -1) = 0
1144 dup2(6, 1) = 1
1144 rt_sigprocmask(SIG_SETMASK, [], NULL, 16) = 0
1144 execve("/bin/sh", ["/bin/sh", "-c", "uname -m | sed -e s/i.86/x86/ -e"...], 0xfffbb2e1d0 /* 16 vars */ <unfinished ...>
There is call to setresuid that sets real user id to
127. Why?
Running make under gdb
----------------------
(gdb) set args scripts
(gdb) b main
Breakpoint 1 at 0x9d80: file ../make-4.3/src/main.c, line 1056.
(gdb) set follow-fork-mode child
(gdb) run
Starting program: /usr/bin/make scripts
Breakpoint 1, main (argc=2, argv=0xffffffac78, envp=0xffffffac90) at ../make-4.3/src/main.c:1056
1056 ../make-4.3/src/main.c: No such file or directory.
(gdb) b getuid
Breakpoint 2 at 0xfff7eb5a00: file ../sysdeps/unix/syscall-template.S, line 59.
(gdb) b setresuid
Breakpoint 3 at 0xfff7eb5eb0: file ../sysdeps/unix/sysv/linux/setresuid.c, line 29.
(gdb) b execve
Breakpoint 4 at 0xfff7eb4f10: file ../sysdeps/unix/syscall-template.S, line 78.
(gdb) b clone
Breakpoint 5 at 0xfff7ef3c90: file ../sysdeps/unix/sysv/linux/mips/clone.S, line 45.
(gdb) b posix_spawn
Breakpoint 6 at 0xfff7edd790: posix_spawn. (2 locations)
(gdb) b __spawni_child
Breakpoint 7 at 0xfff7eddac0: file ../sysdeps/unix/sysv/linux/spawni.c, line 123.
(gdb) c
Continuing.
Breakpoint 2, getuid () at ../sysdeps/unix/syscall-template.S:59
59 ../sysdeps/unix/syscall-template.S: No such file or directory.
(gdb) bt
#0 getuid () at ../sysdeps/unix/syscall-template.S:59
#1 0x000000fff7edfa7c in __euidaccess (path=0xaaaab21b30 "/bin/sh", mode=1) at ../sysdeps/posix/euidaccess.c:159
#2 0x000000aaaaadecdc in find_in_given_path (progname=0xaaaab25440 "/bin/sh", path=<optimized out>, optimize_for_exec=<optimized out>)
at ../../make-4.3/lib/findprog-in.c:137
#3 0x000000aaaaac7680 in child_execute_job (child=0xffffff8770, good_stdin=<optimized out>, argv=0xaaaab26cb0) at ../make-4.3/src/job.c:2384
#4 0x000000aaaaac2678 in func_shell_base (o=0xaaaab1e350 "", argv=<optimized out>, trim_newlines=<optimized out>) at ../make-4.3/src/function.c:1790
#5 0x000000aaaaac2c38 in handle_function (op=0xffffff8930, stringp=<optimized out>) at ../make-4.3/src/function.c:2544
#6 0x000000aaaaabaa10 in variable_expand_string (line=<optimized out>, string=<optimized out>, length=<optimized out>) at ../make-4.3/src/expand.c:262
#7 0x000000aaaaabb5b4 in allocated_variable_expand_for_file (line=<optimized out>, file=<optimized out>) at ../make-4.3/src/expand.c:566
#8 0x000000aaaaadc11c in do_variable_definition (flocp=0xffffff8d70, varname=0xaaaab1fca0 "SUBARCH",
value=0xaaaab24e6b "$(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/s390x/s390/ -e s/parisc64/parisc/ -e s/ppc.*/powerpc/ -e s/mips.*/mips/ -e s/sh[234].*/s"..., origin=<optimized out>, flavor=<optimized out>, target_var=<optimized out>) at ../make-4.3/src/variable.c:1187
#9 0x000000aaaaadccac in try_variable_definition (flocp=0xffffff8d70, line=<optimized out>, origin=<optimized out>, target_var=<optimized out>)
at ../make-4.3/src/variable.c:1633
#10 0x000000aaaaad2dfc in eval (ebuf=<optimized out>, set_default=<optimized out>) at ../make-4.3/src/read.c:750
#11 0x000000aaaaad451c in eval_makefile (filename=<optimized out>, flags=<optimized out>) at ../make-4.3/src/read.c:436
#12 0x000000aaaaad3cc4 in eval (ebuf=<optimized out>, set_default=<optimized out>) at ../make-4.3/src/read.c:908
#13 0x000000aaaaad451c in eval_makefile (filename=<optimized out>, flags=<optimized out>) at ../make-4.3/src/read.c:436
#14 0x000000aaaaad4a70 in read_all_makefiles (makefiles=<optimized out>) at ../make-4.3/src/read.c:258
#15 0x000000aaaaab4f9c in main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at ../make-4.3/src/main.c:1945
(gdb) c
Continuing.
Breakpoint 6, __GI___posix_spawn (pid=0xffffff84b4, path=0xaaaab25440 "/bin/sh", file_actions=0xffffff84b8, attrp=0xffffff8588, argv=0xaaaab26cb0, envp=0xffffffac90)
at spawn.c:30
30 spawn.c: No such file or directory.
(gdb) bt
#0 __GI___posix_spawn (pid=0xffffff84b4, path=0xaaaab25440 "/bin/sh", file_actions=0xffffff84b8, attrp=0xffffff8588, argv=0xaaaab26cb0, envp=0xffffffac90) at spawn.c:30
#1 0x000000aaaaac76b0 in child_execute_job (child=0xffffff8770, good_stdin=<optimized out>, argv=0xaaaab26cb0) at ../make-4.3/src/job.c:2396
#2 0x000000aaaaac2678 in func_shell_base (o=0xaaaab1e350 "", argv=<optimized out>, trim_newlines=<optimized out>) at ../make-4.3/src/function.c:1790
#3 0x000000aaaaac2c38 in handle_function (op=0xffffff8930, stringp=<optimized out>) at ../make-4.3/src/function.c:2544
#4 0x000000aaaaabaa10 in variable_expand_string (line=<optimized out>, string=<optimized out>, length=<optimized out>) at ../make-4.3/src/expand.c:262
#5 0x000000aaaaabb5b4 in allocated_variable_expand_for_file (line=<optimized out>, file=<optimized out>) at ../make-4.3/src/expand.c:566
#6 0x000000aaaaadc11c in do_variable_definition (flocp=0xffffff8d70, varname=0xaaaab1fca0 "SUBARCH",
value=0xaaaab24e6b "$(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/s390x/s390/ -e s/parisc64/parisc/ -e s/ppc.*/powerpc/ -e s/mips.*/mips/ -e s/sh[234].*/s"..., origin=<optimized out>, flavor=<optimized out>, target_var=<optimized out>) at ../make-4.3/src/variable.c:1187
#7 0x000000aaaaadccac in try_variable_definition (flocp=0xffffff8d70, line=<optimized out>, origin=<optimized out>, target_var=<optimized out>)
at ../make-4.3/src/variable.c:1633
#8 0x000000aaaaad2dfc in eval (ebuf=<optimized out>, set_default=<optimized out>) at ../make-4.3/src/read.c:750
#9 0x000000aaaaad451c in eval_makefile (filename=<optimized out>, flags=<optimized out>) at ../make-4.3/src/read.c:436
#10 0x000000aaaaad3cc4 in eval (ebuf=<optimized out>, set_default=<optimized out>) at ../make-4.3/src/read.c:908
#11 0x000000aaaaad451c in eval_makefile (filename=<optimized out>, flags=<optimized out>) at ../make-4.3/src/read.c:436
#12 0x000000aaaaad4a70 in read_all_makefiles (makefiles=<optimized out>) at ../make-4.3/src/read.c:258
#13 0x000000aaaaab4f9c in main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at ../make-4.3/src/main.c:1945
(gdb) c
Continuing.
Breakpoint 5, clone () at ../sysdeps/unix/sysv/linux/mips/clone.S:45
45 ../sysdeps/unix/sysv/linux/mips/clone.S: No such file or directory.
(gdb) bt
#0 clone () at ../sysdeps/unix/sysv/linux/mips/clone.S:45
#1 0x000000fff7edd938 in __spawnix (pid=0xffffff84b4, file=0xaaaab25440 "/bin/sh", file_actions=<optimized out>, attrp=<optimized out>, argv=0xaaaab26cb0,
envp=0xffffffac90, xflags=<optimized out>, exec=0xfff7eb4f10 <execve>) at ../sysdeps/unix/sysv/linux/spawni.c:382
#2 0x000000aaaaac76b0 in child_execute_job (child=0xffffff8770, good_stdin=<optimized out>, argv=0xaaaab26cb0) at ../make-4.3/src/job.c:2396
#3 0x000000aaaaac2678 in func_shell_base (o=0xaaaab1e350 "", argv=<optimized out>, trim_newlines=<optimized out>) at ../make-4.3/src/function.c:1790
#4 0x000000aaaaac2c38 in handle_function (op=0xffffff8930, stringp=<optimized out>) at ../make-4.3/src/function.c:2544
#5 0x000000aaaaabaa10 in variable_expand_string (line=<optimized out>, string=<optimized out>, length=<optimized out>) at ../make-4.3/src/expand.c:262
#6 0x000000aaaaabb5b4 in allocated_variable_expand_for_file (line=<optimized out>, file=<optimized out>) at ../make-4.3/src/expand.c:566
#7 0x000000aaaaadc11c in do_variable_definition (flocp=0xffffff8d70, varname=0xaaaab1fca0 "SUBARCH",
value=0xaaaab24e6b "$(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/s390x/s390/ -e s/parisc64/parisc/ -e s/ppc.*/powerpc/ -e s/mips.*/mips/ -e s/sh[234].*/s"..., origin=<optimized out>, flavor=<optimized out>, target_var=<optimized out>) at ../make-4.3/src/variable.c:1187
#8 0x000000aaaaadccac in try_variable_definition (flocp=0xffffff8d70, line=<optimized out>, origin=<optimized out>, target_var=<optimized out>)
at ../make-4.3/src/variable.c:1633
#9 0x000000aaaaad2dfc in eval (ebuf=<optimized out>, set_default=<optimized out>) at ../make-4.3/src/read.c:750
#10 0x000000aaaaad451c in eval_makefile (filename=<optimized out>, flags=<optimized out>) at ../make-4.3/src/read.c:436
#11 0x000000aaaaad3cc4 in eval (ebuf=<optimized out>, set_default=<optimized out>) at ../make-4.3/src/read.c:908
#12 0x000000aaaaad451c in eval_makefile (filename=<optimized out>, flags=<optimized out>) at ../make-4.3/src/read.c:436
#13 0x000000aaaaad4a70 in read_all_makefiles (makefiles=<optimized out>) at ../make-4.3/src/read.c:258
#14 0x000000aaaaab4f9c in main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at ../make-4.3/src/main.c:1945
(gdb) c
Continuing.
[Attaching after process 3441 vfork to child process 3444]
[New inferior 2 (process 3444)]
[Switching to process 3444]
Thread 2.1 "make" hit Breakpoint 7, __spawni_child (arguments=0xffffff8350) at ../sysdeps/unix/sysv/linux/spawni.c:123
123 ../sysdeps/unix/sysv/linux/spawni.c: No such file or directory.
(gdb) bt
#0 __spawni_child (arguments=0xffffff8350) at ../sysdeps/unix/sysv/linux/spawni.c:123
#1 0x000000fff7ef3d28 in __thread_start () at ../sysdeps/unix/sysv/linux/mips/clone.S:135
(gdb) c
Continuing.
Thread 2.1 "make" hit Breakpoint 2, getuid () at ../sysdeps/unix/syscall-template.S:59
59 ../sysdeps/unix/syscall-template.S: No such file or directory.
(gdb) bt
#0 getuid () at ../sysdeps/unix/syscall-template.S:59
#1 0x000000fff7eddedc in __spawni_child (arguments=0xffffff8350) at ../sysdeps/unix/sysv/linux/spawni.c:189
#2 0x000000fff7ef3d28 in __thread_start () at ../sysdeps/unix/sysv/linux/mips/clone.S:135
(gdb) c
Continuing.
Thread 2.1 "make" hit Breakpoint 4, 0x000000fff7eb4f10 in execve () at ../sysdeps/unix/syscall-template.S:78
78 ../sysdeps/unix/syscall-template.S: No such file or directory.
(gdb) bt
#0 0x000000fff7eb4f10 in execve () at ../sysdeps/unix/syscall-template.S:78
#1 0x000000fff7eddd10 in __spawni_child (arguments=0xffffff8350) at ../sysdeps/unix/sysv/linux/spawni.c:292
#2 0x000000fff7ef3d28 in __thread_start () at ../sysdeps/unix/sysv/linux/mips/clone.S:135
It looks like we did not hit setresuid breakpoint
but reached execve ... strange
Looking at glibc __spawni_child code
------------------------------------
>From cat -n ./2.31-r0/git/sysdeps/unix/sysv/linux/spawni.c
187 /* Set the effective user and group IDs. */
188 if ((attr->__flags & POSIX_SPAWN_RESETIDS) != 0
189 && (local_seteuid (__getuid ()) != 0
190 || local_setegid (__getgid ()) != 0))
191 goto fail;
192
What is local_seteuid
---------------------
>From cat -n 2.31-r0/git/sysdeps/unix/sysv/linux/local-setxid.h
8 # define local_seteuid(id) INLINE_SYSCALL (setresuid, 3, -1, id, -1)
15 # define local_setegid(id) INLINE_SYSCALL (setresgid, 3, -1, id, -1)
That explains why setresuid breakpoint was not hit. Code calls
directly system call.
What is internal_syscall3
-------------------------
>From cat -n 2.31-r0/git/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
181 #define internal_syscall3(v0_init, input, number, err, \
182 arg1, arg2, arg3) \
183 ({ \
184 long _sys_result; \
185 \
186 { \
187 register long __s0 asm ("$16") __attribute__ ((unused)) \
188 = (number); \
189 register long __v0 asm ("$2"); \
190 register long __a0 asm ("$4") = (long) (arg1); \
191 register long __a1 asm ("$5") = (long) (arg2); \
192 register long __a2 asm ("$6") = (long) (arg3); \
193 register long __a3 asm ("$7"); \
194 __asm__ volatile ( \
195 ".set\tnoreorder\n\t" \
196 v0_init \
197 "syscall\n\t" \
198 ".set\treorder" \
199 : "=r" (__v0), "=r" (__a3) \
200 : input, "r" (__a0), "r" (__a1), "r" (__a2) \
201 : __SYSCALL_CLOBBERS); \
202 err = __a3; \
203 _sys_result = __v0; \
204 } \
205 _sys_result; \
206 })
In gdb again
------------
(gdb) bt
#0 getuid () at ../sysdeps/unix/syscall-template.S:59
#1 0x000000fff7eddedc in __spawni_child (arguments=0xffffff8350) at ../sysdeps/unix/sysv/linux/spawni.c:189
#2 0x000000fff7ef3d28 in __thread_start () at ../sysdeps/unix/sysv/linux/mips/clone.S:135
(gdb) up
#1 0x000000fff7eddedc in __spawni_child (arguments=0xffffff8350) at ../sysdeps/unix/sysv/linux/spawni.c:189
189 ../sysdeps/unix/sysv/linux/spawni.c: No such file or directory.
(gdb) x /20i $pc - 20
0xfff7eddec8 <__spawni_child+1032>: nop
0xfff7eddecc <__spawni_child+1036>: b 0xfff7eddcc0 <__spawni_child+512>
0xfff7edded0 <__spawni_child+1040>: lw a0,4(s1)
0xfff7edded4 <__spawni_child+1044>: jalr t9
0xfff7edded8 <__spawni_child+1048>: nop
=> 0xfff7eddedc <__spawni_child+1052>: li a2,-1
0xfff7eddee0 <__spawni_child+1056>: dext a1,v0,0x0,0x20
0xfff7eddee4 <__spawni_child+1060>: li v0,5115
0xfff7eddee8 <__spawni_child+1064>: syscall
0xfff7eddeec <__spawni_child+1068>: bnez a3,0xfff7ede000 <__spawni_child+1344>
0xfff7eddef0 <__spawni_child+1072>: nop
0xfff7eddef4 <__spawni_child+1076>: bnez v0,0xfff7edde00 <__spawni_child+832>
0xfff7eddef8 <__spawni_child+1080>: ld t9,-26712(gp)
0xfff7eddefc <__spawni_child+1084>: jalr t9
0xfff7eddf00 <__spawni_child+1088>: nop
0xfff7eddf04 <__spawni_child+1092>: li a2,-1
0xfff7eddf08 <__spawni_child+1096>: dext a1,v0,0x0,0x20
0xfff7eddf0c <__spawni_child+1100>: li v0,5117
0xfff7eddf10 <__spawni_child+1104>: syscall
0xfff7eddf14 <__spawni_child+1108>: bnez a3,0xfff7ede000 <__spawni_child+1344>
0xfff7eddf18 <__spawni_child+1112>: nop
(gdb) display /i $pc
1: x/i $pc
=> 0xfff7eddedc <__spawni_child+1052>: li a2,-1
(gdb) si
0x000000fff7eb5a04 59 ../sysdeps/unix/syscall-template.S: No such file or directory.
1: x/i $pc
=> 0xfff7eb5a04 <getuid+4>: syscall
(gdb) info reg
zero at v0 v1
R0 0000000000000000 000000001400a4e1 00000000000013ec 0000000000000000
a0 a1 a2 a3
R4 000000000000007f 000000fff7ff2d80 0000000000000000 0000000000000000
a4 a5 a6 a7
R8 0000000000000000 0000000000000000 0000000000000000 0000000000000000
t0 t1 t2 t3
R12 0000000000000000 ffffffff84080018 ffffffff801554b8 0000000000000000
s0 s1 s2 s3
R16 000000ffffff8588 000000ffffff84b8 0000000000000001 000000ffffff8350
s4 s5 s6 s7
R20 000000fff7e2ef80 000000fff7eb4f10 000000000000007f 000000000000007f
t8 t9 k0 k1
R24 0000000000000000 000000fff7eb5a00 0000000000000010 0000000000000000
gp sp s8 ra
R28 000000fff7f9f5e0 000000fff7ff2e20 000000fff7ff2e20 000000fff7eddedc
status lo hi badvaddr
000000000400a4f3 1b6ee11164e1e246 eb05325e15c10102 000000fff7ff2fe0
cause pc
0000000010800024 000000fff7eb5a04
fcsr fir restart
00000000 007f0000 0000000000000000
(gdb) p /d $a0
$1 = 127
a0 value is 127! But it should be -1 according to local_seteuid call.
Why is that?
This code looks quite wrong:
0xfff7edded0 <__spawni_child+1040>: lw a0,4(s1)
0xfff7edded4 <__spawni_child+1044>: jalr t9
0xfff7edded8 <__spawni_child+1048>: nop
=> 0xfff7eddedc <__spawni_child+1052>: li a2,-1
0xfff7eddee0 <__spawni_child+1056>: dext a1,v0,0x0,0x20
0xfff7eddee4 <__spawni_child+1060>: li v0,5115
0xfff7eddee8 <__spawni_child+1064>: syscall
There is not load of -1 into a0 before jumping to setresuid system call.
In disassembly at certain point one can see:
0x000000fff7edde1c <+860>: li a0,127
It seems either internal_syscall3 is wrong or compiler does not
process it correctly ... quite bad ...
Looking at make make-4.3/src/job.c
----------------------------------
It seems that posix_spawn would be used only if USE_POSIX_SPAWN defined.
Test for USE_POSIX_SPAWN is in configure.ac
-------------------------------------------
>From cat -n make-4.3/configure.ac
382 AS_IF([test "$make_cv_posix_spawn" = yes],
383 AC_CACHE_CHECK([for posix_spawn that fails synchronously],
384 [make_cv_synchronous_posix_spawn],
385 [make_cv_synchronous_posix_spawn=no
386 AC_RUN_IFELSE([AC_LANG_SOURCE([[
387 #include <spawn.h>
388 #include <string.h>
389
390 extern char **environ;
391
392 int main() {
393 char* path = strdup("./non-existent");
394 char *argv[[2]];
395 argv[[0]] = path;
396 argv[[1]] = 0;
397 return posix_spawn(0, path, 0, 0, argv, environ);
398 }]])],
399 [make_cv_synchronous_posix_spawn=no],
400 [make_cv_synchronous_posix_spawn=yes],
401 [make_cv_synchronous_posix_spawn="no (cross-compiling)"])]))
402
403 AS_CASE([/$user_posix_spawn/$make_cv_posix_spawn/$make_cv_synchronous_posix_spawn/],
404 [*/no/*], [make_cv_posix_spawn=no],
405 [AC_DEFINE(USE_POSIX_SPAWN, 1, [Define to 1 to use posix_spawn().])
406 ])
Note USE_POSIX_SPAWN code was not present in make-4.2.1
-------------------------------------------------------
Workaround
-----------
In case of mips disable use of posix_spawn through ac_cv_func_posix_spawn=no
configure option.
Testing
-------
Tested 'bitbake core-image-sato-sdk -c testimage' all tested are passed.
Thanks,
Victor
________________________________________
From: Richard Purdie <richard.purdie at linuxfoundation.org>
Sent: Thursday, February 27, 2020 11:45 PM
To: Jens Rehsack; openembedded-core at lists.openembedded.org
Cc: Bruce Ashfield; Victor Kamensky (kamensky)
Subject: Re: [OE-core] [PATCH v3] make: 4.2.1 -> 4.3
On Mon, 2020-02-24 at 15:39 +0100, Jens Rehsack wrote:
> Announcement: https://lists.gnu.org/archive/html/bug-make/2020-01/msg00057.html
>
> 1) Remove upstream provided patches 0001-glob-Do-not-assume-glibc-glob-internals.patch
> and 0002-glob-Do-not-assume-glibc-glob-internals.patch.
>
> 2) License has been changed to GPLv3 only
>
> 3) Important bug-fix is
> * https://lists.gnu.org/archive/html/bug-make/2018-09/msg00006.html
>
> 4) Backward-incompatibilities:
> * Number signs (#) appearing inside a macro reference or function invocation
> no longer introduce comments and should not be escaped with backslashes
> * Previously appending using '+=' to an empty variable would result in a value
> starting with a space. Now the initial space is only added if the variable
> already contains some value. Similarly, appending an empty string does not
> add a trailing space.
>
> Fix incompatibility issues between gnulib bundled with updated make fix issues
> in w32 compat sources.
>
> Signed-off-by: Jens Rehsack <sno at netbsd.org
Unfortunately, crazy as this sounds, this is causing mips problems on
target with kernel module building. We only see the following failures
when this patch is included:
https://autobuilder.yoctoproject.org/typhoon/#/builders/60/builds/1612
https://autobuilder.yoctoproject.org/typhoon/#/builders/102/builds/315
https://autobuilder.yoctoproject.org/typhoon/#/builders/74/builds/1616
Cheers,
Richard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-make-disable-use-of-posix_spawn-on-mips.patch
Type: text/x-patch
Size: 1586 bytes
Desc: 0001-make-disable-use-of-posix_spawn-on-mips.patch
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20200229/d23a2a43/attachment-0001.bin>
More information about the Openembedded-core
mailing list