From ebafd6587a6011b153cd3d3b2965fb6c4e2d328e Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Sat, 5 Aug 2023 13:57:42 +0200 Subject: [PATCH 1/2] try to build with clang too --- .github/workflows/main.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0126fca..22fed8b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,6 +23,12 @@ jobs: - master host: - ubuntu-22.04 + cc: + - gcc + include: + - linux: master + host: ubuntu-24.04 + cc: clang steps: - uses: actions/checkout@v4 with: @@ -35,14 +41,14 @@ jobs: - run: sudo apt-get install -y libelf-dev ccache - uses: hendrikmuhs/ccache-action@v1.2 with: - key: ${{ matrix.linux }} + key: ${{ matrix.linux }}-${{ matrix.cc }} - name: Configure kernel run: | - make -C linux tinyconfig + make -C linux tinyconfig CC=${{ matrix.cc }} echo -e "CONFIG_64BIT=y\nCONFIG_X86_64=y\nCONFIG_MODULES=y\nCONFIG_INPUT=y" > linux/kernel/configs/ci.config - make -C linux ci.config - - name: Run make -C linux + make -C linux ci.config CC=${{ matrix.cc }} + - name: Run make -C linux CC=${{ matrix.cc }} run: | export PATH="/usr/lib/ccache:$PATH" - make -C linux -j $(nproc) - - run: make -C tp_smapi modules KBUILD=../linux HDAPS=1 + make -C linux -j $(nproc) CC=${{ matrix.cc }} + - run: make -C tp_smapi modules KBUILD=../linux HDAPS=1 CC=${{ matrix.cc }} From b608aab67b6922a49fd8ef518db242f4efe83945 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Sun, 6 Aug 2023 14:41:03 +0200 Subject: [PATCH 2/2] don't cast smapi_port in inline assembly the generated assembly looks identical with and without the cast on GCC-13 Fixes: #41 --- tp_smapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tp_smapi.c b/tp_smapi.c index de7391e..5be638b 100644 --- a/tp_smapi.c +++ b/tp_smapi.c @@ -201,7 +201,7 @@ static int smapi_request(u32 inEBX, u32 inECX, "=m"(tmpEDI), "=m"(tmpESI) :"m"(inEBX), "m"(inECX), "m"(inEDI), "m"(inESI), - "m"((u16)smapi_port) + "m"(smapi_port) :"%eax", "%ebx", "%ecx", "%edx", "%edi", "%esi");