diff mbox

clang fails on linux-next since commit 8bf705d13039

Message ID CA+icZUWDkj9UHvKyAEmPGxnDkOLERLN5ehjeDNi2-LSkvABpQQ@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sedat Dilek June 9, 2018, 3:17 p.m. UTC
Hi,

I played a bit more with this.

I was irritated when I saw in my full make lines
-fstack-protector-strong and -fno-stack-protector simultaneously,
especially in x86/vdso.

First, I tried...

CC_STACKPROTECTOR_NONE n -> y
CC_STACKPROTECTOR_STRONG y -> n

This breaks at the same place in the same way (see attached file).

Then I tried to filter-out -fstack-protector-strong in the relevant
code parts with CC_STACKPROTECTOR_STRONG=y...


@@ -141,6 +142,7 @@ KBUILD_CFLAGS_32 := $(filter-out
-mcmodel=kernel,$(KBUILD_CFLAGS_32))
 KBUILD_CFLAGS_32 := $(filter-out -fno-pic,$(KBUILD_CFLAGS_32))
 KBUILD_CFLAGS_32 := $(filter-out -mfentry,$(KBUILD_CFLAGS_32))
 KBUILD_CFLAGS_32 := $(filter-out $(GCC_PLUGINS_CFLAGS),$(KBUILD_CFLAGS_32))
+KBUILD_CFLAGS_32 := $(filter-out -fstack-protector-strong,$(KBUILD_CFLAGS_32))
 KBUILD_CFLAGS_32 += -m32 -msoft-float -mregparm=0 -fpic
 KBUILD_CFLAGS_32 += $(call cc-option, -fno-stack-protector)
 KBUILD_CFLAGS_32 += $(call cc-option, -foptimize-sibling-calls)

This breaks...

  if [ "" = "-pg" ]; then if [ arch/x86/entry/vdso/vgetcpu.o !=
"scripts/mod/empty.o" ]; then ./scripts/recordmcount
"arch/x86/entry/vdso/vgetcpu.o"; fi; fi;
  mycompiler -nostdlib -o arch/x86/entry/vdso/vdso64.so.dbg -fPIC
