Skip to content

Commit

Permalink
chore: support build_mode=pie (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
mzz2017 authored Aug 9, 2023
1 parent 9d08c47 commit 1e578f9
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 6 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,13 @@ jobs:
strategy:
matrix:
goos: [linux]
goarch: [arm64, 386, riscv64, mips64, mips64le, mipsle, mips]
goarch: [386, riscv64]

include:
# BEGIN Linux ARM 5 6 7
# BEGIN Linux ARM 5 6 7 64
- goos: linux
goarch: arm64
buildargs: -buildmode=pie
- goos: linux
goarch: arm
goarm: 7
Expand All @@ -96,12 +99,15 @@ jobs:
- goos: linux
goarch: amd64
goamd64: v1
buildargs: -buildmode=pie
- goos: linux
goarch: amd64
goamd64: v2
buildargs: -buildmode=pie
- goos: linux
goarch: amd64
goamd64: v3
buildargs: -buildmode=pie
# END Linux AMD64 v1 v2 v3

# BEGIN Linux mips
Expand Down Expand Up @@ -131,6 +137,7 @@ jobs:
GOAMD64: ${{ matrix.goamd64 }}
CGO_ENABLED: ${{ matrix.cgo_enabled || 0 }}
CC: ${{ matrix.cc }}
BUILD_ARGS: ${{ matrix.buildargs }}

steps:
- uses: actions/checkout@v3
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,13 @@ jobs:
strategy:
matrix:
goos: [linux]
goarch: [arm64, 386, riscv64, mips64, mips64le, mipsle, mips]
goarch: [386, riscv64]

include:
# BEGIN Linux ARM 5 6 7
# BEGIN Linux ARM 5 6 7 64
- goos: linux
goarch: arm64
buildargs: -buildmode=pie
- goos: linux
goarch: arm
goarm: 7
Expand All @@ -87,12 +90,15 @@ jobs:
- goos: linux
goarch: amd64
goamd64: v1
buildargs: -buildmode=pie
- goos: linux
goarch: amd64
goamd64: v2
buildargs: -buildmode=pie
- goos: linux
goarch: amd64
goamd64: v3
buildargs: -buildmode=pie
# END Linux AMD64 v1 v2 v3

# BEGIN Linux mips
Expand Down Expand Up @@ -122,6 +128,7 @@ jobs:
GOAMD64: ${{ matrix.goamd64 }}
CGO_ENABLED: ${{ matrix.cgo_enabled || 0 }}
CC: ${{ matrix.cc }}
BUILD_ARGS: ${{ matrix.buildargs }}

steps:
- uses: actions/checkout@v3
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,13 @@ jobs:
strategy:
matrix:
goos: [linux]
goarch: [arm64, 386, riscv64, mips64, mips64le, mipsle, mips]
goarch: [386, riscv64]

include:
# BEGIN Linux ARM 5 6 7
# BEGIN Linux ARM 5 6 7 64
- goos: linux
goarch: arm64
buildargs: -buildmode=pie
- goos: linux
goarch: arm
goarm: 7
Expand All @@ -90,12 +93,15 @@ jobs:
- goos: linux
goarch: amd64
goamd64: v1
buildargs: -buildmode=pie
- goos: linux
goarch: amd64
goamd64: v2
buildargs: -buildmode=pie
- goos: linux
goarch: amd64
goamd64: v3
buildargs: -buildmode=pie
# END Linux AMD64 v1 v2 v3

# BEGIN Linux mips
Expand Down Expand Up @@ -125,6 +131,7 @@ jobs:
GOAMD64: ${{ matrix.goamd64 }}
CGO_ENABLED: ${{ matrix.cgo_enabled || 0 }}
CC: ${{ matrix.cc }}
BUILD_ARGS: ${{ matrix.buildargs }}

steps:
- uses: actions/checkout@v3
Expand Down

0 comments on commit 1e578f9

Please sign in to comment.