pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bazel: Fix runtime errors found in mozc build
Module Name: pkgsrc-wip
Committed By: Ryo ONODERA <ryoon%NetBSD.org@localhost>
Pushed By: ryoon
Date: Wed Dec 20 06:03:00 2023 +0900
Changeset: 57f81bb8b8a22103c64a5abf264c62204e0d3632
Modified Files:
bazel/Makefile
bazel/distinfo
bazel/patches/patch-tools_cpp_bsd__cc__toolchain__config.bzl
Added Files:
bazel/patches/patch-third__party_upb_upb-bazel-clang.patch
Log Message:
bazel: Fix runtime errors found in mozc build
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=57f81bb8b8a22103c64a5abf264c62204e0d3632
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
bazel/Makefile | 13 +++++++++---
bazel/distinfo | 9 ++++----
.../patch-third__party_upb_upb-bazel-clang.patch | 24 ++++++++++++++++++++++
.../patch-tools_cpp_bsd__cc__toolchain__config.bzl | 9 +++++---
4 files changed, 45 insertions(+), 10 deletions(-)
diffs:
diff --git a/bazel/Makefile b/bazel/Makefile
index 1d085f0dcc..f0143c224e 100644
--- a/bazel/Makefile
+++ b/bazel/Makefile
@@ -43,10 +43,15 @@ REPLACE_BASH+= scripts/*.sh
REPLACE_BASH+= tools/*.sh
REPLACE_BASH+= tools/*/*.sh
+SUBST_CLASSES+= prefix
+SUBST_STAGE.prefix= pre-configure
+SUBST_MESSAGE.prefix= Setting PREFIX
+SUBST_FILES.prefix+= tools/cpp/bsd_cc_toolchain_config.bzl
+SUBST_VARS.prefix+= PREFIX
+
EXTRA_BAZEL_ARGS+= --tool_java_runtime_version=local_jdk
-#EXTRA_BAZEL_ARGS+= --host_action_env=CWRAPPERS_CONFIG_DIR=${CWRAPPERS_CONFIG_DIR}
-#EXTRA_BAZEL_ARGS+= --action_env=CWRAPPERS_CONFIG_DIR=${CWRAPPERS_CONFIG_DIR}
-MAKE_ENV+= EXTRA_BAZEL_ARGS=${EXTRA_BAZEL_ARGS:Q}
+EXTRA_BAZEL_ARGS+= --subcommands
+MAKE_ENV+= EXTRA_BAZEL_ARGS=${EXTRA_BAZEL_ARGS:Q}
INSTALLATION_DIRS+= bin
@@ -68,6 +73,8 @@ do-install:
${INSTALL_SCRIPT} ${WRKSRC}/output/bazel \
${DESTDIR}${PREFIX}/bin
+# GCC generates unexpected .d files when -MD is specified.
+.include "../../lang/clang/buildlink3.mk"
.include "../../lang/python/tool.mk"
.include "../../mk/java-vm.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/bazel/distinfo b/bazel/distinfo
index f0c44dcee2..53b6495033 100644
--- a/bazel/distinfo
+++ b/bazel/distinfo
@@ -1,8 +1,8 @@
$NetBSD$
-BLAKE2s (bazel-6.4.0-dist-netbsd.tar.gz) = b334d922c89eaaa175e211be15efce81712c744a9fbfd78ab83a0263c139796d
-SHA512 (bazel-6.4.0-dist-netbsd.tar.gz) = 0a974c72ac6f5d1ad0804c01653677cd88d3e7666e1f1588836d5b405dc5e2edbbbd66b191b49808855d79d4712de24bedff9fe2f24b60506a869da4e5b84c10
-Size (bazel-6.4.0-dist-netbsd.tar.gz) = 198661237 bytes
+BLAKE2s (bazel-6.4.0-dist-netbsd.tar.gz) = a740abafc058fe6569dd181611fa6521f82dfc8aea26897a6349709842f388dc
+SHA512 (bazel-6.4.0-dist-netbsd.tar.gz) = 0f1edab7673148a4c5d077de0435d05ca8f25abc280416261d05ee2c3a79d028485d60e046babec23757d0b3b90576e9467b2fdc41b6f5c03ce6e805a00cb5ee
+Size (bazel-6.4.0-dist-netbsd.tar.gz) = 198661065 bytes
SHA1 (patch-distdir__deps.bzl) = 83dead7d5c7374ae7ada4feec5ec3bbd18d9112b
SHA1 (patch-scripts_bootstrap_buildenv.sh) = 7590cf62b1b7abe722addeddd3d4f0595ebc2a1f
SHA1 (patch-scripts_packages_BUILD) = 9cbd73caefe9f7b1b23cbbedf3657ee849d4dfdc
@@ -42,9 +42,10 @@ SHA1 (patch-src_tools_singlejar_zip__headers.h) = 0f2f98f4677118214c7b93cbfeb939
SHA1 (patch-third__party_BUILD) = 05d665afc9d1697867102b3737467241f4b2b610
SHA1 (patch-third__party_abseil-cpp_netbsd-sunos.patch) = c9ff33d2c331312736db8f26c47e8e0b6d7a671f
SHA1 (patch-third__party_grpc_netbsd-config.patch) = ea14e800a118a3541356c00df5d8edb1aed309fa
+SHA1 (patch-third__party_upb_upb-bazel-clang.patch) = 5a734e360c2a8cd685695adeab06cc26f062ec25
SHA1 (patch-third__party_zstd-jni_zstd-jni.BUILD) = 338d636638b429da3f8a695cc15010174651dd23
SHA1 (patch-tools_cpp_BUILD.static.bsd) = af9e8cf9f2f069bc4264f4ab3e57aa1e8686946a
-SHA1 (patch-tools_cpp_bsd__cc__toolchain__config.bzl) = afde4de9ac788a615429b39fa7b297551963cc34
+SHA1 (patch-tools_cpp_bsd__cc__toolchain__config.bzl) = febdaa93ed9de3863403fc3c629c7c71df9228d8
SHA1 (patch-tools_cpp_cc__configure.bzl) = 24cd5bb7b7a09d12853a7b19a8c41b875a51a30f
SHA1 (patch-tools_cpp_lib__cc__configure.bzl) = 02a5c867e61f7f59fa2fd61e70548c25448aa366
SHA1 (patch-tools_cpp_unix__cc__configure.bzl) = a5d181c89fd032e02032d27d0189a8db6a936de4
diff --git a/bazel/patches/patch-third__party_upb_upb-bazel-clang.patch b/bazel/patches/patch-third__party_upb_upb-bazel-clang.patch
new file mode 100644
index 0000000000..66797435d8
--- /dev/null
+++ b/bazel/patches/patch-third__party_upb_upb-bazel-clang.patch
@@ -0,0 +1,24 @@
+$NetBSD$
+
+--- third_party/upb/upb-bazel-clang.patch.orig 2023-12-14 08:14:28.011171125 +0000
++++ third_party/upb/upb-bazel-clang.patch
+@@ -0,0 +1,19 @@
++--- bazel/build_defs.bzl.orig 2023-12-14 07:54:10.464989126 +0000
+++++ bazel/build_defs.bzl
++@@ -36,6 +36,8 @@ _DEFAULT_CPPOPTS.extend([
++ # "-Wshorten-64-to-32", # not in GCC (and my Kokoro images doesn't have Clang)
++ "-Werror",
++ "-Wno-long-long",
+++ "-Wno-deprecated-copy",
+++ "-Wno-deprecated-builtins",
++ ])
++ _DEFAULT_COPTS.extend([
++ "-std=c99",
++@@ -43,6 +45,7 @@ _DEFAULT_COPTS.extend([
++ "-Werror=pedantic",
++ "-Wall",
++ "-Wstrict-prototypes",
+++ "-Wno-gnu-offsetof-extensions",
++ # GCC (at least) emits spurious warnings for this that cannot be fixed
++ # without introducing redundant initialization (with runtime cost):
++ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80635
diff --git a/bazel/patches/patch-tools_cpp_bsd__cc__toolchain__config.bzl b/bazel/patches/patch-tools_cpp_bsd__cc__toolchain__config.bzl
index 3b04696d3a..3c0baee85c 100644
--- a/bazel/patches/patch-tools_cpp_bsd__cc__toolchain__config.bzl
+++ b/bazel/patches/patch-tools_cpp_bsd__cc__toolchain__config.bzl
@@ -1,5 +1,8 @@
$NetBSD$
+* GCC 10.5.0 with -isystem, absolute path and symlink generates unexpected
+ .d file when -MD is specified. Bazel would not accept such .d files.
+
--- tools/cpp/bsd_cc_toolchain_config.bzl.orig 2023-12-05 16:43:07.613565028 +0000
+++ tools/cpp/bsd_cc_toolchain_config.bzl
@@ -56,7 +56,7 @@ all_link_actions = [
@@ -19,7 +22,7 @@ $NetBSD$
+ if is_bsd and not (cpu == "netbsd"):
cxx_builtin_include_directories = ["/usr/lib/clang", "/usr/local/include", "/usr/include"]
+ elif (cpu == "netbsd"):
-+ cxx_builtin_include_directories = ["/usr/pkg/include", "/usr/include"]
++ cxx_builtin_include_directories = ["@PREFIX@/lib/clang", "@PREFIX@/include", "/usr/include"]
else:
cxx_builtin_include_directories = []
@@ -30,7 +33,7 @@ $NetBSD$
tool_path(name = "cpp", path = "/usr/bin/cpp"),
tool_path(name = "dwp", path = "/usr/bin/dwp"),
- tool_path(name = "gcc", path = "/usr/bin/clang"),
-+ tool_path(name = "gcc", path = "/usr/bin/gcc"),
++ tool_path(name = "gcc", path = "/usr/bin/clang"),
tool_path(name = "gcov", path = "/usr/bin/gcov"),
tool_path(name = "ld", path = "/usr/bin/ld"),
tool_path(name = "nm", path = "/usr/bin/nm"),
@@ -43,7 +46,7 @@ $NetBSD$
+ tool_path(name = "ar", path = "/usr/bin/ar"),
+ tool_path(name = "cpp", path = "/usr/bin/cpp"),
+ tool_path(name = "dwp", path = "/usr/bin/dwp"),
-+ tool_path(name = "gcc", path = "/usr/bin/gcc"),
++ tool_path(name = "gcc", path = "@PREFIX@/bin/clang"),
+ tool_path(name = "gcov", path = "/usr/bin/gcov"),
+ tool_path(name = "ld", path = "/usr/bin/ld"),
+ tool_path(name = "nm", path = "/usr/bin/nm"),
Home |
Main Index |
Thread Index |
Old Index