-shared -Wl,--hash-style=both -Wl,--build-id -Wl,-Bsymbolic  -m64
-Wl,-soname=linux-vdso.so.1 -Wl,--no-undefined
-Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096
-Wl,-T,arch/x86/entry/vdso/vdso.lds arch/x86/entry/vdso/vdso-note.o
arch/x86/entry/vdso/vclock_gettime.o arch/x86/entry/vdso/vgetcpu.o &&
sh ./arch/x86/entry/vdso/checkundef.sh 'nm'
'arch/x86/entry/vdso/vdso64.so.dbg'
/usr/bin/ld: arch/x86/entry/vdso/vclock_gettime.o: relocation
R_X86_64_32S against undefined hidden symbol `vvar_vsyscall_gtod_data'
can not be used when making a shared object
/usr/bin/ld: final link failed: Nonrepresentable section on output
clang: error: linker command failed with exit code 1 (use -v to see invocation)
  objcopy -S --localize-hidden  arch/x86/entry/vdso/vdso64.so.dbg
arch/x86/entry/vdso/vdso64.so
objcopy: 'arch/x86/entry/vdso/vdso64.so.dbg': No such file
arch/x86/entry/vdso/Makefile:124: recipe for target
'arch/x86/entry/vdso/vdso64.so' failed
make[6]: *** [arch/x86/entry/vdso/vdso64.so] Error 1

Cannot say stack-protector kconfig settings have an impact on this all.

Thanks.

Regards,
- Sedat -
if [ "-pg" = "-pg" ]; then if [ arch/x86/entry/vdso/vdso-image-64.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount  "arch/x86/entry/vdso/vdso-image-64.o"; fi; fi;
  mycompiler -E -Wp,-MD,arch/x86/entry/vdso/vdso32/.vdso32.lds.d  -nostdinc -isystem /usr/lib/llvm-7/lib/clang/7.0.0/include -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -DCONFIG_CC_STACKPROTECTOR -Qunused-arguments     -P -C -P -Ux86 -D__ASSEMBLY__ -DLINKER_SCRIPT -o arch/x86/entry/vdso/vdso32/vdso32.lds arch/x86/entry/vdso/vdso32/vdso32.lds.S
  mycompiler -Wp,-MD,arch/x86/entry/vdso/vdso32/.vclock_gettime.o.d  -nostdinc -isystem /usr/lib/llvm-7/lib/clang/7.0.0/include -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -DCONFIG_CC_STACKPROTECTOR -Qunused-arguments -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -no-integrated-as -fno-PIE -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -mno-80387 -mstack-alignment=8 -mtune=generic -mno-red-zone -funit-at-a-time -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mretpoline-external-thunk -DRETPOLINE -O2 -Wframe-larger-than=2048 -fstack-protector-strong -Wno-format-invalid-specifier -Wno-gnu -Wno-address-of-packed-member -Wno-tautological-compare -mno-global-merge -Wno-unused-const-variable -g -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-merge-all-constants -fno-stack-check -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Wno-initializer-overrides -Wno-unused-value -Wno-format -Wno-sign-compare -Wno-format-zero-length -Wno-uninitialized -m32 -msoft-float -mregparm=0 -fpic -fno-stack-protector -foptimize-sibling-calls -fno-omit-frame-pointer -DDISABLE_BRANCH_PROFILING    -DKBUILD_BASENAME='"vclock_gettime"' -DKBUILD_MODNAME='"vclock_gettime"' -c -o arch/x86/entry/vdso/vdso32/.tmp_vclock_gettime.o arch/x86/entry/vdso/vdso32/vclock_gettime.c
In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:31:
In file included from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15:
In file included from ./arch/x86/include/asm/vgtod.h:6:
In file included from ./include/linux/clocksource.h:13:
In file included from ./include/linux/timex.h:56:
In file included from ./include/uapi/linux/timex.h:56:
In file included from ./include/linux/time.h:6:
In file included from ./include/linux/seqlock.h:36:
In file included from ./include/linux/spinlock.h:51:
In file included from ./include/linux/preempt.h:81:
In file included from ./arch/x86/include/asm/preempt.h:7:
In file included from ./include/linux/thread_info.h:38:
In file included from ./arch/x86/include/asm/thread_info.h:53:
In file included from ./arch/x86/include/asm/cpufeature.h:5:
In file included from ./arch/x86/include/asm/processor.h:21:
In file included from ./arch/x86/include/asm/msr.h:67:
In file included from ./arch/x86/include/asm/atomic.h:283:
./include/asm-generic/atomic-instrumented.h:365:10: error: invalid output size for constraint '=a'
                return arch_cmpxchg((u64 *)ptr, (u64)old, (u64)new);
                       ^
./arch/x86/include/asm/cmpxchg.h:149:2: note: expanded from macro 'arch_cmpxchg'
        __cmpxchg(ptr, old, new, sizeof(*(ptr)))
        ^
./arch/x86/include/asm/cmpxchg.h:134:2: note: expanded from macro '__cmpxchg'
        __raw_cmpxchg((ptr), (old), (new), (size), LOCK_PREFIX)
        ^
./arch/x86/include/asm/cmpxchg.h:95:17: note: expanded from macro '__raw_cmpxchg'
                             : "=a" (__ret), "+m" (*__ptr)              \
                                     ^
In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:31:
In file included from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15:
In file included from ./arch/x86/include/asm/vgtod.h:6:
In file included from ./include/linux/clocksource.h:13:
In file included from ./include/linux/timex.h:56:
In file included from ./include/uapi/linux/timex.h:56:
In file included from ./include/linux/time.h:6:
In file included from ./include/linux/seqlock.h:36:
In file included from ./include/linux/spinlock.h:51:
In file included from ./include/linux/preempt.h:81:
In file included from ./arch/x86/include/asm/preempt.h:7:
In file included from ./include/linux/thread_info.h:38:
In file included from ./arch/x86/include/asm/thread_info.h:53:
In file included from ./arch/x86/include/asm/cpufeature.h:5:
In file included from ./arch/x86/include/asm/processor.h:21:
In file included from ./arch/x86/include/asm/msr.h:67:
In file included from ./arch/x86/include/asm/atomic.h:283:
./include/asm-generic/atomic-instrumented.h:365:10: error: invalid output size for constraint '=a'
./arch/x86/include/asm/cmpxchg.h:149:2: note: expanded from macro 'arch_cmpxchg'
        __cmpxchg(ptr, old, new, sizeof(*(ptr)))
        ^
./arch/x86/include/asm/cmpxchg.h:134:2: note: expanded from macro '__cmpxchg'
        __raw_cmpxchg((ptr), (old), (new), (size), LOCK_PREFIX)
        ^
./arch/x86/include/asm/cmpxchg.h:104:17: note: expanded from macro '__raw_cmpxchg'
                             : "=a" (__ret), "+m" (*__ptr)              \
                                     ^
In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:31:
In file included from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15:
In file included from ./arch/x86/include/asm/vgtod.h:6:
In file included from ./include/linux/clocksource.h:13:
In file included from ./include/linux/timex.h:56:
In file included from ./include/uapi/linux/timex.h:56:
In file included from ./include/linux/time.h:6:
In file included from ./include/linux/seqlock.h:36:
In file included from ./include/linux/spinlock.h:51:
In file included from ./include/linux/preempt.h:81:
In file included from ./arch/x86/include/asm/preempt.h:7:
In file included from ./include/linux/thread_info.h:38:
In file included from ./arch/x86/include/asm/thread_info.h:53:
In file included from ./arch/x86/include/asm/cpufeature.h:5:
In file included from ./arch/x86/include/asm/processor.h:21:
In file included from ./arch/x86/include/asm/msr.h:67:
In file included from ./arch/x86/include/asm/atomic.h:283:
./include/asm-generic/atomic-instrumented.h:365:10: error: invalid output size for constraint '=a'
./arch/x86/include/asm/cmpxchg.h:149:2: note: expanded from macro 'arch_cmpxchg'
        __cmpxchg(ptr, old, new, sizeof(*(ptr)))
        ^
./arch/x86/include/asm/cmpxchg.h:134:2: note: expanded from macro '__cmpxchg'
        __raw_cmpxchg((ptr), (old), (new), (size), LOCK_PREFIX)
        ^
./arch/x86/include/asm/cmpxchg.h:113:17: note: expanded from macro '__raw_cmpxchg'
                             : "=a" (__ret), "+m" (*__ptr)              \
                                     ^
In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:31:
In file included from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15:
In file included from ./arch/x86/include/asm/vgtod.h:6:
In file included from ./include/linux/clocksource.h:13:
In file included from ./include/linux/timex.h:56:
In file included from ./include/uapi/linux/timex.h:56:
In file included from ./include/linux/time.h:6:
In file included from ./include/linux/seqlock.h:36:
In file included from ./include/linux/spinlock.h:51:
In file included from ./include/linux/preempt.h:81:
In file included from ./arch/x86/include/asm/preempt.h:7:
In file included from ./include/linux/thread_info.h:38:
In file included from ./arch/x86/include/asm/thread_info.h:53:
In file included from ./arch/x86/include/asm/cpufeature.h:5:
In file included from ./arch/x86/include/asm/processor.h:21:
In file included from ./arch/x86/include/asm/msr.h:67:
In file included from ./arch/x86/include/asm/atomic.h:283:
./include/asm-generic/atomic-instrumented.h:365:10: error: invalid output size for constraint '=a'
./arch/x86/include/asm/cmpxchg.h:149:2: note: expanded from macro 'arch_cmpxchg'
        __cmpxchg(ptr, old, new, sizeof(*(ptr)))
        ^
./arch/x86/include/asm/cmpxchg.h:134:2: note: expanded from macro '__cmpxchg'
        __raw_cmpxchg((ptr), (old), (new), (size), LOCK_PREFIX)
        ^
./arch/x86/include/asm/cmpxchg.h:122:17: note: expanded from macro '__raw_cmpxchg'
                             : "=a" (__ret), "+m" (*__ptr)              \
                                     ^
In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:31:
In file included from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15:
In file included from ./arch/x86/include/asm/vgtod.h:6:
In file included from ./include/linux/clocksource.h:13:
In file included from ./include/linux/timex.h:56:
In file included from ./include/uapi/linux/timex.h:56:
In file included from ./include/linux/time.h:6:
In file included from ./include/linux/seqlock.h:36:
In file included from ./include/linux/spinlock.h:51:
In file included from ./include/linux/preempt.h:81:
In file included from ./arch/x86/include/asm/preempt.h:7:
In file included from ./include/linux/thread_info.h:38:
In file included from ./arch/x86/include/asm/thread_info.h:53:
In file included from ./arch/x86/include/asm/cpufeature.h:5:
In file included from ./arch/x86/include/asm/processor.h:21:
In file included from ./arch/x86/include/asm/msr.h:67:
In file included from ./arch/x86/include/asm/atomic.h:283:
./include/asm-generic/atomic-instrumented.h:391:10: error: invalid output size for constraint '=a'
                return arch_sync_cmpxchg((u64 *)ptr, (u64)old, (u64)new);
                       ^
./arch/x86/include/asm/cmpxchg.h:152:2: note: expanded from macro 'arch_sync_cmpxchg'
        __sync_cmpxchg(ptr, old, new, sizeof(*(ptr)))
        ^
./arch/x86/include/asm/cmpxchg.h:137:2: note: expanded from macro '__sync_cmpxchg'
        __raw_cmpxchg((ptr), (old), (new), (size), "lock; ")
        ^
./arch/x86/include/asm/cmpxchg.h:95:17: note: expanded from macro '__raw_cmpxchg'
                             : "=a" (__ret), "+m" (*__ptr)              \
                                     ^
In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:31:
In file included from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15:
In file included from ./arch/x86/include/asm/vgtod.h:6:
In file included from ./include/linux/clocksource.h:13:
In file included from ./include/linux/timex.h:56:
In file included from ./include/uapi/linux/timex.h:56:
In file included from ./include/linux/time.h:6:
In file included from ./include/linux/seqlock.h:36:
In file included from ./include/linux/spinlock.h:51:
In file included from ./include/linux/preempt.h:81:
In file included from ./arch/x86/include/asm/preempt.h:7:
In file included from ./include/linux/thread_info.h:38:
In file included from ./arch/x86/include/asm/thread_info.h:53:
In file included from ./arch/x86/include/asm/cpufeature.h:5:
In file included from ./arch/x86/include/asm/processor.h:21:
In file included from ./arch/x86/include/asm/msr.h:67:
In file included from ./arch/x86/include/asm/atomic.h:283:
./include/asm-generic/atomic-instrumented.h:391:10: error: invalid output size for constraint '=a'
./arch/x86/include/asm/cmpxchg.h:152:2: note: expanded from macro 'arch_sync_cmpxchg'
        __sync_cmpxchg(ptr, old, new, sizeof(*(ptr)))
        ^
./arch/x86/include/asm/cmpxchg.h:137:2: note: expanded from macro '__sync_cmpxchg'
        __raw_cmpxchg((ptr), (old), (new), (size), "lock; ")
        ^
./arch/x86/include/asm/cmpxchg.h:104:17: note: expanded from macro '__raw_cmpxchg'
                             : "=a" (__ret), "+m" (*__ptr)              \
                                     ^
In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:31:
In file included from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15:
In file included from ./arch/x86/include/asm/vgtod.h:6:
In file included from ./include/linux/clocksource.h:13:
In file included from ./include/linux/timex.h:56:
In file included from ./include/uapi/linux/timex.h:56:
In file included from ./include/linux/time.h:6:
In file included from ./include/linux/seqlock.h:36:
In file included from ./include/linux/spinlock.h:51:
In file included from ./include/linux/preempt.h:81:
In file included from ./arch/x86/include/asm/preempt.h:7:
In file included from ./include/linux/thread_info.h:38:
In file included from ./arch/x86/include/asm/thread_info.h:53:
In file included from ./arch/x86/include/asm/cpufeature.h:5:
In file included from ./arch/x86/include/asm/processor.h:21:
In file included from ./arch/x86/include/asm/msr.h:67:
In file included from ./arch/x86/include/asm/atomic.h:283:
./include/asm-generic/atomic-instrumented.h:391:10: error: invalid output size for constraint '=a'
./arch/x86/include/asm/cmpxchg.h:152:2: note: expanded from macro 'arch_sync_cmpxchg'
        __sync_cmpxchg(ptr, old, new, sizeof(*(ptr)))
        ^
./arch/x86/include/asm/cmpxchg.h:137:2: note: expanded from macro '__sync_cmpxchg'
        __raw_cmpxchg((ptr), (old), (new), (size), "lock; ")
        ^
./arch/x86/include/asm/cmpxchg.h:113:17: note: expanded from macro '__raw_cmpxchg'
                             : "=a" (__ret), "+m" (*__ptr)              \
                                     ^
In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:31:
In file included from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15:
In file included from ./arch/x86/include/asm/vgtod.h:6:
In file included from ./include/linux/clocksource.h:13:
In file included from ./include/linux/timex.h:56:
In file included from ./include/uapi/linux/timex.h:56:
In file included from ./include/linux/time.h:6:
In file included from ./include/linux/seqlock.h:36:
In file included from ./include/linux/spinlock.h:51:
In file included from ./include/linux/preempt.h:81:
In file included from ./arch/x86/include/asm/preempt.h:7:
In file included from ./include/linux/thread_info.h:38:
In file included from ./arch/x86/include/asm/thread_info.h:53:
In file included from ./arch/x86/include/asm/cpufeature.h:5:
In file included from ./arch/x86/include/asm/processor.h:21:
In file included from ./arch/x86/include/asm/msr.h:67:
In file included from ./arch/x86/include/asm/atomic.h:283:
./include/asm-generic/atomic-instrumented.h:391:10: error: invalid output size for constraint '=a'
./arch/x86/include/asm/cmpxchg.h:152:2: note: expanded from macro 'arch_sync_cmpxchg'
        __sync_cmpxchg(ptr, old, new, sizeof(*(ptr)))
        ^
./arch/x86/include/asm/cmpxchg.h:137:2: note: expanded from macro '__sync_cmpxchg'
        __raw_cmpxchg((ptr), (old), (new), (size), "lock; ")
        ^
./arch/x86/include/asm/cmpxchg.h:122:17: note: expanded from macro '__raw_cmpxchg'
                             : "=a" (__ret), "+m" (*__ptr)              \
                                     ^
In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:31:
In file included from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15:
In file included from ./arch/x86/include/asm/vgtod.h:6:
In file included from ./include/linux/clocksource.h:13:
In file included from ./include/linux/timex.h:56:
In file included from ./include/uapi/linux/timex.h:56:
In file included from ./include/linux/time.h:6:
In file included from ./include/linux/seqlock.h:36:
In file included from ./include/linux/spinlock.h:51:
In file included from ./include/linux/preempt.h:81:
In file included from ./arch/x86/include/asm/preempt.h:7:
In file included from ./include/linux/thread_info.h:38:
In file included from ./arch/x86/include/asm/thread_info.h:53:
In file included from ./arch/x86/include/asm/cpufeature.h:5:
In file included from ./arch/x86/include/asm/processor.h:21:
In file included from ./arch/x86/include/asm/msr.h:67:
In file included from ./arch/x86/include/asm/atomic.h:283:
./include/asm-generic/atomic-instrumented.h:418:10: error: invalid output size for constraint '=a'
                return arch_cmpxchg_local((u64 *)ptr, (u64)old, (u64)new);
                       ^
./arch/x86/include/asm/cmpxchg.h:155:2: note: expanded from macro 'arch_cmpxchg_local'
        __cmpxchg_local(ptr, old, new, sizeof(*(ptr)))
        ^
./arch/x86/include/asm/cmpxchg.h:140:2: note: expanded from macro '__cmpxchg_local'
        __raw_cmpxchg((ptr), (old), (new), (size), "")
        ^
./arch/x86/include/asm/cmpxchg.h:95:17: note: expanded from macro '__raw_cmpxchg'
                             : "=a" (__ret), "+m" (*__ptr)              \
                                     ^
In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:31:
In file included from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15:
In file included from ./arch/x86/include/asm/vgtod.h:6:
In file included from ./include/linux/clocksource.h:13:
In file included from ./include/linux/timex.h:56:
In file included from ./include/uapi/linux/timex.h:56:
In file included from ./include/linux/time.h:6:
In file included from ./include/linux/seqlock.h:36:
In file included from ./include/linux/spinlock.h:51:
In file included from ./include/linux/preempt.h:81:
In file included from ./arch/x86/include/asm/preempt.h:7:
In file included from ./include/linux/thread_info.h:38:
In file included from ./arch/x86/include/asm/thread_info.h:53:
In file included from ./arch/x86/include/asm/cpufeature.h:5:
In file included from ./arch/x86/include/asm/processor.h:21:
In file included from ./arch/x86/include/asm/msr.h:67:
In file included from ./arch/x86/include/asm/atomic.h:283:
./include/asm-generic/atomic-instrumented.h:418:10: error: invalid output size for constraint '=a'
./arch/x86/include/asm/cmpxchg.h:155:2: note: expanded from macro 'arch_cmpxchg_local'
        __cmpxchg_local(ptr, old, new, sizeof(*(ptr)))
        ^
./arch/x86/include/asm/cmpxchg.h:140:2: note: expanded from macro '__cmpxchg_local'
        __raw_cmpxchg((ptr), (old), (new), (size), "")
        ^
./arch/x86/include/asm/cmpxchg.h:104:17: note: expanded from macro '__raw_cmpxchg'
                             : "=a" (__ret), "+m" (*__ptr)              \
                                     ^
In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:31:
In file included from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15:
In file included from ./arch/x86/include/asm/vgtod.h:6:
In file included from ./include/linux/clocksource.h:13:
In file included from ./include/linux/timex.h:56:
In file included from ./include/uapi/linux/timex.h:56:
In file included from ./include/linux/time.h:6:
In file included from ./include/linux/seqlock.h:36:
In file included from ./include/linux/spinlock.h:51:
In file included from ./include/linux/preempt.h:81:
In file included from ./arch/x86/include/asm/preempt.h:7:
In file included from ./include/linux/thread_info.h:38:
In file included from ./arch/x86/include/asm/thread_info.h:53:
In file included from ./arch/x86/include/asm/cpufeature.h:5:
In file included from ./arch/x86/include/asm/processor.h:21:
In file included from ./arch/x86/include/asm/msr.h:67:
In file included from ./arch/x86/include/asm/atomic.h:283:
./include/asm-generic/atomic-instrumented.h:418:10: error: invalid output size for constraint '=a'
./arch/x86/include/asm/cmpxchg.h:155:2: note: expanded from macro 'arch_cmpxchg_local'
        __cmpxchg_local(ptr, old, new, sizeof(*(ptr)))
        ^
./arch/x86/include/asm/cmpxchg.h:140:2: note: expanded from macro '__cmpxchg_local'
        __raw_cmpxchg((ptr), (old), (new), (size), "")
        ^
./arch/x86/include/asm/cmpxchg.h:113:17: note: expanded from macro '__raw_cmpxchg'
                             : "=a" (__ret), "+m" (*__ptr)              \
                                     ^
In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:31:
In file included from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15:
In file included from ./arch/x86/include/asm/vgtod.h:6:
In file included from ./include/linux/clocksource.h:13:
In file included from ./include/linux/timex.h:56:
In file included from ./include/uapi/linux/timex.h:56:
In file included from ./include/linux/time.h:6:
In file included from ./include/linux/seqlock.h:36:
In file included from ./include/linux/spinlock.h:51:
In file included from ./include/linux/preempt.h:81:
In file included from ./arch/x86/include/asm/preempt.h:7:
In file included from ./include/linux/thread_info.h:38:
In file included from ./arch/x86/include/asm/thread_info.h:53:
In file included from ./arch/x86/include/asm/cpufeature.h:5:
In file included from ./arch/x86/include/asm/processor.h:21:
In file included from ./arch/x86/include/asm/msr.h:67:
In file included from ./arch/x86/include/asm/atomic.h:283:
./include/asm-generic/atomic-instrumented.h:418:10: error: invalid output size for constraint '=a'
./arch/x86/include/asm/cmpxchg.h:155:2: note: expanded from macro 'arch_cmpxchg_local'
        __cmpxchg_local(ptr, old, new, sizeof(*(ptr)))
        ^
./arch/x86/include/asm/cmpxchg.h:140:2: note: expanded from macro '__cmpxchg_local'
        __raw_cmpxchg((ptr), (old), (new), (size), "")
        ^
./arch/x86/include/asm/cmpxchg.h:122:17: note: expanded from macro '__raw_cmpxchg'
                             : "=a" (__ret), "+m" (*__ptr)              \
                                     ^
12 errors generated.
scripts/Makefile.build:312: recipe for target 'arch/x86/entry/vdso/vdso32/vclock_gettime.o' failed
make[6]: *** [arch/x86/entry/vdso/vdso32/vclock_gettime.o] Error 1
scripts/Makefile.build:559: recipe for target 'arch/x86/entry/vdso' failed
make[5]: *** [arch/x86/entry/vdso] Error 2
scripts/Makefile.build:559: recipe for target 'arch/x86/entry' failed
make[4]: *** [arch/x86/entry] Error 2
Makefile:1063: recipe for target 'arch/x86' failed
make[3]: *** [arch/x86] Error 2
debian/rules:4: recipe for target 'build' failed
make[2]: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
scripts/package/Makefile:79: recipe for target 'bindeb-pkg' failed
make[1]: *** [bindeb-pkg] Error 2
Makefile:1408: recipe for target 'bindeb-pkg' failed
make: *** [bindeb-pkg] Error 2
diff mbox

Patch

diff --git a/arch/x86/entry/vdso/Makefile b/arch/x86/entry/vdso/Makefile
index d998a487c9b1..5482e453a8ca 100644
--- a/arch/x86/entry/vdso/Makefile
+++ b/arch/x86/entry/vdso/Makefile
@@ -73,6 +73,7 @@  CFL := $(PROFILING) -mcmodel=small -fPIC -O2
-fasynchronous-unwind-tables -m64 \
        $(filter -g%,$(KBUILD_CFLAGS)) $(call cc-option, -fno-stack-protector) \
        -fno-omit-frame-pointer -foptimize-sibling-calls \
        -DDISABLE_BRANCH_PROFILING -DBUILD_VDSO
+CFL += $(filter-out -fstack-protector-strong,$(KBUILD_CFLAGS))

 $(vobjs): KBUILD_CFLAGS := $(filter-out
$(GCC_PLUGINS_CFLAGS),$(KBUILD_CFLAGS)) $(CFL)