Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor housekeeping 2024121700 #709

Merged
merged 4 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,41 @@ jobs:
make ARCH=${{ matrix.makearch }} PREFIX=/usr DESTDIR=/destdir EFIDIR=test ENABLE_SHIM_HASH=true install
echo 'results:'
find /destdir -type f

build-pull-request-intel-compile-commands-json:
runs-on: ubuntu-20.04
container: vathpela/efi-ci:${{ matrix.distro }}-x64
name: ${{ matrix.distro }} ${{ matrix.efiarch }} build compile_commands.json

strategy:
matrix:
include:
- arch: amd64
efiarch: x64
makearch: x86_64
distro: f41

steps:
- name: Checkout
uses: actions/checkout@v4
with:
# otherwise we are testing target branch instead of the PR branch (see pull_request_target trigger)
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
submodules: recursive
- name: Work around directory ownership issue
id: ignore-ownership
run: |
git config --global --add safe.directory /__w/shim/shim
- name: Update submodules on ${{ matrix.distro }} for ${{ matrix.efiarch }}
id: update-submodules
run: |
make update
- name: Do 'make clean' on ${{ matrix.distro }} for ${{ matrix.efiarch }}
id: clean
run: |
make ARCH=${{ matrix.makearch }} PREFIX=/usr DESTDIR=/destdir EFIDIR=test ENABLE_SHIM_HASH=true clean
- name: Build compile_commands.json on ${{ matrix.distro }} for ${{ matrix.efiarch }}
id: compile_commands
run: |
make ARCH=${{ matrix.makearch }} PREFIX=/usr DESTDIR=/destdir EFIDIR=test ENABLE_SHIM_HASH=true compile_commands.json
3 changes: 3 additions & 0 deletions Cryptlib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ INCLUDES = -I$(CRYPTDIR) -I$(CRYPTDIR)/Include \
WARNFLAGS += -Wno-unused-parameter \
-Wno-unused-but-set-variable

WERRFLAGS += -Wno-error=unused-but-set-variable \
-Wno-error=unused-parameter

CFLAGS = $(FEATUREFLAGS) \
$(OPTIMIZATIONS) \
$(WARNFLAGS) \
Expand Down
3 changes: 3 additions & 0 deletions Cryptlib/OpenSSL/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ WARNFLAGS += -Wno-empty-body \
-Wno-unused-but-set-variable \
-Wno-unused-parameter

WERRFLAGS += -Wno-error=unused-but-set-variable \
-Wno-error=unused-parameter

CFLAGS = $(FEATUREFLAGS) \
$(OPTIMIZATIONS) \
$(WARNFLAGS) \
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ endif

compile_commands.json : Makefile Make.rules Make.defaults
make clean
bear -- make COMPILER=clang test all
bear -- make COMPILER=clang WARNFLAGS+="-Wno-#warnings" test all
sed -i \
-e 's/"-maccumulate-outgoing-args",//g' \
$@
Expand Down
2 changes: 2 additions & 0 deletions include/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,15 @@
#define GNUC_PREREQ(maj, min) 0
#endif

#if !defined(CLANG_PREREQ)
#if defined(__clang__) && defined(__clang_major__) && defined(__clang_minor__)
#define CLANG_PREREQ(maj, min) \
((__clang_major__ > (maj)) || \
(__clang_major__ == (maj) && __clang_minor__ >= (min)))
#else
#define CLANG_PREREQ(maj, min) 0
#endif
#endif /* CLANG_PREREQ */

#if GNUC_PREREQ(5, 1) || CLANG_PREREQ(3, 8)
#define checked_add(addend0, addend1, sum) \
Expand Down