summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2025-08-21 04:02:28 +0000
committerCoprDistGit <infra@openeuler.org>2025-08-21 04:02:28 +0000
commit73d252cd07783c044cfe0b329453a001bb2910a5 (patch)
treebaff36e2cd753ae791f43f11aa18a501cf8ecdb3
parente58d11067d12b7dae28500eb2cf2e784bb32e6fa (diff)
automatic import of ANNC
-rw-r--r--ANNC.spec6
-rw-r--r--x86_64_external_files.patch150
2 files changed, 153 insertions, 3 deletions
diff --git a/ANNC.spec b/ANNC.spec
index 42ddf20..36d7649 100644
--- a/ANNC.spec
+++ b/ANNC.spec
@@ -5,7 +5,7 @@
%global install_libdir %{buildroot}%{_libdir}
%global install_includedir %{buildroot}%{_includedir}/annc
-%global max_jobs 16
+%global max_jobs 8
%define debug_package %{nil}
@@ -22,7 +22,7 @@ Source1: annc_external.tar.gz.aa
Source2: annc_external.tar.gz.ab
Source3: annc_external.tar.gz.ac
%ifarch x86_64
-Patch1000: x86_64_external_files.patch
+Patch0: x86_64_external_files.patch
%endif
BuildRequires: cmake >= 3.9.9
@@ -48,7 +48,7 @@ BuildRequires: bazel
cat %{SOURCE1} %{SOURCE2} %{SOURCE3} > annc_external.tar.gz
tar -xzf annc_external.tar.gz -C %{_builddir}
%ifarch x86_64
-%patch 1000 -p1 -d %{_builddir}
+%patch 0 -p1 -d %{_builddir}
%endif
%build
diff --git a/x86_64_external_files.patch b/x86_64_external_files.patch
new file mode 100644
index 0000000..1f77ebc
--- /dev/null
+++ b/x86_64_external_files.patch
@@ -0,0 +1,150 @@
+diff --git a/external/go_sdk/BUILD.bazel b/x86_64/external/go_sdk/BUILD.bazel
+index 9cf6add..511ddbc 100644
+--- a/external/go_sdk/BUILD.bazel
++++ b/x86_64/external/go_sdk/BUILD.bazel
+@@ -7,8 +7,8 @@ package(default_visibility = ["//visibility:public"])
+ filegroup(
+ name = "libs",
+ srcs = glob(
+- ["pkg/linux_arm64/**/*.a"],
+- exclude = ["pkg/linux_arm64/**/cmd/**"],
++ ["pkg/linux_amd64/**/*.a"],
++ exclude = ["pkg/linux_amd64/**/cmd/**"],
+ ),
+ )
+
+@@ -34,7 +34,7 @@ go_sdk(
+ name = "go_sdk",
+ srcs = [":srcs"],
+ go = "bin/go",
+- goarch = "arm64",
++ goarch = "amd64",
+ goos = "linux",
+ headers = [":headers"],
+ libs = [":libs"],
+@@ -60,7 +60,7 @@ package_list(
+
+ declare_toolchains(
+ builder = ":builder",
+- host = "linux_arm64",
++ host = "linux_amd64",
+ sdk = ":go_sdk",
+ )
+
+diff --git a/external/go_sdk/src/internal/buildcfg/zbootstrap.go b/x86_64/external/go_sdk/src/internal/buildcfg/zbootstrap.go
+index 81bd76b..560f94f 100644
+--- a/external/go_sdk/src/internal/buildcfg/zbootstrap.go
++++ b/x86_64/external/go_sdk/src/internal/buildcfg/zbootstrap.go
+@@ -12,7 +12,7 @@ const defaultGOMIPS64 = `hardfloat`
+ const defaultGOPPC64 = `power8`
+ const defaultGOEXPERIMENT = ``
+ const defaultGO_EXTLINK_ENABLED = ``
+-const defaultGO_LDSO = `/lib/ld-linux-aarch64.so.1`
++const defaultGO_LDSO = `/lib64/ld-linux-x86-64.so.2`
+ const version = `go1.18.4`
+ const defaultGOOS = runtime.GOOS
+ const defaultGOARCH = runtime.GOARCH
+diff --git a/external/local_config_cc/BUILD b/x86_64/external/local_config_cc/BUILD
+index 51949c4..89f56ce 100755
+--- a/external/local_config_cc/BUILD
++++ b/x86_64/external/local_config_cc/BUILD
+@@ -47,15 +47,15 @@ filegroup(
+ cc_toolchain_suite(
+ name = "toolchain",
+ toolchains = {
+- "aarch64|compiler": ":cc-compiler-aarch64",
+- "aarch64": ":cc-compiler-aarch64",
++ "k8|compiler": ":cc-compiler-k8",
++ "k8": ":cc-compiler-k8",
+ "armeabi-v7a|compiler": ":cc-compiler-armeabi-v7a",
+ "armeabi-v7a": ":cc-compiler-armeabi-v7a",
+ },
+ )
+
+ cc_toolchain(
+- name = "cc-compiler-aarch64",
++ name = "cc-compiler-k8",
+ toolchain_identifier = "local",
+ toolchain_config = ":local",
+ all_files = ":compiler_deps",
+@@ -72,7 +72,7 @@ cc_toolchain(
+
+ cc_toolchain_config(
+ name = "local",
+- cpu = "aarch64",
++ cpu = "k8",
+ compiler = "compiler",
+ toolchain_identifier = "local",
+ host_system_name = "local",
+@@ -80,11 +80,11 @@ cc_toolchain_config(
+ target_libc = "local",
+ abi_version = "local",
+ abi_libc_version = "local",
+- cxx_builtin_include_directories = ["/usr/lib/gcc/aarch64-openEuler-linux/12/include",
++ cxx_builtin_include_directories = ["/usr/lib/gcc/x86_64-openEuler-linux/12/include",
+ "/usr/local/include",
+ "/usr/include",
+ "/usr/include/c++/12",
+- "/usr/include/c++/12/aarch64-openEuler-linux",
++ "/usr/include/c++/12/x86_64-openEuler-linux",
+ "/usr/include/c++/12/backward"],
+ tool_paths = {"ar": "/usr/bin/ar",
+ "ld": "/usr/bin/ld",
+diff --git a/external/local_config_cc/builtin_include_directory_paths b/x86_64/external/local_config_cc/builtin_include_directory_paths
+index 711ac34..50fea54 100755
+--- a/external/local_config_cc/builtin_include_directory_paths
++++ b/x86_64/external/local_config_cc/builtin_include_directory_paths
+@@ -4,9 +4,9 @@ changes to it will be reflected in the action cache key. When some of these
+ paths change, Bazel will make sure to rerun the action, even though none of
+ declared action inputs or the action commandline changes.
+
+-/usr/lib/gcc/aarch64-openEuler-linux/12/include
++/usr/lib/gcc/x86_64-openEuler-linux/12/include
+ /usr/local/include
+ /usr/include
+ /usr/include/c++/12
+-/usr/include/c++/12/aarch64-openEuler-linux
++/usr/include/c++/12/x86_64-openEuler-linux
+ /usr/include/c++/12/backward
+diff --git a/external/local_config_cc_toolchains/BUILD b/x86_64/external/local_config_cc_toolchains/BUILD
+index db5234f..f9c0875 100755
+--- a/external/local_config_cc_toolchains/BUILD
++++ b/x86_64/external/local_config_cc_toolchains/BUILD
+@@ -1,10 +1,10 @@
+ load("@local_config_platform//:constraints.bzl", "HOST_CONSTRAINTS")
+
+ toolchain(
+- name = "cc-toolchain-aarch64",
++ name = "cc-toolchain-k8",
+ exec_compatible_with = HOST_CONSTRAINTS,
+ target_compatible_with = HOST_CONSTRAINTS,
+- toolchain = "@local_config_cc//:cc-compiler-aarch64",
++ toolchain = "@local_config_cc//:cc-compiler-k8",
+ toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
+ )
+
+diff --git a/external/local_config_platform/constraints.bzl b/x86_64/external/local_config_platform/constraints.bzl
+index 4b29ad7..6a7d8c3 100644
+--- a/external/local_config_platform/constraints.bzl
++++ b/x86_64/external/local_config_platform/constraints.bzl
+@@ -1,6 +1,6 @@
+ # DO NOT EDIT: automatically generated constraints list for local_config_platform
+ # Auto-detected host platform constraints.
+ HOST_CONSTRAINTS = [
+- '@platforms//cpu:aarch64',
++ '@platforms//cpu:x86_64',
+ '@platforms//os:linux',
+ ]
+diff --git a/external/local_execution_config_platform/BUILD b/x86_64/external/local_execution_config_platform/BUILD
+index b4d7fdf..7dfbc12 100755
+--- a/external/local_execution_config_platform/BUILD
++++ b/x86_64/external/local_execution_config_platform/BUILD
+@@ -18,7 +18,7 @@ platform(
+ name = "platform",
+ visibility = ["//visibility:public"],
+ constraint_values = [
+- "@platforms//cpu:aarch64",
++ "@platforms//cpu:x86_64",
+ "@platforms//os:linux",
+ ":platform_constraint",
+ ],