From 80058ba3a3b9dc45e0b47ad7e21390f66c1bd7b7 Mon Sep 17 00:00:00 2001 From: Jason2866 <24528715+Jason2866@users.noreply.github.com> Date: Wed, 10 Apr 2024 13:16:21 +0200 Subject: [PATCH 1/2] rm `-fdebug-prefix-map` entrys from "CCFLAGS" from `platformio-build.py` --- tools/copy-libs.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/copy-libs.sh b/tools/copy-libs.sh index 04c10321e..b015ca08b 100755 --- a/tools/copy-libs.sh +++ b/tools/copy-libs.sh @@ -101,7 +101,7 @@ for item in "${@:2:${#@}-5}"; do elif [ "$prefix" = "-O" ]; then PIO_CC_FLAGS+="$item " elif [[ "$item" != "-Wall" && "$item" != "-Werror=all" && "$item" != "-Wextra" ]]; then - if [[ "${item:0:23}" != "-mfix-esp32-psram-cache" && "${item:0:18}" != "-fmacro-prefix-map" && "${item:0:20}" != "-fdiagnostics-color=" ]]; then + if [[ "${item:0:23}" != "-mfix-esp32-psram-cache" && "${item:0:18}" != "-fmacro-prefix-map" && "${item:0:20}" != "-fdiagnostics-color=" && "${item:0:19}" != "-fdebug-prefix-map=" ]]; then C_FLAGS+="$item " fi fi @@ -115,7 +115,7 @@ set -- $str for item in "${@:2:${#@}-5}"; do prefix="${item:0:2}" if [[ "$prefix" != "-I" && "$prefix" != "-D" && "$item" != "-Wall" && "$item" != "-Werror=all" && "$item" != "-Wextra" && "$prefix" != "-O" ]]; then - if [[ "${item:0:23}" != "-mfix-esp32-psram-cache" && "${item:0:18}" != "-fmacro-prefix-map" && "${item:0:20}" != "-fdiagnostics-color=" ]]; then + if [[ "${item:0:23}" != "-mfix-esp32-psram-cache" && "${item:0:18}" != "-fmacro-prefix-map" && "${item:0:20}" != "-fdiagnostics-color=" && "${item:0:19}" != "-fdebug-prefix-map=" ]]; then AS_FLAGS+="$item " if [[ $C_FLAGS == *"$item"* ]]; then PIO_CC_FLAGS+="$item " @@ -134,7 +134,7 @@ set -- $str for item in "${@:2:${#@}-5}"; do prefix="${item:0:2}" if [[ "$prefix" != "-I" && "$prefix" != "-D" && "$item" != "-Wall" && "$item" != "-Werror=all" && "$item" != "-Wextra" && "$prefix" != "-O" ]]; then - if [[ "${item:0:23}" != "-mfix-esp32-psram-cache" && "${item:0:18}" != "-fmacro-prefix-map" && "${item:0:20}" != "-fdiagnostics-color=" ]]; then + if [[ "${item:0:23}" != "-mfix-esp32-psram-cache" && "${item:0:18}" != "-fmacro-prefix-map" && "${item:0:20}" != "-fdiagnostics-color=" && "${item:0:19}" != "-fdebug-prefix-map=" ]]; then CPP_FLAGS+="$item " if [[ $PIO_CC_FLAGS != *"$item"* ]]; then PIO_CXX_FLAGS+="$item " @@ -204,7 +204,7 @@ for item; do add_next=0 is_script=0 is_dir=0 - elif [[ "${item:0:23}" != "-mfix-esp32-psram-cache" && "${item:0:18}" != "-fmacro-prefix-map" && "${item:0:17}" != "-Wl,--start-group" && "${item:0:15}" != "-Wl,--end-group" ]]; then + elif [[ "${item:0:23}" != "-mfix-esp32-psram-cache" && "${item:0:18}" != "-fmacro-prefix-map" && "${item:0:19}" != "-fdebug-prefix-map=" && "${item:0:17}" != "-Wl,--start-group" && "${item:0:15}" != "-Wl,--end-group" ]]; then LD_FLAGS+="$item " PIO_LD_FLAGS+="$item " fi @@ -402,13 +402,13 @@ for item; do mkdir -p "$out_cpath$rel_p" cp -n $f "$out_cpath$rel_p/" done - for f in `find "$item" -name '*.inc'`; do + for f in `find "$item" -name '*.inc'`; do rel_f=${f#*$item} rel_p=${rel_f%/*} mkdir -p "$out_cpath$rel_p" cp -n $f "$out_cpath$rel_p/" done - # Temporary measure to fix issues caused by https://github.com/espressif/esp-idf/commit/dc4731101dd567cc74bbe4d0f03afe52b7db9afb#diff-1d2ce0d3989a80830fdf230bcaafb3117f32046d16cf46616ac3d55b4df2a988R17 + # Temporary measure to fix issues caused by https://github.com/espressif/esp-idf/commit/dc4731101dd567cc74bbe4d0f03afe52b7db9afb#diff-1d2ce0d3989a80830fdf230bcaafb3117f32046d16cf46616ac3d55b4df2a988R17 if [[ "$fname" == "bt" && "$out_sub" == "/include/$IDF_TARGET/include" && -f "$ipath/controller/$IDF_TARGET/esp_bt_cfg.h" ]]; then mkdir -p "$AR_SDK/include/$fname/controller/$IDF_TARGET" cp -n "$ipath/controller/$IDF_TARGET/esp_bt_cfg.h" "$AR_SDK/include/$fname/controller/$IDF_TARGET/esp_bt_cfg.h" From 2e0f0d9c798b1f707164c3aa62069ae031c092ef Mon Sep 17 00:00:00 2001 From: Jason2866 <24528715+Jason2866@users.noreply.github.com> Date: Wed, 10 Apr 2024 17:59:31 +0200 Subject: [PATCH 2/2] undo format changes --- tools/copy-libs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/copy-libs.sh b/tools/copy-libs.sh index b015ca08b..828b3032f 100755 --- a/tools/copy-libs.sh +++ b/tools/copy-libs.sh @@ -402,13 +402,13 @@ for item; do mkdir -p "$out_cpath$rel_p" cp -n $f "$out_cpath$rel_p/" done - for f in `find "$item" -name '*.inc'`; do + for f in `find "$item" -name '*.inc'`; do rel_f=${f#*$item} rel_p=${rel_f%/*} mkdir -p "$out_cpath$rel_p" cp -n $f "$out_cpath$rel_p/" done - # Temporary measure to fix issues caused by https://github.com/espressif/esp-idf/commit/dc4731101dd567cc74bbe4d0f03afe52b7db9afb#diff-1d2ce0d3989a80830fdf230bcaafb3117f32046d16cf46616ac3d55b4df2a988R17 + # Temporary measure to fix issues caused by https://github.com/espressif/esp-idf/commit/dc4731101dd567cc74bbe4d0f03afe52b7db9afb#diff-1d2ce0d3989a80830fdf230bcaafb3117f32046d16cf46616ac3d55b4df2a988R17 if [[ "$fname" == "bt" && "$out_sub" == "/include/$IDF_TARGET/include" && -f "$ipath/controller/$IDF_TARGET/esp_bt_cfg.h" ]]; then mkdir -p "$AR_SDK/include/$fname/controller/$IDF_TARGET" cp -n "$ipath/controller/$IDF_TARGET/esp_bt_cfg.h" "$AR_SDK/include/$fname/controller/$IDF_TARGET/esp_bt_cfg.h"