!29 add go compile flag
From: @BruceGW Reviewed-by: @hanxinke,@hanxinke Signed-off-by: @hanxinke,@hanxinke
This commit is contained in:
commit
315c416e28
@ -3,7 +3,7 @@
|
|||||||
Summary: AI auto tuning system
|
Summary: AI auto tuning system
|
||||||
Name: atune
|
Name: atune
|
||||||
Version: 0.3
|
Version: 0.3
|
||||||
Release: 0.7
|
Release: 0.8
|
||||||
License: Mulan PSL v2
|
License: Mulan PSL v2
|
||||||
URL: https://gitee.com/openeuler/A-Tune
|
URL: https://gitee.com/openeuler/A-Tune
|
||||||
Source: https://gitee.com/openeuler/A-Tune/repository/archive/v%{version}.tar.gz
|
Source: https://gitee.com/openeuler/A-Tune/repository/archive/v%{version}.tar.gz
|
||||||
@ -11,6 +11,8 @@ Source: https://gitee.com/openeuler/A-Tune/repository/archive/v%{version}.tar.gz
|
|||||||
Patch1: atune-support-for-Go-1.15.patch
|
Patch1: atune-support-for-Go-1.15.patch
|
||||||
Patch2: atune-update-file-description-and-testcase.patch
|
Patch2: atune-update-file-description-and-testcase.patch
|
||||||
|
|
||||||
|
Patch6001: backport-atune-add-go-compile-flag.patch
|
||||||
|
|
||||||
BuildRequires: rpm-build golang-bin procps-ng
|
BuildRequires: rpm-build golang-bin procps-ng
|
||||||
BuildRequires: sqlite >= 3.24.0 openssl
|
BuildRequires: sqlite >= 3.24.0 openssl
|
||||||
BuildRequires: python3-scikit-optimize python3-pandas python3-xgboost
|
BuildRequires: python3-scikit-optimize python3-pandas python3-xgboost
|
||||||
@ -143,6 +145,9 @@ make models
|
|||||||
%systemd_postun_with_restart atuned.service
|
%systemd_postun_with_restart atuned.service
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Mar 20 2021 BruceGW <gyl93216@163.com> - 0.3-0.8
|
||||||
|
- add go compile flag
|
||||||
|
|
||||||
* Mon Jan 11 2021 gaoruoshu <gaoruoshu@huawei.com> - 0.3-0.7
|
* Mon Jan 11 2021 gaoruoshu <gaoruoshu@huawei.com> - 0.3-0.7
|
||||||
- update file description and test case
|
- update file description and test case
|
||||||
|
|
||||||
|
|||||||
34
backport-atune-add-go-compile-flag.patch
Normal file
34
backport-atune-add-go-compile-flag.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
From 44c3814b0814d64d104ddb0605fad46be8d0b06f Mon Sep 17 00:00:00 2001
|
||||||
|
From: zhuguodong <zhuguodong8@huawei.com>
|
||||||
|
Date: Thu, 24 Dec 2020 08:06:38 +0000
|
||||||
|
Subject: [PATCH] makefile change
|
||||||
|
|
||||||
|
---
|
||||||
|
Makefile | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index 68f6252..b54458c 100755
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -11,7 +11,7 @@ SRCVERSION = $(shell git rev-parse --short HEAD 2>/dev/null)
|
||||||
|
ATUNEVERSION = $(VERSION)$(if $(SRCVERSION),($(SRCVERSION)))
|
||||||
|
|
||||||
|
GOLDFLAGS += -X gitee.com/openeuler/A-Tune/common/config.Version=$(ATUNEVERSION)
|
||||||
|
-GOFLAGS = -ldflags "$(GOLDFLAGS)"
|
||||||
|
+GOFLAGS = -ldflags '-s -w -extldflags "-static" -extldflags "-zrelro" -extldflags "-znow" -extldflags "-ftrapv" $(GOLDFLAGS)'
|
||||||
|
|
||||||
|
CERT_PATH=$(DESTDIR)/etc/atuned
|
||||||
|
GRPC_CERT_PATH=$(CERT_PATH)/grpc_certs
|
||||||
|
@@ -29,7 +29,7 @@ atuned:
|
||||||
|
go build -mod=vendor -v $(GOFLAGS) -o $(PKGPATH)/atuned cmd/atuned/*.go
|
||||||
|
|
||||||
|
modules:
|
||||||
|
- cd ${CURDIR}/modules/server/profile/ && go build -mod=vendor -buildmode=plugin -o ${CURDIR}/pkg/daemon_profile_server.so *.go
|
||||||
|
+ cd ${CURDIR}/modules/server/profile/ && go build -mod=vendor -buildmode=plugin $(GOFLAGS) -o ${CURDIR}/pkg/daemon_profile_server.so *.go
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf $(PKGPATH)/*
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user