diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 887660a..ec84603 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: compiler: [gcc-9, gcc-10, gcc-11, clang-12, clang-13, clang-14] - bits: [32, 64] + bits: ['32', '64'] lto: [LTO=y, LTO=n] runs-on: 'ubuntu-22.04' @@ -23,5 +23,5 @@ jobs: - name: make run: | - make CC=${{matrix.compiler}} M32=${{matrix.bits == 32 && 'y' || 'n'}} ${{matrix.lto}} + make CC=${{matrix.compiler}} BITS=${{matrix.bits}} ${{matrix.lto}} ./extend_skl_only.sh diff --git a/.github/workflows/scan-build.yml b/.github/workflows/scan-build.yml index 3ff89f4..0ebc9f1 100644 --- a/.github/workflows/scan-build.yml +++ b/.github/workflows/scan-build.yml @@ -7,7 +7,7 @@ jobs: strategy: matrix: - bits: [32, 64] + bits: ['32', '64'] lto: [LTO=y, LTO=n] runs-on: 'ubuntu-22.04' @@ -22,4 +22,4 @@ jobs: - name: make run: | - scan-build-14 --status-bugs -analyze-headers make M32=${{matrix.bits == 32 && 'y' || 'n'}} ${{matrix.lto}} + scan-build-14 --status-bugs -analyze-headers make BITS=${{matrix.bits}} ${{matrix.lto}} diff --git a/Makefile b/Makefile index dac53ae..f03300c 100644 --- a/Makefile +++ b/Makefile @@ -11,12 +11,15 @@ CFLAGS += -flto LDFLAGS += -flto endif -ifeq ($(M32),y) +BITS ?= 64 +ifeq ($(BITS),32) CFLAGS += -m32 -mregparm=3 -fno-plt -freg-struct-return LDFLAGS += -m32 -else +else ifeq ($(BITS),64) CFLAGS += -m64 LDFLAGS += -m64 +else +$(error Bad $$(BITS) value '$(BITS)') endif # There is a 64k total limit, so optimise for size. The binary may be loaded