aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Rabson <dfr@FreeBSD.org>2023-11-23 10:20:48 +0000
committerDoug Rabson <dfr@FreeBSD.org>2023-12-04 10:14:46 +0000
commit9e39f2af50c1ab8843f0cb00a245d398a3aeddcf (patch)
tree829488d6a3aea6028e63a47cb3b610cf65642381
parent6596f69ac5e3838e6f8b3b49df0ec8abfe94914a (diff)
downloadports-9e39f2af50c1ab8843f0cb00a245d398a3aeddcf.tar.gz
ports-9e39f2af50c1ab8843f0cb00a245d398a3aeddcf.zip
devel/bazel5: fix build on 14.0-RELEASE
This suppresses warnings about __builtin_offsetof which cause failures due to the use of -Werror in some parts of the bazel build. Approved by: dch Differential Revision: https://reviews.freebsd.org/D42729
-rw-r--r--devel/bazel5/Makefile1
-rw-r--r--devel/bazel5/files/extra-patch-upb_bazel_build__defs.bzl12
2 files changed, 10 insertions, 3 deletions
diff --git a/devel/bazel5/Makefile b/devel/bazel5/Makefile
index cb8d133944b4..0d76ec1ef052 100644
--- a/devel/bazel5/Makefile
+++ b/devel/bazel5/Makefile
@@ -16,7 +16,6 @@ NOT_FOR_ARCHS= i386
BROKEN_armv6= fails to package: cp: bazel: No such file or directory
BROKEN_armv7= fails to package: cp: bazel: No such file or directory
BROKEN_FreeBSD_12_powerpc64= fails to compile: Action failed to execute: java.io.IOException: Cannot run program /usr/bin/clang
-BROKEN_FreeBSD_14= __builtin_offsetof is a Clang extension
BUILD_DEPENDS= bash:shells/bash \
zip:archivers/zip
diff --git a/devel/bazel5/files/extra-patch-upb_bazel_build__defs.bzl b/devel/bazel5/files/extra-patch-upb_bazel_build__defs.bzl
index 2bcce02b3eae..f31babd394f2 100644
--- a/devel/bazel5/files/extra-patch-upb_bazel_build__defs.bzl
+++ b/devel/bazel5/files/extra-patch-upb_bazel_build__defs.bzl
@@ -1,5 +1,5 @@
---- bazel/build_defs.bzl.orig 2022-01-20 13:04:32.306692000 +0100
-+++ bazel/build_defs.bzl 2022-01-20 13:05:02.002057000 +0100
+--- bazel/build_defs.bzl.orig 2023-08-27 11:49:04.950868000 +0100
++++ bazel/build_defs.bzl 2023-08-27 11:51:17.441304000 +0100
@@ -35,6 +35,7 @@
# "-Wshorten-64-to-32", # not in GCC (and my Kokoro images doesn't have Clang)
"-Werror",
@@ -8,3 +8,11 @@
# copybara:strip_end
],
})
+@@ -49,6 +50,7 @@
+ "-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