tum-ei-eda / mlonmcu-sw

Target software library (MLIF, Machine Learning Interface) used by the MLonMCU python package
1 stars 3 forks source link

Possible duplicated flag `-march` for llvm_etiss_pulpin.cmake #8

Open zhouxinyu0723 opened 1 year ago

zhouxinyu0723 commented 1 year ago

https://github.com/tum-ei-eda/mlonmcu-sw/blob/main/cmake/targets/etiss_pulpino.cmake#L61-L62

https://github.com/tum-ei-eda/mlonmcu-sw/blob/main/cmake/toolchains/llvm_etiss_pulpino.cmake#L20

https://github.com/tum-ei-eda/mlonmcu-sw/blob/main/cmake/toolchains/gcc_etiss_pulpino.cmake#L19

PhilippvK commented 1 year ago

Good catch!

If you compile using make VERBOSE=1 you will see that there are in fact much worse duplications happening somewhere else. For example --gcc-toolchain is used 4 times on the command below:

/var/tmp/ga87puy/students/xinyou/mlonmcu/workspace/deps/install/llvm/bin/clang-14  --target=riscv32 --gcc-toolchain=/var/tmp/ga87puy/students/xinyou/mlonmcu/workspace/deps/install/pulp_gcc --sysroot=/var/tmp/ga87puy/students/xinyou/mlonmcu/workspace/deps/install/pulp_gcc/riscv32-unknown-elf -msmall-data-limit=8 -mno-save-restore -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -Wshadow -Wformat=2 -Wundef -Wsign-conversion -Wno-unused-parameter --target=riscv32 --gcc-toolchain=/var/tmp/ga87puy/students/xinyou/mlonmcu/workspace/deps/install/pulp_gcc --sysroot=/var/tmp/ga87puy/students/xinyou/mlonmcu/workspace/deps/install/pulp_gcc/riscv32-unknown-elf -DSTDIO_FAKE=2 -DSTDIO_UART=1 -DSTDIO_NULL=0 -DCONFIG_STDIO=2   -O3 -DNDEBUG     -O3     -ffunction-sections     -fdata-sections   -DportasmHANDLE_INTERRUPT=vSystemIrqHandler --target=riscv32 --gcc-toolchain=/var/tmp/ga87puy/students/xinyou/mlonmcu/workspace/deps/install/pulp_gcc --sysroot=/var/tmp/ga87puy/students/xinyou/mlonmcu/workspace/deps/install/pulp_gcc/riscv32-unknown-elf -msmall-data-limit=8 -mno-save-restore -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -Wshadow -Wformat=2 -Wundef -Wsign-conversion -Wno-unused-parameter -nostartfiles -Wl,--gc-sections -Wl,-Map,memory.map -nostartfiles             -T /var/tmp/ga87puy/students/xinyou/mlonmcu/workspace/deps/src/mlif/cmake/targets/gvsoc/target/pulpissimo/link.ld               -DportasmHANDLE_INTERRUPT=vSystemIrqHandler --target=riscv32 --gcc-toolchain=/var/tmp/ga87puy/students/xinyou/mlonmcu/workspace/deps/install/pulp_gcc --sysroot=/var/tmp/ga87puy/students/xinyou/mlonmcu/workspace/deps/install/pulp_gcc/riscv32-unknown-elf -msmall-data-limit=8 -mno-save-restore -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -Wshadow -Wformat=2 -Wundef -Wsign-conversion -Wno-unused-parameter -nostartfiles -Wl,--gc-sections -Wl,-Map,memory.map     -Xlinker --gc-sections     -Xlinker -Map=linker.map     -Xlinker --cref  CMakeFiles/generic_mlif.dir/main.c.obj CMakeFiles/generic_mlif.dir/__/cmake/targets/gvsoc/target/pulpissimo/system_metal.c.obj CMakeFiles/generic_mlif.dir/__/cmake/targets/gvsoc/target/pulpissimo/crt0.S.obj CMakeFiles/generic_mlif.dir/__/cmake/targets/gvsoc/target/pulpissimo/vectors_metal.S.obj CMakeFiles/generic_mlif.dir/__/cmake/targets/gvsoc/libc/malloc/malloc_internal.c.obj CMakeFiles/generic_mlif.dir/__/cmake/targets/gvsoc/libc/malloc/cl_l1_malloc.c.obj CMakeFiles/generic_mlif.dir/__/cmake/targets/gvsoc/libc/syscalls.c.obj CMakeFiles/generic_mlif.dir/__/cmake/targets/gvsoc/libc/pulp_malloc.c.obj -o ../bin/generic_mlif  ../lib/libtarget_sw_lib.a ../lib/ml_interface/libml_interface.a ../lib/ml_interface/default_model_support/libmodel_support.a ../lib/ml_interface/libml_interface_base.a ../lib/support/libsupport.a ../lib/ml_interface/libtvm_extension.a ../libtvm_aot_rt.a ../lib/ml_interface/libtvm_extension.a ../libtvm_aot_rt.a -lm 
PhilippvK commented 1 year ago

Reopening until fixed for every supported RISCV target