Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to change the default from "warning as error" (or delete -Werror) #5

Open
kwccoin opened this issue Jun 19, 2022 · 1 comment
Open

Comments

@kwccoin
Copy link

kwccoin commented Jun 19, 2022

I close the other one as the only issue left is just the default is warning as error

xcrun -sdk iphoneos clang -o build/Pongo --target=arm64-apple-ios12.0 -std=gnu17 -Wall -Wunused-label -Werror -O3 -flto -ffreestanding -U__nonnull -nostdlibinc -DTARGET_OS_OSX=0 -DTARGET_OS_MACCATALYST=0 -Inewlib/aarch64-none-darwin/include -nostdlib -static -Wl,-fatal_warnings -Wl,-dead_strip -Wl,-Z   -DPONGO_VERSION='"2.5.1-f6b31be4"' -DAUTOBOOT -DPONGO_PRIVATE=1 -Isrc/lib -Iinclude -Iapple-include -Iinclude/modules/linux/ -Isrc/kernel -Isrc/drivers -Isrc/modules/linux/libfdt -Lnewlib/aarch64-none-darwin/lib -lc -lm -Wl,-preload -Wl,-no_uuid -Wl,-e,start -Wl,-order_file,src/sym_order.txt -Wl,-image_base,0x100000000 -Wl,-sectalign,__DATA,__common,0x8 -Wl,-segalign,0x4000 -DDER_TAG_SIZE=8 src/boot/entry.S  src/boot/stage3.c  src/boot/clearhook.S  src/boot/patches.S  src/boot/demote_patch.S  src/boot/jump_to_image.S  src/boot/main.c src/kernel/dtree.c src/kernel/dtree_getprop.c src/kernel/entry.c src/kernel/legacy.c src/kernel/locks.c src/kernel/lowlevel.c src/kernel/main_task.c src/kernel/mm.c src/kernel/panic.c src/kernel/syscall.c src/kernel/task.c src/kernel/vfs.c src/kernel/support/exit.c src/kernel/support/io.c src/kernel/support/malloc.c src/kernel/support/process.c src/kernel/support/sbrk.c src/dynamic/modload.c src/dynamic/modload_macho.c src/kernel/int.S src/shell/autoboot.c src/shell/command.c src/shell/hex.c src/shell/linux.c src/shell/main.c src/shell/usbloader.c src/drivers/aes/aes.c src/drivers/aes/aes_a7.c src/drivers/aes/aes_a9.c src/drivers/framebuffer/fb.c src/drivers/gpio/gpio.c src/drivers/hal/hal.c src/drivers/mipi/mipi.c src/drivers/plat/s5l8960.c src/drivers/plat/s8000.c src/drivers/plat/s8001.c src/drivers/plat/s8003.c src/drivers/plat/t7000.c src/drivers/plat/t7001.c src/drivers/plat/t8010.c src/drivers/plat/t8011.c src/drivers/plat/t8012.c src/drivers/plat/t8015.c src/drivers/recfg/recfg.c src/drivers/recfg/recfg_soc.c src/drivers/sep/sep.c src/drivers/timer/timer.c src/drivers/tz/tz.c src/drivers/uart/uart.c src/drivers/usb/synopsys_otg.c src/drivers/xnu/xnu.c src/drivers/sep/sep_racer.S src/drivers/xnu/xnu.S src/modules/linux/libfdt/fdt.c src/modules/linux/libfdt/fdt_addresses.c src/modules/linux/libfdt/fdt_empty_tree.c src/modules/linux/libfdt/fdt_overlay.c src/modules/linux/libfdt/fdt_ro.c src/modules/linux/libfdt/fdt_rw.c src/modules/linux/libfdt/fdt_strerror.c src/modules/linux/libfdt/fdt_sw.c src/modules/linux/libfdt/fdt_wip.c src/modules/linux/linux.c src/lib/img4/img4.c src/lib/libDER/DER_Decode.c src/lib/libDER/DER_Encode.c src/lib/libDER/oids.c src/lib/lzma/lzmadec.c
xcrun -sdk iphoneos clang -o build/checkra1n-kpf-pongo --target=arm64-apple-ios12.0 -std=gnu17 -Wall -Wunused-label -Werror -O3 -flto -ffreestanding -U__nonnull -nostdlibinc -DTARGET_OS_OSX=0 -DTARGET_OS_MACCATALYST=0 -Inewlib/aarch64-none-darwin/include -nostdlib -static -Wl,-fatal_warnings -Wl,-dead_strip -Wl,-Z   -DCHECKRAIN_VERSION='"0.12.4"' -Iinclude -Iapple-include -Isrc/kernel -Isrc/drivers -Wl,-kext  -DDER_TAG_SIZE=8 -Isrc/lib -DPONGO_PRIVATE=1 checkra1n/kpf/main.c checkra1n/kpf/shellcode.S
checkra1n/kpf/main.c:1660:10: error: variable 'is_unified' set but not used [-Werror,-Wunused-but-set-variable]
    bool is_unified = true;
         ^
checkra1n/kpf/main.c:1893:14: error: variable 'should_populate_kerninfo' set but not used [-Werror,-Wunused-but-set-variable]
        char should_populate_kerninfo = 0;
             ^
2 errors generated.
make: *** [build/checkra1n-kpf-pongo] Error 1
make: *** Waiting for unfinished jobs....
src/kernel/mm.c:378:14: error: variable 'vm_index_start' set but not used [-Werror,-Wunused-but-set-variable]
    uint32_t vm_index_start = 0;
             ^
src/kernel/mm.c:938:10: error: variable 'is_tt1' set but not used [-Werror,-Wunused-but-set-variable]
    bool is_tt1 = false;
         ^
2 errors generated.
make: *** [build/Pongo] Error 1

For the moment I just remove that flag -Werror and let the warning be warning. It then run.

@TssT16
Copy link

TssT16 commented Jan 2, 2023

Only for INFO
It is under the Makefile

...
# General options
EMBEDDED_LD_FLAGS       ?= -nostdlib -static -Wl,-fatal_warnings -Wl,-dead_strip -Wl,-Z $(EMBEDDED_LDFLAGS)
EMBEDDED_CC_FLAGS       ?= --target=arm64-apple-ios12.0 -std=gnu17 -Wall -Wunused-label **-Werror** -O3 -flto -ffreestanding -U__no...
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants