Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1511612 > unrolled thread
| Started by | Tomas Janousek <tomi@nomi.cz> |
|---|---|
| First post | 2016-10-29 12:20 +0200 |
| Last post | 2016-10-29 23:30 +0200 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [RFC PATCH] kbuild: add -fno-PIE Tomas Janousek <tomi@nomi.cz> - 2016-10-29 12:20 +0200
Re: [RFC PATCH] kbuild: add -fno-PIE Sven Joachim <svenjoac@gmx.de> - 2016-10-29 19:10 +0200
Re: [RFC PATCH] kbuild: add -fno-PIE Tomas Janousek <tomi@nomi.cz> - 2016-10-29 21:30 +0200
Re: [RFC PATCH] kbuild: add -fno-PIE Sven Joachim <svenjoac@gmx.de> - 2016-10-29 23:30 +0200
| From | Tomas Janousek <tomi@nomi.cz> |
|---|---|
| Date | 2016-10-29 12:20 +0200 |
| Subject | Re: [RFC PATCH] kbuild: add -fno-PIE |
| Message-ID | <sxyU2-4R3-3@gated-at.bofh.it> |
Hi Sven, On Mon, Oct 24, 2016 at 07:32:30PM +0200, Sven Joachim wrote: > The attached patch works for me with Debian's gcc-6 package. I tried your patch when building 4.8.5 on an up-to-date Debian testing and still got this: AS arch/x86/entry/vdso/vdso32/note.o arch/x86/entry/vdso/vdso32/note.S:1:0: sorry, unimplemented: -mfentry isn’t supported for 32-bit in combination with -fpic Adding KBUILD_AFLAGS += $(call cc-option,-fno-pie,) helps. (Maybe that should be as-option instead. Don't know. There are lots of AFLAGS=$(call cc-option, ...) in the Makefiles, anyway.) -- Tomáš Janoušek, a.k.a. Pivník, a.k.a. Liskni_si, http://work.lisk.in/
[toc] | [next] | [standalone]
| From | Sven Joachim <svenjoac@gmx.de> |
|---|---|
| Date | 2016-10-29 19:10 +0200 |
| Message-ID | <sxFiN-VC-21@gated-at.bofh.it> |
| In reply to | #1511612 |
On 2016-10-29 12:10 +0200, Tomas Janousek wrote:
> On Mon, Oct 24, 2016 at 07:32:30PM +0200, Sven Joachim wrote:
>> The attached patch works for me with Debian's gcc-6 package.
>
> I tried your patch when building 4.8.5 on an up-to-date Debian testing and
> still got this:
>
> AS arch/x86/entry/vdso/vdso32/note.o
> arch/x86/entry/vdso/vdso32/note.S:1:0: sorry, unimplemented: -mfentry
> isn’t supported for 32-bit in combination with -fpic
I cannot reproduce that, FWIW. Also, arch/x86/entry/vdso/Makefile seems
to explicitly filter out -mfentry from the compiler flags, but maybe I
misunderstand something.
Could you please show the exact command that's failing with "make V=1"?
> Adding KBUILD_AFLAGS += $(call cc-option,-fno-pie,) helps.
> (Maybe that should be as-option instead. Don't know. There are lots of
> AFLAGS=$(call cc-option, ...) in the Makefiles, anyway.)
This is what Ubuntu is doing, so it works at least for them, I suppose.
Cheers,
Sven
[toc] | [prev] | [next] | [standalone]
| From | Tomas Janousek <tomi@nomi.cz> |
|---|---|
| Date | 2016-10-29 21:30 +0200 |
| Message-ID | <sxHuh-2gb-1@gated-at.bofh.it> |
| In reply to | #1511845 |
On Sat, Oct 29, 2016 at 07:03:30PM +0200, Sven Joachim wrote:
> I cannot reproduce that, FWIW. Also, arch/x86/entry/vdso/Makefile seems
> to explicitly filter out -mfentry from the compiler flags, but maybe I
> misunderstand something.
Compiler flags, yes; assembler flags, no. Perhaps adding
KBUILD_AFLAGS_32 := $(filter-out -mfentry,$(KBUILD_AFLAGS_32))
to arch/x86/entry/vdso/Makefile would fix the build as well. I have honestly
no idea which solution is better. :-)
> Could you please show the exact command that's failing with "make V=1"?
gcc -Wp,-MD,arch/x86/entry/vdso/vdso32/.note.o.d -nostdinc -isystem /usr/lib/gcc/i686-linux-gnu/6/include -I./arch/x86/include -I./arch/x86/include/generated/uapi -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -D__ASSEMBLY__ -DCONFIG_X86_X32_ABI -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_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -Wa,-gdwarf-2 -mfentry -DCC_USING_FENTRY -DCC_HAVE_ASM_GOTO -DBUILD_VDSO -m32 -c -o arch/x86/entry/vdso/vdso32/note.o arch/x86/entry/vdso/vdso32/note.S
Is this file being built with your .config?
--
Tomáš Janoušek, a.k.a. Pivník, a.k.a. Liskni_si, http://work.lisk.in/
[toc] | [prev] | [next] | [standalone]
| From | Sven Joachim <svenjoac@gmx.de> |
|---|---|
| Date | 2016-10-29 23:30 +0200 |
| Message-ID | <sxJmp-3D9-7@gated-at.bofh.it> |
| In reply to | #1511868 |
On 2016-10-29 21:21 +0200, Tomas Janousek wrote:
> On Sat, Oct 29, 2016 at 07:03:30PM +0200, Sven Joachim wrote:
>> I cannot reproduce that, FWIW. Also, arch/x86/entry/vdso/Makefile seems
>> to explicitly filter out -mfentry from the compiler flags, but maybe I
>> misunderstand something.
>
> Compiler flags, yes; assembler flags, no. Perhaps adding
>
> KBUILD_AFLAGS_32 := $(filter-out -mfentry,$(KBUILD_AFLAGS_32))
>
> to arch/x86/entry/vdso/Makefile would fix the build as well. I have honestly
> no idea which solution is better. :-)
>
>> Could you please show the exact command that's failing with "make V=1"?
>
> gcc -Wp,-MD,arch/x86/entry/vdso/vdso32/.note.o.d -nostdinc -isystem
> /usr/lib/gcc/i686-linux-gnu/6/include -I./arch/x86/include
> -I./arch/x86/include/generated/uapi -I./arch/x86/include/generated
> -I./include -I./arch/x86/include/uapi -I./include/uapi
> -I./include/generated/uapi -include ./include/linux/kconfig.h
> -D__KERNEL__ -D__ASSEMBLY__ -DCONFIG_X86_X32_ABI -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_SHA1_NI=1
> -DCONFIG_AS_SHA256_NI=1 -Wa,-gdwarf-2 -mfentry -DCC_USING_FENTRY
> -DCC_HAVE_ASM_GOTO -DBUILD_VDSO -m32 -c -o
> arch/x86/entry/vdso/vdso32/note.o arch/x86/entry/vdso/vdso32/note.S
>
> Is this file being built with your .config?
Yes, and "-mfentry -DCC_USING_FENTRY" is missing from the gcc
commandline there. And not only there, although I have
CONFIG_FUNCTION_TRACER=y and CONFIG_HAVE_FENTRY=y, which should cause it
to be added to KBUILD_CFLAGS and KBUILD_AFLAGS.
I don't understand that, but it's late in the evening here.
Cheers,
Sven
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web