Building lx2160a_uefi bootloader with gcc 12

Anyone know how to get GitHub - SolidRun/lx2160a_uefi: Parent build repository for generating UEFI firmware for the LX2160a to build with gcc 12, which is now the version in stable Debian?

Using gcc 12 there are errors like:

brotli/c/dec/decode.c:2033:41: error: argument 2 of type 'const uint8_t *' {aka 'const unsigned char *'} declared as a pointer [-Werror=vla-parameter]
 2033 |     size_t encoded_size, const uint8_t* encoded_buffer, size_t* decoded_size,
      |                          ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~

Apparently the tianocore/edk2 submodule needs to be updated to a later commit to compile with gcc 12. I tried changing the runme.sh script in the INITIALIZE section so that it would pull the latest commit.

From:

if [ "x$INITIALIZE" != "x" ]; then
        git submodule update --init
        cd build/tianocore/edk2/ && git submodule update --init
        cd $ROOTDIR
        exit
fi

To:

if [ "x$INITIALIZE" != "x" ]; then
        git submodule update --remote --merge --init
        cd build/tianocore/edk2/ && git submodule update --remote --merge --init
        cd $ROOTDIR
        exit
fi

But now I get these errors:

/usr/bin/ld: brotli/c/dec/decode.o: in function `SafeReadBlockLength':
/home/builder/src/lx2160a_uefi/lx2160a_uefi/build/tianocore/edk2/BaseTools/Source/C/BrotliCompress/brotli/c/dec/decode.c:904: undefined reference to `_kBrotliPrefixCodeRanges'
/usr/bin/ld: /home/builder/src/lx2160a_uefi/lx2160a_uefi/build/tianocore/edk2/BaseTools/Source/C/BrotliCompress/brotli/c/dec/decode.c:904: undefined reference to `_kBrotliPrefixCodeRanges'
/usr/bin/ld: brotli/c/dec/decode.o: in function `PrepareLiteralDecoding':
/home/builder/src/lx2160a_uefi/lx2160a_uefi/build/tianocore/edk2/BaseTools/Source/C/BrotliCompress/brotli/c/dec/decode.c:1200: undefined reference to `_kBrotliContextLookupTable'
/usr/bin/ld: /home/builder/src/lx2160a_uefi/lx2160a_uefi/build/tianocore/edk2/BaseTools/Source/C/BrotliCompress/brotli/c/dec/decode.c:1200: undefined reference to `_kBrotliContextLookupTable'
...

Is there a specific commit that is required for tianocore/edk2 to compile with gcc 12? And if so, how should one modify the runme.sh script to get things to compile correctly?