csb_patcher.sh ERRATA: cbfs_emptyspacer_line=$(( $cbfs_emptyspacer_line / 1024 )) without quotes, otherwise: NOTE: ./pci1002,990b.rom for Lenovo G505S with A10-5750M : iGPU HD-8650G is already at your ./build/coreflop.rom. ./../csb_patcher.sh: 393: arithmetic expression: expecting primary: " "3280676" / 1024 " ====================== === ./build/coreflop.rom - final memory map FMAP REGION: COREBOOT Name Offset Type Size Comp cbfs_master_header 0x0 cbfs header 32 none fallback/romstage 0x80 stage 329264 none fallback/ramstage 0x50780 stage 193586 LZMA (487792 decompressed) config 0x7fc80 raw 2758 LZMA (8491 decompressed) revision 0x80800 raw 727 none build_info 0x80b80 raw 109 none fallback/dsdt.aml 0x80c80 raw 8250 none cmos_layout.bin 0x82d40 cmos_layout 616 none pci1002,990b.rom 0x83040 optionrom 61952 none pci1002,6665.rom 0x922c0 optionrom 32768 none fallback/postcar 0x9a340 stage 37456 none img/coreinfo 0xa3640 simple elf 43539 none fallback/payload 0xae100 simple elf 66195 none payload_config 0xbe440 raw 1672 none payload_revision 0xbeb40 raw 263 none img/tint 0xbecc0 simple elf 37775 none pci1002,6663.rom 0xc80c0 optionrom 33792 none pci1002,9830.rom 0xd0540 optionrom 59904 none pci1002,990c.rom 0xdefc0 optionrom 61952 none floppyimg/flopbird.lzma 0xee240 raw 2150 LZMA (1474560 decompressed) floppyimg/plop.lzma 0xeeb40 raw 75831 LZMA (1474560 decompressed) floppyimg/tatos.lzma 0x101400 raw 61281 LZMA (1474560 decompressed) floppyimg/memtst32.lzma 0x110400 raw 60421 LZMA (1474560 decompressed) floppyimg/memtst64.lzma 0x11f0c0 raw 61141 LZMA (1474560 decompressed) floppyimg/fiwix.lzma 0x12e040 raw 423748 LZMA (1474560 decompressed) floppyimg/snowdrop.lzma 0x195840 raw 185685 LZMA (1474560 decompressed) floppyimg/visopsys.lzma 0x1c2e40 raw 451284 LZMA (1474560 decompressed) floppyimg/michalos.lzma 0x2311c0 raw 626672 LZMA (1474560 decompressed) floppyimg/freedos.lzma 0x2ca240 raw 376308 LZMA (1474560 decompressed) floppyimg/kolibri.lzma 0x3260c0 raw 1314250 LZMA (1474560 decompressed) floppyimg/vigenere.lzma 0x466f40 raw 1343165 LZMA (1474560 decompressed) (empty) 0x5aeec0 null 10723492 none bootblock 0xfe8f80 bootblock 28224 none ======= rm -f ada/bldtools/sinfo/sinfo.ads ada/bldtools/sinfo/sinfo.adb ada/bldtools/sinfo/xsinfo.adb ada/bldtools/sinfo/csinfo.adb cp -p ../../gcc-8.3.0/gcc/ada/sinfo.ads ../../gcc-8.3.0/gcc/ada/sinfo.adb ../../gcc-8.3.0/gcc/ada/xsinfo.adb ../../gcc-8.3.0/gcc/ada/csinfo.adb ada/bldtools/sinfo (cd ada/bldtools/sinfo; gnatmake -q xsinfo ; ./xsinfo sinfo.h ) Check for field name consistency OK Check for function consistency OK Check for missing functions OK Check for set procedure consistency OK Check for missing set procedures OK Check pragma Inlines are all for existing subprograms OK Check no pragma Inlines were omitted OK Check references in functions in body OK Check for missing functions in body OK Check Set procedures in body OK Check for missing set procedures in body OK All tests completed successfully, no errors detected mv -f ada/bldtools/sinfo/sinfo.h ada/sinfo.h mkdir -p ada/bldtools/einfo rm -f ada/bldtools/einfo/einfo.ads ada/bldtools/einfo/einfo.adb ada/bldtools/einfo/xeinfo.adb ada/bldtools/einfo/ceinfo.adb cp -p ../../gcc-8.3.0/gcc/ada/einfo.ads ../../gcc-8.3.0/gcc/ada/einfo.adb ../../gcc-8.3.0/gcc/ada/xeinfo.adb ../../gcc-8.3.0/gcc/ada/ceinfo.adb ada/bldtools/einfo (cd ada/bldtools/einfo; gnatmake -q xeinfo ; ./xeinfo einfo.h ) Acquiring field names from spec Checking consistent references in spec Check listing of fields in body Check references in access routines in body Check references in set routines in body All tests completed successfully, no errors detected mv -f ada/bldtools/einfo/einfo.h ada/einfo.h mkdir -p ada/bldtools/nmake rm -f ada/bldtools/nmake/sinfo.ads ada/bldtools/nmake/nmake.adt ada/bldtools/nmake/xnmake.adb ada/bldtools/nmake/xutil.ads ada/bldtools/nmake/xutil.adb cp -p ../../gcc-8.3.0/gcc/ada/sinfo.ads ../../gcc-8.3.0/gcc/ada/nmake.adt ../../gcc-8.3.0/gcc/ada/xnmake.adb ../../gcc-8.3.0/gcc/ada/xutil.ads ../../gcc-8.3.0/gcc/ada/xutil.adb ada/bldtools/nmake (cd ada/bldtools/nmake; gnatmake -q xnmake ; ./xnmake -b nmake.adb ; ./xnmake -s nmake.ads) mv -f ada/bldtools/nmake/nmake.ads ada/nmake.ads mv -f ada/bldtools/nmake/nmake.adb ada/nmake.adb touch ada/stamp-nmake mkdir -p ada/bldtools/treeprs rm -f ada/bldtools/treeprs/treeprs.adt ada/bldtools/treeprs/sinfo.ads ada/bldtools/treeprs/xtreeprs.adb cp -p ../../gcc-8.3.0/gcc/ada/treeprs.adt ../../gcc-8.3.0/gcc/ada/sinfo.ads ../../gcc-8.3.0/gcc/ada/xtreeprs.adb ada/bldtools/treeprs (cd ada/bldtools/treeprs; gnatmake -q xtreeprs ; ./xtreeprs treeprs.ads ) mv -f ada/bldtools/treeprs/treeprs.ads ada/treeprs.ads mkdir -p ada/bldtools/snamest rm -f ada/bldtools/snamest/snames.ads-tmpl ada/bldtools/snamest/snames.adb-tmpl ada/bldtools/snamest/snames.h-tmpl ada/bldtools/snamest/xsnamest.adb ada/bldtools/snamest/xutil.ads ada/bldtools/snamest/xutil.adb cp -p ../../gcc-8.3.0/gcc/ada/snames.ads-tmpl ../../gcc-8.3.0/gcc/ada/snames.adb-tmpl ../../gcc-8.3.0/gcc/ada/snames.h-tmpl ../../gcc-8.3.0/gcc/ada/xsnamest.adb ../../gcc-8.3.0/gcc/ada/xutil.ads ../../gcc-8.3.0/gcc/ada/xutil.adb ada/bldtools/snamest (cd ada/bldtools/snamest; gnatmake -q xsnamest ; ./xsnamest ) mv -f ada/bldtools/snamest/snames.ns ada/snames.ads mv -f ada/bldtools/snamest/snames.nb ada/snames.adb mv -f ada/bldtools/snamest/snames.nh ada/snames.h touch ada/stamp-snames touch ada/GNAT_DATE mkdir -p ada/generated s=`cat ../../gcc-8.3.0/gcc/BASE-VER | sed -e "s/\([0-9]*\)\.\([0-9]*\)\..*/-\1\2/g"`; \ d=`if test -f ../../gcc-8.3.0/gcc/ada/GNAT_DATE; then \ cat ../../gcc-8.3.0/gcc/ada/GNAT_DATE; else date +%Y%m%d; fi`; \ cat ../../gcc-8.3.0/gcc/ada/gnatvsn.ads | sed -e "/Version/s/(\([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]\).*)/($d$s)/g" >ada/generated/gnatvsn.ads g++ -fno-PIE -c -DIN_GCC_FRONTEND -O2 -fomit-frame-pointer -m64 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -Iada -I../../gcc-8.3.0/gcc -I../../gcc-8.3.0/gcc/ada -I../../gcc-8.3.0/gcc/../include -I../../gcc-8.3.0/gcc/../libcpp/include -I/p/coreboot/util/crossgcc/xgcc/include -I/p/coreboot/util/crossgcc/xgcc/include -I/p/coreboot/util/crossgcc/xgcc/include -I../../gcc-8.3.0/gcc/../libdecnumber -I../../gcc-8.3.0/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc-8.3.0/gcc/../libbacktrace -o ada/adadecode.o -MT ada/adadecode.o -MMD -MP -MF ada/.deps/adadecode.TPo ../../gcc-8.3.0/gcc/ada/adadecode.c g++ -fno-PIE -c -DIN_GCC_FRONTEND -O2 -fomit-frame-pointer -m64 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wno-error -DHAVE_CONFIG_H -I. -Iada -I../../gcc-8.3.0/gcc -I../../gcc-8.3.0/gcc/ada -I../../gcc-8.3.0/gcc/../include -I../../gcc-8.3.0/gcc/../libcpp/include -I/p/coreboot/util/crossgcc/xgcc/include -I/p/coreboot/util/crossgcc/xgcc/include -I/p/coreboot/util/crossgcc/xgcc/include -I../../gcc-8.3.0/gcc/../libdecnumber -I../../gcc-8.3.0/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc-8.3.0/gcc/../libbacktrace -o ada/adaint.o -MT ada/adaint.o -MMD -MP -MF ada/.deps/adaint.TPo ../../gcc-8.3.0/gcc/ada/adaint.c ../../gcc-8.3.0/gcc/ada/adaint.c: In function 'int __gnat_try_lock(char*, char*)': ../../gcc-8.3.0/gcc/ada/adaint.c:550:8: warning: ignoring return value of 'int link(const char*, const char*)' declared with attribute 'warn_unused_result' [-Wunused-result] 550 | link (temp_file, full_path); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~ In file included from ../../gcc-8.3.0/gcc/system.h:691, from ../../gcc-8.3.0/gcc/ada/adaint.c:120: ../../gcc-8.3.0/gcc/ada/adaint.c: In function 'char* __gnat_locate_exec(char*, char*)': ../../gcc-8.3.0/gcc/ada/adaint.c:2903:19: warning: argument 1 null where non-null expected [-Wnonnull] 2903 | (strlen (exec_name) + strlen (HOST_EXECUTABLE_SUFFIX) + 1); | ~~~~~~~^~~~~~~~~~~ ../../gcc-8.3.0/gcc/../include/libiberty.h:722:37: note: in definition of macro 'alloca' 722 | # define alloca(x) __builtin_alloca(x) | ^ In file included from /usr/include/c++/11/cstring:42, from ../../gcc-8.3.0/gcc/system.h:235, from ../../gcc-8.3.0/gcc/ada/adaint.c:120: /usr/include/string.h:407:15: note: in a call to function 'size_t strlen(const char*)' declared 'nonnull' 407 | extern size_t strlen (const char *__s) | ^~~~~~ g++ -fno-PIE -c -DIN_GCC_FRONTEND -O2 -fomit-frame-pointer -m64 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -Iada -I../../gcc-8.3.0/gcc -I../../gcc-8.3.0/gcc/ada -I../../gcc-8.3.0/gcc/../include -I../../gcc-8.3.0/gcc/../libcpp/include -I/p/coreboot/util/crossgcc/xgcc/include -I/p/coreboot/util/crossgcc/xgcc/include -I/p/coreboot/util/crossgcc/xgcc/include -I../../gcc-8.3.0/gcc/../libdecnumber -I../../gcc-8.3.0/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc-8.3.0/gcc/../libbacktrace -o ada/argv.o -MT ada/argv.o -MMD -MP -MF ada/.deps/argv.TPo ../../gcc-8.3.0/gcc/ada/argv.c g++ -fno-PIE -c -DIN_GCC_FRONTEND -O2 -fomit-frame-pointer -m64 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -Iada -I../../gcc-8.3.0/gcc -I../../gcc-8.3.0/gcc/ada -I../../gcc-8.3.0/gcc/../include -I../../gcc-8.3.0/gcc/../libcpp/include -I/p/coreboot/util/crossgcc/xgcc/include -I/p/coreboot/util/crossgcc/xgcc/include -I/p/coreboot/util/crossgcc/xgcc/include -I../../gcc-8.3.0/gcc/../libdecnumber -I../../gcc-8.3.0/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc-8.3.0/gcc/../libbacktrace -o ada/cio.o -MT ada/cio.o -MMD -MP -MF ada/.deps/cio.TPo ../../gcc-8.3.0/gcc/ada/cio.c ../../gcc-8.3.0/gcc/ada/cio.c: In function 'int get_int()': ../../gcc-8.3.0/gcc/ada/cio.c:90:9: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result] 90 | scanf (" %d", &x); | ~~~~~~^~~~~~~~~~~ g++ -fno-PIE -c -DIN_GCC_FRONTEND -O2 -fomit-frame-pointer -m64 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -Iada -I../../gcc-8.3.0/gcc -I../../gcc-8.3.0/gcc/ada -I../../gcc-8.3.0/gcc/../include -I../../gcc-8.3.0/gcc/../libcpp/include -I/p/coreboot/util/crossgcc/xgcc/include -I/p/coreboot/util/crossgcc/xgcc/include -I/p/coreboot/util/crossgcc/xgcc/include -I../../gcc-8.3.0/gcc/../libdecnumber -I../../gcc-8.3.0/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc-8.3.0/gcc/../libbacktrace -o ada/cstreams.o -MT ada/cstreams.o -MMD -MP -MF ada/.deps/cstreams.TPo ../../gcc-8.3.0/gcc/ada/cstreams.c g++ -fno-PIE -c -DIN_GCC_FRONTEND -O2 -fomit-frame-pointer -m64 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -Iada -I../../gcc-8.3.0/gcc -I../../gcc-8.3.0/gcc/ada -I../../gcc-8.3.0/gcc/../include -I../../gcc-8.3.0/gcc/../libcpp/include -I/p/coreboot/util/crossgcc/xgcc/include -I/p/coreboot/util/crossgcc/xgcc/include -I/p/coreboot/util/crossgcc/xgcc/include -I../../gcc-8.3.0/gcc/../libdecnumber -I../../gcc-8.3.0/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc-8.3.0/gcc/../libbacktrace -o ada/env.o -MT ada/env.o -MMD -MP -MF ada/.deps/env.TPo ../../gcc-8.3.0/gcc/ada/env.c g++ -fno-PIE -c -DIN_GCC_FRONTEND -O2 -fomit-frame-pointer -m64 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -Iada -I../../gcc-8.3.0/gcc -I../../gcc-8.3.0/gcc/ada -I../../gcc-8.3.0/gcc/../include -I../../gcc-8.3.0/gcc/../libcpp/include -I/p/coreboot/util/crossgcc/xgcc/include -I/p/coreboot/util/crossgcc/xgcc/include -I/p/coreboot/util/crossgcc/xgcc/include -I../../gcc-8.3.0/gcc/../libdecnumber -I../../gcc-8.3.0/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc-8.3.0/gcc/../libbacktrace -o ada/init.o -MT ada/init.o -MMD -MP -MF ada/.deps/init.TPo ../../gcc-8.3.0/gcc/ada/init.c In file included from /usr/include/signal.h:328, from /usr/include/x86_64-linux-gnu/sys/param.h:28, from ../../gcc-8.3.0/gcc/system.h:298, from ../../gcc-8.3.0/gcc/ada/init.c:65: ../../gcc-8.3.0/gcc/ada/init.c:575:18: error: missing binary operator before token "(" 575 | # if 16 * 1024 < MINSIGSTKSZ | ^~~~~~~~~~~ make[1]: *** [Makefile:1110: ada/init.o] Error 1 make[1]: Leaving directory '/p/coreboot/util/crossgcc/build-i386-elf-GCC/gcc' make: *** [Makefile:4244: all-gcc] Error 2