Skip to content
Open
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
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ SHELL := /bin/bash
JAEGER_IMPORT_PATH = github.com/jaegertracing/jaeger

# PLATFORMS is a list of all supported platforms
PLATFORMS="linux/amd64,linux/arm64,linux/s390x,linux/ppc64le,darwin/amd64,darwin/arm64,windows/amd64"
PLATFORMS="linux/amd64,linux/arm64,linux/s390x,linux/ppc64le,linux/riscv64,darwin/amd64,darwin/arm64,windows/amd64"
LINUX_PLATFORMS=$(shell echo "$(PLATFORMS)" | tr ',' '\n' | grep linux | tr '\n' ',' | sed 's/,$$/\n/')

# SRC_ROOT is the top of the source tree.
Expand Down Expand Up @@ -98,6 +98,11 @@ echo-v1:

.PHONY: echo-v2
echo-v2:

.PHONY: build-riscv64
build-riscv64:
@echo "Building for RISC-V 64-bit..."
@bash scripts/build-riscv64.sh
@echo "$(GIT_CLOSEST_TAG_V2)"

.PHONY: echo-platforms
Expand Down
23 changes: 23 additions & 0 deletions scripts/build-riscv64.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
# Build script for RISC-V 64-bit architecture

# Set environment variables
export GOOS=linux
export GOARCH=riscv64
export CGO_ENABLED=0

# Get version information
GIT_SHA=$(git rev-parse HEAD)
GIT_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')

# Build flags
GO_BUILD_ARGS="-ldflags=-X github.com/jaegertracing/jaeger/internal/version.commitSHA=${GIT_SHA} \
-X github.com/jaegertracing/jaeger/internal/version.latestVersion=${GIT_TAG} \
-X github.com/jaegertracing/jaeger/internal/version.date=${BUILD_DATE}"

# Create build directory
mkdir -p build/riscv64

# Build all-in-one binary
go build ${GO_BUILD_ARGS} -o build/riscv64/jaeger-all-in-one ./cmd/all-in-one
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file is missing a newline at the end, which is a common Unix convention. Some tools and Git may flag this as an issue or display the file differently. Consider adding a newline character at the end of the file to maintain compatibility with standard Unix text file conventions.

Spotted by Graphite Agent

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.