Added C standard gnu23 to the makefile (#288)
* Added C standard gnu23 to the makefile * Added gnu23 standard to all test modue makefiles * Added installation of latest gcc version to tests workflow * Fixed typo in previous commit * Made GCC 14 installation conditional and moved from the workflow to the script * Extracted GCC version check to external script for CI and created tests README * Added #!/bin/bash * Make check_gcc_version.sh executable
This commit is contained in:
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check GCC version and install GCC 14 if needed
|
||||
check_gcc_version() {
|
||||
if command -v gcc &> /dev/null; then
|
||||
gcc_version=$(gcc -dumpversion | cut -d. -f1)
|
||||
if [ "$gcc_version" -lt 14 ]; then
|
||||
echo "GCC version $gcc_version detected. Installing GCC 14..."
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gcc-14
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100
|
||||
echo "GCC 14 installed and set as default."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
check_gcc_version
|
||||
Reference in New Issue
Block a user