Skip to content

Commit 78aaf95

Browse files
committed
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>
1 parent 942e22d commit 78aaf95

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

arch/mips/Kconfig

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2656,27 +2656,21 @@ config TRAD_SIGNALS
26562656
bool
26572657

26582658
config MIPS32_COMPAT
2659-
bool "Kernel support for Linux/MIPS 32-bit binary compatibility"
2660-
depends on 64BIT
2661-
help
2662-
Select this option if you want Linux/MIPS 32-bit binary
2663-
compatibility. Since all software available for Linux/MIPS is
2664-
currently 32-bit you should say Y here.
2659+
bool
26652660

26662661
config COMPAT
26672662
bool
2668-
depends on MIPS32_COMPAT
2669-
select ARCH_WANT_OLD_COMPAT_IPC
2670-
default y
26712663

26722664
config SYSVIPC_COMPAT
26732665
bool
2674-
depends on COMPAT && SYSVIPC
2675-
default y
26762666

26772667
config MIPS32_O32
26782668
bool "Kernel support for o32 binaries"
2679-
depends on MIPS32_COMPAT
2669+
depends on 64BIT
2670+
select ARCH_WANT_OLD_COMPAT_IPC
2671+
select COMPAT
2672+
select MIPS32_COMPAT
2673+
select SYSVIPC_COMPAT if SYSVIPC
26802674
help
26812675
Select this option if you want to run o32 binaries. These are pure
26822676
32-bit binaries as used by the 32-bit Linux/MIPS port. Most of
@@ -2687,6 +2681,9 @@ config MIPS32_O32
26872681
config MIPS32_N32
26882682
bool "Kernel support for n32 binaries"
26892683
depends on MIPS32_COMPAT
2684+
select COMPAT
2685+
select MIPS32_COMPAT
2686+
select SYSVIPC_COMPAT if SYSVIPC
26902687
help
26912688
Select this option if you want to run n32 binaries. These are
26922689
64-bit binaries using 32-bit quantities for addressing and certain

0 commit comments

Comments
 (0)