Hi
i encountered a compile failure after i upgraded gcc from gcc-5 to gcc-6
when i use gcc-5 or gcc-4.9, it compiles well, so i guess something changed by gcc-6 and trigger this error.
Does somebody know how to fix it?
environment:
- debian9 with linux-4.12-rc1(kselftest)
- gcc-6
the make log like below:
-------------------------------
root@debian9:/tmp/build-kernel_selftests/linux/tools/testing/selftests# make -C x86
make: Entering directory '/tmp/build-kernel_selftests/linux/tools/testing/selftests/x86'
gcc -m32 -o /tmp/build-kernel_selftests/linux/tools/testing/selftests/x86/single_step_syscall_32 -O2 -g -std=gnu99 -pthread -Wall single_step_syscall.c -lrt -ldl -lm
gcc -m32 -o /tmp/build-kernel_selftests/linux/tools/testing/selftests/x86/sysret_ss_attrs_32 -O2 -g -std=gnu99 -pthread -Wall sysret_ss_attrs.c -lrt -ldl -lm
gcc -m32 -o /tmp/build-kernel_selftests/linux/tools/testing/selftests/x86/syscall_nt_32 -O2 -g -std=gnu99 -pthread -Wall syscall_nt.c -lrt -ldl -lm
gcc -m32 -o /tmp/build-kernel_selftests/linux/tools/testing/selftests/x86/ptrace_syscall_32 -O2 -g -std=gnu99 -pthread -Wall ptrace_syscall.c raw_syscall_helper_32.S -lrt -ldl -lm
gcc -m32 -o /tmp/build-kernel_selftests/linux/tools/testing/selftests/x86/test_mremap_vdso_32 -O2 -g -std=gnu99 -pthread -Wall test_mremap_vdso.c -lrt -ldl -lm
gcc -m32 -o /tmp/build-kernel_selftests/linux/tools/testing/selftests/x86/check_initial_reg_state_32 -O2 -g -std=gnu99 -pthread -Wall -Wl,-ereal_start -static check_initial_reg_state.c -lrt -ldl -lm
gcc -m32 -o /tmp/build-kernel_selftests/linux/tools/testing/selftests/x86/sigreturn_32 -O2 -g -std=gnu99 -pthread -Wall sigreturn.c -lrt -ldl -lm
gcc -m32 -o /tmp/build-kernel_selftests/linux/tools/testing/selftests/x86/ldt_gdt_32 -O2 -g -std=gnu99 -pthread -Wall ldt_gdt.c -lrt -ldl -lm
gcc -m32 -o /tmp/build-kernel_selftests/linux/tools/testing/selftests/x86/iopl_32 -O2 -g -std=gnu99 -pthread -Wall iopl.c -lrt -ldl -lm
gcc -m32 -o /tmp/build-kernel_selftests/linux/tools/testing/selftests/x86/mpx-mini-test_32 -O2 -g -std=gnu99 -pthread -Wall mpx-mini-test.c -lrt -ldl -lm
gcc -m32 -o /tmp/build-kernel_selftests/linux/tools/testing/selftests/x86/ioperm_32 -O2 -g -std=gnu99 -pthread -Wall ioperm.c -lrt -ldl -lm
gcc -m32 -o /tmp/build-kernel_selftests/linux/tools/testing/selftests/x86/protection_keys_32 -O2 -g -std=gnu99 -pthread -Wall protection_keys.c -lrt -ldl -lm
protection_keys.c:192:0: warning: "SYS_pkey_alloc" redefined
#define SYS_pkey_alloc 381
In file included from /usr/include/i386-linux-gnu/sys/syscall.h:31:0,
from protection_keys.c:27:
/usr/include/i386-linux-gnu/bits/syscall.h:215:0: note: this is the location of the previous definition
#define SYS_pkey_alloc __NR_pkey_alloc
protection_keys.c:193:0: warning: "SYS_pkey_free" redefined
#define SYS_pkey_free 382
In file included from /usr/include/i386-linux-gnu/sys/syscall.h:31:0,
from protection_keys.c:27:
/usr/include/i386-linux-gnu/bits/syscall.h:216:0: note: this is the location of the previous definition
#define SYS_pkey_free __NR_pkey_free
gcc -m32 -o /tmp/build-kernel_selftests/linux/tools/testing/selftests/x86/test_vdso_32 -O2 -g -std=gnu99 -pthread -Wall test_vdso.c -lrt -ldl -lm
gcc -m32 -o /tmp/build-kernel_selftests/linux/tools/testing/selftests/x86/entry_from_vm86_32 -O2 -g -std=gnu99 -pthread -Wall entry_from_vm86.c -lrt -ldl -lm
gcc -m32 -o /tmp/build-kernel_selftests/linux/tools/testing/selftests/x86/syscall_arg_fault_32 -O2 -g -std=gnu99 -pthread -Wall syscall_arg_fault.c -lrt -ldl -lm
gcc -m32 -o /tmp/build-kernel_selftests/linux/tools/testing/selftests/x86/test_syscall_vdso_32 -O2 -g -std=gnu99 -pthread -Wall test_syscall_vdso.c thunks_32.S -lrt -ldl -lm
gcc -m32 -o /tmp/build-kernel_selftests/linux/tools/testing/selftests/x86/unwind_vdso_32 -O2 -g -std=gnu99 -pthread -Wall unwind_vdso.c -lrt -ldl -lm
gcc -m32 -o /tmp/build-kernel_selftests/linux/tools/testing/selftests/x86/test_FCMOV_32 -O2 -g -std=gnu99 -pthread -Wall test_FCMOV.c -lrt -ldl -lm
gcc -m32 -o /tmp/build-kernel_selftests/linux/tools/testing/selftests/x86/test_FCOMI_32 -O2 -g -std=gnu99 -pthread -Wall test_FCOMI.c -lrt -ldl -lm
gcc -m32 -o /tmp/build-kernel_selftests/linux/tools/testing/selftests/x86/test_FISTTP_32 -O2 -g -std=gnu99 -pthread -Wall test_FISTTP.c -lrt -ldl -lm
gcc -m32 -o /tmp/build-kernel_selftests/linux/tools/testing/selftests/x86/vdso_restorer_32 -O2 -g -std=gnu99 -pthread -Wall vdso_restorer.c -lrt -ldl -lm
gcc -m64 -o /tmp/build-kernel_selftests/linux/tools/testing/selftests/x86/single_step_syscall_64 -O2 -g -std=gnu99 -pthread -Wall single_step_syscall.c -lrt -ldl
gcc -m64 -o /tmp/build-kernel_selftests/linux/tools/testing/selftests/x86/sysret_ss_attrs_64 -O2 -g -std=gnu99 -pthread -Wall sysret_ss_attrs.c thunks.S -lrt -ldl
/usr/bin/ld: /tmp/cccIIA5x.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
Makefile:49: recipe for target '/tmp/build-kernel_selftests/linux/tools/testing/selftests/x86/sysret_ss_attrs_64' failed
make: *** [/tmp/build-kernel_selftests/linux/tools/testing/selftests/x86/sysret_ss_attrs_64] Error 1
make: Leaving directory '/tmp/build-kernel_selftests/linux/tools/testing/selftests/x86'
root@debian9:/tmp/build-kernel_selftests/linux/tools/testing/selftests#
-------------------------------
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html