From 27aa9d523e5209c52135e5505a02e52f3604b6a2 Mon Sep 17 00:00:00 2001 From: InterLinked1 <24227567+InterLinked1@users.noreply.github.com> Date: Fri, 27 Dec 2024 15:30:17 -0500 Subject: [PATCH] Makefile: Change optimization level back to O3. Revert a change from commit cd2a05acbae9c7f5fa8a52b15621cc7fbeaaef8a that reverted the optimization level from O3 to O0, which causes build issues since FORTIFY_SOURCE requires optimization. Since issues like this only seem to get caught on non-Debian platforms, add a non-Debian build for comprehensiveness, so issues like this can be caught before affecting other projects. --- .github/workflows/main.yml | 24 ++++++++++++++---------- Makefile | 2 +- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2874a9d..f1c6626 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,16 +12,7 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - vm: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Runs a set of commands using the runners shell - - name: Start build - run: echo Beginning build - container: + debian-12: runs-on: ubuntu-latest container: debian:12 steps: @@ -53,3 +44,16 @@ jobs: make install make examples ./simpleami + fedora-42: + runs-on: ubuntu-24.04 + name: Fedora 42 + container: fedora:42 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build CAMI and execute simple demo + run: | + dnf install -y make gcc + make + make install + make examples diff --git a/Makefile b/Makefile index 3344e96..f9106fa 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ # CC = gcc -CFLAGS = -Wall -Werror -Wno-unused-parameter -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wdeclaration-after-statement -Wmissing-declarations -Wmissing-format-attribute -Wformat=2 -Wshadow -std=gnu99 -pthread -O0 -g -Wstack-protector -fno-omit-frame-pointer -D_FORTIFY_SOURCE=2 -I. +CFLAGS = -Wall -Werror -Wno-unused-parameter -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wdeclaration-after-statement -Wmissing-declarations -Wmissing-format-attribute -Wformat=2 -Wshadow -std=gnu99 -pthread -O3 -g -Wstack-protector -fno-omit-frame-pointer -D_FORTIFY_SOURCE=2 -I. EXE = cami SAMPEXES = simpleami amicli LIBNAME = lib$(EXE).so