!113 [sync] PR-112: [平行宇宙] Support package build with clang
From: @openeuler-sync-bot Reviewed-by: @taotao-sauce, @xuxuepeng Signed-off-by: @xuxuepeng
This commit is contained in:
commit
60c0b4b248
29
0001-Fix-CC-compiler-support.patch
Normal file
29
0001-Fix-CC-compiler-support.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From b62fbe3852ea070f1bfbb048e71dfae70c7c71f0 Mon Sep 17 00:00:00 2001
|
||||
From: wangqiang <wangqiang1@kylinos.cn>
|
||||
Date: Tue, 19 Mar 2024 18:54:13 +0800
|
||||
Subject: [PATCH] Fix CC compiler support
|
||||
|
||||
---
|
||||
third_party/utf8_range/utf8_to_utf16/Makefile | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/third_party/utf8_range/utf8_to_utf16/Makefile b/third_party/utf8_range/utf8_to_utf16/Makefile
|
||||
index 853ffa4..30ef021 100644
|
||||
--- a/third_party/utf8_range/utf8_to_utf16/Makefile
|
||||
+++ b/third_party/utf8_range/utf8_to_utf16/Makefile
|
||||
@@ -1,10 +1,10 @@
|
||||
-CC = gcc
|
||||
+CC := ${CC}
|
||||
CPPFLAGS = -g -O3 -Wall -march=native
|
||||
|
||||
OBJS = main.o iconv.o naive.o
|
||||
|
||||
utf8to16: ${OBJS}
|
||||
- gcc $^ -o $@
|
||||
+ ${CC} $^ -o $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
Summary: Protocol Buffers - Google's data interchange format
|
||||
Name: protobuf
|
||||
Version: 25.1
|
||||
Release: 1
|
||||
Release: 2
|
||||
License: BSD
|
||||
URL: https://github.com/protocolbuffers/protobuf
|
||||
Source: https://github.com/protocolbuffers/protobuf/releases/download/v%{version}%{?rcver}/%{name}-all-%{version}%{?rcver}.tar.gz
|
||||
@ -15,6 +15,7 @@ Source1: protobuf-init.el
|
||||
%global so_version 25.1
|
||||
|
||||
Patch9000: 0001-add-secure-compile-option.patch
|
||||
Patch9001: 0001-Fix-CC-compiler-support.patch
|
||||
|
||||
BuildRequires: cmake gcc-c++ emacs zlib-devel gmock-devel gtest-devel jsoncpp-devel
|
||||
BuildRequires: fdupes pkgconfig python-rpm-macros pkgconfig(zlib) ninja-build
|
||||
@ -232,6 +233,8 @@ pushd build
|
||||
-DCMAKE_MODULE_LINKER_FLAGS=-Wl,--as-needed \
|
||||
-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--as-needed \
|
||||
-DCMAKE_CXX_FLAGS="-g -O2" \
|
||||
-DCMAKE_C_COMPILER=%{__cc} \
|
||||
-DCMAKE_CXX_COMPILER=%{__cxx} \
|
||||
-G Ninja \
|
||||
../
|
||||
popd
|
||||
@ -247,6 +250,8 @@ export CMAKE_BUILD_DIR=build-static
|
||||
-Dprotobuf_ABSL_PROVIDER=package \
|
||||
-Dprotobuf_BUILD_TESTS:BOOL=OFF \
|
||||
-DCMAKE_CXX_FLAGS="-fPIC" \
|
||||
-DCMAKE_C_COMPILER=%{__cc} \
|
||||
-DCMAKE_CXX_COMPILER=%{__cxx} \
|
||||
-G Ninja \
|
||||
../
|
||||
popd
|
||||
@ -387,6 +392,9 @@ install -p -m 0644 %{SOURCE1} %{buildroot}%{_emacs_sitestartdir}
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Mar 20 2024 wangqiang <wangqiang1@kylinos.cn> - 25.1-2
|
||||
- Support package build with clang
|
||||
|
||||
* Wed Jan 10 2024 zhongtao <zhongtao17@huawei.com> - 25.1-1
|
||||
- Type:upgrade
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user