# Building lx2160a\_uefi bootloader with gcc 12

**URL:** <https://community.solid-run.com/t/building-lx2160a-uefi-bootloader-with-gcc-12/713>\
**Category:** NXP LX2160\
**Created:** [September 7, 2023, 7:14am UTC](https://community.solid-run.com/t/building-lx2160a-uefi-bootloader-with-gcc-12/713 "2023-09-07T07:14:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Terminada](https://avatars.discourse-cdn.com/v4/letter/t/839c29/32.png) [@Terminada](https://community.solid-run.com/u/Terminada)\
**Post date:** [September 7, 2023, 7:14am UTC](https://community.solid-run.com/t/building-lx2160a-uefi-bootloader-with-gcc-12/713/1 "2023-09-07T07:14:53Z")

</div>

Anyone know how to get [GitHub - SolidRun/lx2160a\_uefi: Parent build repository for generating UEFI firmware for the LX2160a](https://github.com/SolidRun/lx2160a_uefi) to build with gcc 12, which is now the version in stable Debian?

Using gcc 12 there are errors like:

```auto
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:

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

```

To:

```auto
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:

```auto
/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?
