From 9c1df02b90e0d0ba6d7af2802f76ebe27c72c210 Mon Sep 17 00:00:00 2001 From: s Date: Fri, 22 Sep 2023 10:56:52 +0800 Subject: [PATCH] fix clang build error --- libnetwork.spec | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libnetwork.spec b/libnetwork.spec index 4eed54d..d09a24d 100644 --- a/libnetwork.spec +++ b/libnetwork.spec @@ -1,7 +1,7 @@ %define debug_package %{nil} Name: libnetwork Version: 0.8.0.dev.2 -Release: 104 +Release: 105 Summary: Proxy used for docker port mapping License: CC-BY-SA-4.0 and MIT and Apache-2.0 and MPL-2.0 URL: https://github.com/docker/libnetwork @@ -29,7 +29,11 @@ CGO_CFLAGS="-fstack-protector-strong -fPIE" \ CGO_CPPFLAGS="-fstack-protector-strong -fPIE" \ CGO_LDFLAGS_ALLOW='-Wl,-z,relro,-z,now' \ CGO_LDFLAGS="-Wl,-z,relro,-z,now -Wl,-z,noexecstack" \ -go build -buildmode=pie -ldflags="-linkmode=external -s -w -buildid=IdByIsula -extldflags=-zrelro -extldflags=-znow " -o docker-proxy ./cmd/proxy +%if "%toolchain" == "clang" + go build -buildmode=pie -ldflags="-linkmode=external -s -w -buildid=IdByIsula -extldflags=-Wl,-z,relro,-z,now " -o docker-proxy ./cmd/proxy +%else + go build -buildmode=pie -ldflags="-linkmode=external -s -w -buildid=IdByIsula -extldflags=-zrelro -extldflags=-znow " -o docker-proxy ./cmd/proxy +%endif %install install -d $RPM_BUILD_ROOT/%{_bindir} @@ -42,6 +46,9 @@ install -p -m 755 libnetwork-d00ceed44cc447c77f25cdf5d59e83163bdcb4c9/docker-pro %{_bindir}/docker-proxy %changelog +* Sat May 06 2023 yoo - 0.8.0.dev.2-105 +- fix clang build error + * Fri May 20 2022 liukuo - 0.8.0.dev.2-104 - License compliance rectification -- Gitee