mirror of
https://github.com/osiweb/unified_retro_keyboard.git
synced 2024-11-22 19:33:46 +00:00
9aa3bf4681
- GCC version 12 generates a warnings for certain pointer references. Apparently this is to decect invalid offsets. To properly compiler, the recommended remedy is to add the compiler option "--param=min-pagesize=0" to the flags. This option was introduced in version 11.3, so we need to check the compiler version and only add for >11.3. - Moved setting of compiler flags to a new function c_toolchain_flags in the toolchain file "generic-gcc-avr.cmake". This function is now called from the CMakeLists.txt file in the src directory. This allows the test for the compiler version to be specified in the toolchain file, but not executed until called by the src subdir CMakeLists.txt. Delaying evaluation of the function ensures that the CMAKE_C_VERSION variable is properly set when the function is called. - Moving the compiler flags out of the source dir CMakeLists.txt file also improves portability by moving architecture-specific compiler details from the source tree to the toolchain file. |
||
---|---|---|
.. | ||
asdf |