On Tue, Oct 25, 2016 at 3:46 PM, Konstantin Demin <rockdri...@gmail.com> wrote: >>> But does this generate the same output as without -enable-default-pie? >>> Some parts of the kernel do use -fpic or -fPIC. Which directive prevails? > > If you call gcc with "-O3 -O0 -O1", only "-O1" option is make sence. > See attachments from recent build log (roughly speaking, Linux 4.8.4, > "make V=1" with gcc 6.2.0-9, but actually it's heavily customized > Debian src:linux with 3rd pty patches and custom configs). > >>> I'm currently looking for correct way to do this trick. > Patch is available and (at least) works for me on amd64 and i386, ref msg #51 Thanks!!!
I just built my Aufs4/Reiser4-patched kernel 4.7.10 from pristine source at kernel.org as: time KCFLAGS="-fno-PIC -fno-PIE" fakeroot make-kpkg --append-to-version=.huitzilopochtli --stem gcc6-aufs4+reiser4m -j8 --initrd kernel_image kernel_headers Otherwise I was getting error: [...] UPD include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h UPD include/generated/utsrelease.h CC kernel/bounds.s kernel/bounds.c:1:0: error: code model kernel does not support PIC mode /* make[3]: *** [kernel/bounds.s] Error 1 Kbuild:45: recipe for target 'kernel/bounds.s' failed make[2]: *** [prepare0] Error 2 Makefile:1033: recipe for target 'prepare0' failed make[2]: Leaving directory '/usr/src/build/tekitl-4.7.10/build/linux-4.7.10' make[1]: *** [debian/stamp/conf/kernel-conf] Error 2 debian/ruleset/targets/common.mk:194: recipe for target 'debian/stamp/conf/kernel-conf' failed make[1]: Leaving directory '/usr/src/build/tekitl-4.7.10/build/linux-4.7.10' make: *** [debian/stamp/conf/minimal_debian] Error 2 /usr/share/kernel-package/ruleset/minimal.mk:93: recipe for target 'debian/stamp/conf/minimal_debian' failed Best Professional Regards. -- Jose R R http://metztli.it --------------------------------------------------------------------------------------------- Try at no charge http://b2evolution.net for http://OpenShift.com PaaS --------------------------------------------------------------------------------------------- from our GitHub http://Nepohualtzintzin.com repository. Cloud the easy way! ---------------------------------------------------------------------------------------------