Skip to content

CONFIG_LTO & CONFIG_THUMB2_KERNEL is not working? #17

@ChronoMonochrome

Description

@ChronoMonochrome

Hi!

I have successfully built LTO kernel (LK 3.0.x) for Galaxy Ace 2 thanks to your great work and thanks to participiants of some issues in this repository. Previously, I have also managed to compile THUMB2 kernel for an aforementioned device (well, with some ugly workarounds, but nevertheless, fully working).
Now, I'm trying to merge THUMB2 changes, and the build ends up with the following errors:

LDFINAL vmlinux
/home/chrono/1/kernel/ck/include/linux/mfd/abx500/ab8500-gpadc.h:54:5: warning: type of
'ab8500_gpadc_read_raw' does not match original declaration [-Wlto-type-mismatch]
int ab8500_gpadc_read_raw(struct ab8500_gpadc *gpadc, u8 channel,
^
/home/chrono/1/kernel/ck/drivers/mfd/ab8500-gpadc.c:317:5: note: 'ab8500_gpadc_read_raw' was
previously declared here
int ab8500_gpadc_read_raw(struct ab8500_gpadc *gpadc, u8 channel,
^
/home/chrono/1/kernel/ck/drivers/mfd/ab8500-gpadc.c:317:5: note: code may be misoptimized
unless -fno-strict-aliasing is used
/home/chrono/1/kernel/ck/include/linux/mfd/abx500/ab8500-gpadc.h:56:5: warning: type of
'ab8500_gpadc_ad_to_voltage' does not match original declaration [-Wlto-type-mismatch]
int ab8500_gpadc_ad_to_voltage(struct ab8500_gpadc *gpadc,
^
/home/chrono/1/kernel/ck/drivers/mfd/ab8500-gpadc.c:166:5: note: 'ab8500_gpadc_ad_to_voltage'
was previously declared here
int ab8500_gpadc_ad_to_voltage(struct ab8500_gpadc *gpadc, u8 channel,
^
/home/chrono/1/kernel/ck/drivers/mfd/ab8500-gpadc.c:166:5: note: code may be misoptimized
unless -fno-strict-aliasing is used
/home/chrono/1/kernel/ck/include/linux/mfd/abx500/ab8500-gpadc.h:44:22: warning: type of
'ab8500_gpadc_get' does not match original declaration [-Wlto-type-mismatch]
struct ab8500_gpadc *ab8500_gpadc_get(void);
^
/home/chrono/1/kernel/ck/drivers/mfd/ab8500-gpadc.c:150:22: note: 'ab8500_gpadc_get' was
previously declared here
struct ab8500_gpadc *ab8500_gpadc_get(void)
^
/home/chrono/1/kernel/ck/drivers/mfd/ab8500-gpadc.c:150:22: note: code may be misoptimized
unless -fno-strict-aliasing is used
/tmp/cciwx8al.s: Assembler messages:
/tmp/cciwx8al.s:5394: conditional infixes are deprecated in unified syntax
/tmp/cciwx8al.s:5394: Error: thumb conditional instruction should be in IT block -- sbcccs r2,r2,r3' /tmp/cciwx8al.s:5394: Error: thumb conditional instruction should be in IT block -- movcc r3,#0'
/tmp/cciwx8al.s:5421: conditional infixes are deprecated in unified syntax
/tmp/cciwx8al.s:5421: Error: thumb conditional instruction should be in IT block -- sbcccs r2,r2,r3' /tmp/cciwx8al.s:5421: Error: thumb conditional instruction should be in IT block -- movcc r3,#0'
/tmp/cciwx8al.s:5466: conditional infixes are deprecated in unified syntax
/tmp/cciwx8al.s:5466: Error: thumb conditional instruction should be in IT block -- sbcccs r2,r2,r3' /tmp/cciwx8al.s:5466: Error: thumb conditional instruction should be in IT block -- movcc r3,#0'
/tmp/cciwx8al.s:5499: conditional infixes are deprecated in unified syntax
/tmp/cciwx8al.s:5499: Error: thumb conditional instruction should be in IT block -- sbcccs r0,r0,r3' /tmp/cciwx8al.s:5499: Error: thumb conditional instruction should be in IT block -- movcc r3,#0'

(and so on...)

I have also tried with the original (i.e. unmodified by me) CONFIG_THUMB2_KERNEL implementation, still with the same result as before.
Any hints or suggestions are welcome!

~/x-tools/arm-unknown-eabihf/bin/arm-unknown-eabihf-gcc -v
Using built-in specs.
COLLECT_GCC=/home/chrono/x-tools/arm-unknown-eabihf/bin/arm-unknown-eabihf-gcc
COLLECT_LTO_WRAPPER=/home/chrono/x-tools/arm-unknown-eabihf/libexec/gcc/arm-unknown-eabihf/6.1.0/lto-wrapper
Target: arm-unknown-eabihf
Configured with: /media/ROM/root/tc/.build/src/gcc-6.1.0/configure --build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu --target=arm-unknown-eabihf --prefix=/home/chrono/x-tools/arm-unknown-eabihf --with-local-prefix=/home/chrono/x-tools/arm-unknown-eabihf/arm-unknown-eabihf/sysroot --with-sysroot=/home/chrono/x-tools/arm-unknown-eabihf/arm-unknown-eabihf/sysroot --with-newlib --enable-threads=no --disable-shared --with-arch=armv7-a --with-tune=cortex-a9 --with-fpu=vfpv3 --with-float=hard --with-pkgversion='crosstool-NG crosstool-ng-1.22.0-248-gdf5a341' --enable-__cxa_atexit --disable-libgomp --disable-libmudflap --disable-libmpx --disable-libssp --disable-libquadmath --disable-libquadmath-support --with-gmp=/media/ROM/root/tc/.build/arm-unknown-eabihf/buildtools --with-mpfr=/media/ROM/root/tc/.build/arm-unknown-eabihf/buildtools --with-mpc=/media/ROM/root/tc/.build/arm-unknown-eabihf/buildtools --with-isl=/media/ROM/root/tc/.build/arm-unknown-eabihf/buildtools --enable-lto --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --enable-target-optspace --disable-nls --disable-multilib --enable-languages=c,c++
Thread model: single
gcc version 6.1.0 (crosstool-NG crosstool-ng-1.22.0-248-gdf5a341)

~/x-tools/arm-unknown-eabihf/bin/arm-unknown-eabihf-ld -v
GNU ld (crosstool-NG crosstool-ng-1.22.0-248-gdf5a341) 2.26.51.20160617
(binutils are taken from https://sourceware.org/git/?p=binutils-gdb.git;a=shortlog;h=refs/heads/users/hjl/lto-mixed/master )
I'm not using slim LTO config, as I haven't managed to get it to work (if this matter).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions