MIPS: Compat: Fix build error if CONFIG_MIPS32_COMPAT but no compat ABI.

In that case nor __NR_seccomp_*_32 symbols will be defined in
<asm/unistd.h> so the attempt to use it in kernel.seccomp.c will fail
with:

kernel/seccomp.c:565:2: error: '__NR_seccomp_read_32' undeclared here (not in a function)
  __NR_seccomp_read_32, __NR_seccomp_write_32, __NR_seccomp_exit_32, __NR_seccomp_sigreturn_32,
  ^
kernel/seccomp.c:565:24: error: '__NR_seccomp_write_32' undeclared here (not in a function)
  __NR_seccomp_read_32, __NR_seccomp_write_32, __NR_seccomp_exit_32, __NR_seccomp_sigreturn_32,
                        ^
kernel/seccomp.c:565:47: error: '__NR_seccomp_exit_32' undeclared here (not in a function)
  __NR_seccomp_read_32, __NR_seccomp_write_32, __NR_seccomp_exit_32, __NR_seccomp_sigreturn_32,
                                               ^
kernel/seccomp.c:565:69: error: '__NR_seccomp_sigreturn_32' undeclared here (not in a function)
  __NR_seccomp_read_32, __NR_seccomp_write_32, __NR_seccomp_exit_32, __NR_seccomp_sigreturn_32,

Solved by changing the compat ABIs in kconfig to select MIPS32_COMPAT
directly.  This also means the user no longer has to select MIPS32_COMPAT
before being able to see the ABI options.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
Ralf Baechle 2014-12-19 01:18:03 +01:00
parent 942e22dff2
commit 78aaf956ba

View file

@ -2656,27 +2656,21 @@ config TRAD_SIGNALS
bool bool
config MIPS32_COMPAT config MIPS32_COMPAT
bool "Kernel support for Linux/MIPS 32-bit binary compatibility" bool
depends on 64BIT
help
Select this option if you want Linux/MIPS 32-bit binary
compatibility. Since all software available for Linux/MIPS is
currently 32-bit you should say Y here.
config COMPAT config COMPAT
bool bool
depends on MIPS32_COMPAT
select ARCH_WANT_OLD_COMPAT_IPC
default y
config SYSVIPC_COMPAT config SYSVIPC_COMPAT
bool bool
depends on COMPAT && SYSVIPC
default y
config MIPS32_O32 config MIPS32_O32
bool "Kernel support for o32 binaries" bool "Kernel support for o32 binaries"
depends on MIPS32_COMPAT depends on 64BIT
select ARCH_WANT_OLD_COMPAT_IPC
select COMPAT
select MIPS32_COMPAT
select SYSVIPC_COMPAT if SYSVIPC
help help
Select this option if you want to run o32 binaries. These are pure Select this option if you want to run o32 binaries. These are pure
32-bit binaries as used by the 32-bit Linux/MIPS port. Most of 32-bit binaries as used by the 32-bit Linux/MIPS port. Most of
@ -2687,6 +2681,9 @@ config MIPS32_O32
config MIPS32_N32 config MIPS32_N32
bool "Kernel support for n32 binaries" bool "Kernel support for n32 binaries"
depends on MIPS32_COMPAT depends on MIPS32_COMPAT
select COMPAT
select MIPS32_COMPAT
select SYSVIPC_COMPAT if SYSVIPC
help help
Select this option if you want to run n32 binaries. These are Select this option if you want to run n32 binaries. These are
64-bit binaries using 32-bit quantities for addressing and certain 64-bit binaries using 32-bit quantities for addressing and certain