Skip to content

Commit

Permalink
Makefile: Change optimization level back to O3. (#10)
Browse files Browse the repository at this point in the history
Revert a change from commit cd2a05a
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.
  • Loading branch information
InterLinked1 authored Dec 27, 2024
1 parent cd2a05a commit 4d84227
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4d84227

Please sign in to comment.