internal/mkcw/embed/entrypoint.gz: rename to include the arch

Include the arch in the name of the static entrypoint binary, in case we
find ourselves needing to support other architectures in the same area
in the future.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This commit is contained in:
Nalin Dahyabhai 2023-11-27 15:22:52 -05:00
parent 7788160cbb
commit 3b795dd4bc
4 changed files with 10 additions and 11 deletions

View File

@ -69,15 +69,14 @@ static:
mkdir -p ./bin mkdir -p ./bin
cp -rfp ./result/bin/* ./bin/ cp -rfp ./result/bin/* ./bin/
bin/buildah: $(SOURCES) cmd/buildah/*.go internal/mkcw/embed/entrypoint.gz bin/buildah: $(SOURCES) cmd/buildah/*.go internal/mkcw/embed/entrypoint_amd64.gz
$(GO_BUILD) $(BUILDAH_LDFLAGS) $(GO_GCFLAGS) "$(GOGCFLAGS)" -o $@ $(BUILDFLAGS) ./cmd/buildah $(GO_BUILD) $(BUILDAH_LDFLAGS) $(GO_GCFLAGS) "$(GOGCFLAGS)" -o $@ $(BUILDFLAGS) ./cmd/buildah
ifneq ($(shell as --version | grep x86_64),) ifneq ($(shell as --version | grep x86_64),)
internal/mkcw/embed/entrypoint.gz: internal/mkcw/embed/entrypoint internal/mkcw/embed/entrypoint_amd64.gz: internal/mkcw/embed/entrypoint_amd64
$(RM) $@
gzip -k9nf $^ gzip -k9nf $^
internal/mkcw/embed/entrypoint: internal/mkcw/embed/entrypoint.s internal/mkcw/embed/entrypoint_amd64: internal/mkcw/embed/entrypoint_amd64.s
$(AS) -o $(patsubst %.s,%.o,$^) $^ $(AS) -o $(patsubst %.s,%.o,$^) $^
$(LD) -o $@ $(patsubst %.s,%.o,$^) $(LD) -o $@ $(patsubst %.s,%.o,$^)
strip $@ strip $@

View File

@ -2,5 +2,5 @@ package mkcw
import _ "embed" import _ "embed"
//go:embed "embed/entrypoint.gz" //go:embed "embed/entrypoint_amd64.gz"
var entrypointCompressedBytes []byte var entrypointCompressedBytes []byte