laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42208?usp=email )
Change subject: ensure libosmocore logging is properly disabled for builds ......................................................................
ensure libosmocore logging is properly disabled for builds
Change-Id: I169a059d8daff0a3993318a4ea3ab7adcb05fee3 --- M sysmoOCTSIM/gcc/Makefile 1 file changed, 8 insertions(+), 1 deletion(-)
Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved
diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile index 0f2a909..461b313 100644 --- a/sysmoOCTSIM/gcc/Makefile +++ b/sysmoOCTSIM/gcc/Makefile @@ -164,7 +164,7 @@ vpath %.S ../
# All Target -all: $(SUB_DIRS) elf bin ihex eep lss +all: $(SUB_DIRS) elf bin ihex eep lss check-no-logging
elf: $(OUTPUT_FILE_NAME).elf sysmoOCTSIM.elf bin: $(OUTPUT_FILE_NAME).bin sysmoOCTSIM.bin @@ -246,5 +246,12 @@ $(OUTPUT_FILE_NAME).lss $(OUTPUT_FILE_NAME).eep $(OUTPUT_FILE_NAME).map \ $(OUTPUT_FILE_NAME).srec
+check-no-logging: $(OUTPUT_FILE_PATH) + @if $(NM) $< | grep -q ' T logp2'; then \ + echo "FAIL: logging symbols linked into release ELF (libosmocore --disable-log-macros missing/broken?)"; \ + $(NM) $< | grep ' T (logp2|osmo_vlogp|log_check_level|logp_stub)'; \ + exit 1; \ + fi + mrproper: clean rm -f *.o *.d *.a *.elf *.bin *.ihex *.eep *.lss *.map *.srec