ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Четверг
28 марта
978508
Nikolay_Po (14.02.2020 11:25 - 11:28, просмотров: 25147)
LTO wrapper failed. Error: offset out of range. Дорос мой проект до такого размера (код около 11-16кБ, в зависимости от оптимизаций), когда LTO перестала работать с таким сообщением. Если не включать LTO, компилируется отлично, все оптимизации работают. gcc-arm-none-eabi-9-2019-q4-major, lib/gcc/arm-none-eabi/9.2.1 Сейчас попробую залатанную сборку gcc-8.2.1-1.7-20190524 от Liviu Ionescu. Посмотрим, будет ли разница.
Building target: LCBM_16.elf
Invoking: GNU ARM Cross C++ Linker
arm-none-eabi-g++ -mcpu=cortex-m3 -mthumb -Ofast -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -flto -Werror -Wunused -Wuninitialized -Wall -Wextra -Wmissing-declarations -Wconversion -Wpointer-arith -Wpadded -Wshadow -Wlogical-op -Waggregate-return -Wfloat-equal  -g3 -T mem.ld -T libs.ld -T sections.ld -nostartfiles -Xlinker --gc-sections -L"../ldscripts" -Wl,-Map,"LCBM_16.map" -Xlinker --cref --specs=nano.specs -o "LCBM_16.elf"  ./system/src/stm32f1-stdperiph/misc.o ./system/src/stm32f1-stdperiph/stm32f10x_gpio.o ./system/src/stm32f1-stdperiph/stm32f10x_rcc.o  ./system/src/newlib/_exit.o ./system/src/newlib/_sbrk.o ./system/src/newlib/_startup.o ./system/src/newlib/_syscalls.o ./system/src/newlib/assert.o  ./system/src/diag/Trace.o ./system/src/diag/trace_impl.o  ./system/src/cortexm/_initialize_hardware.o ./system/src/cortexm/_reset_hardware.o ./system/src/cortexm/exception_handlers.o  ./system/src/cmsis/system_stm32f10x.o ./system/src/cmsis/vectors_stm32f10x.o  ./src/BlinkLed.o ./src/Timer.o ./src/_write.o ./src/adc.o ./src/arm_biquad_cascade_df1_fast_q31.o ./src/arm_biquad_cascade_df1_init_q31.o ./src/dsp.o ./src/dsp_constants.o ./src/lcd.o ./src/lcd_font.o ./src/main.o ./src/uart.o   
/tmp/cccuCq3w.s: Assembler messages:
/tmp/cccuCq3w.s:5301: Error: offset out of range
makefile:62: recipe for target 'LCBM_16.elf' failed
/tmp/cccuCq3w.s:5332: Error: offset out of range
/tmp/cccuCq3w.s:5388: Error: offset out of range
lto-wrapper: fatal error: arm-none-eabi-g++ returned 1 exit status
compilation terminated.
/home/nikolaypo/opt/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make: *** [LCBM_16.elf] Error 1
"make all" terminated with exit code 2. Build might be incomplete.