Skip to content

Commit a3cdc6d

Browse files
authored
Merge pull request #30037 from travisdowns/td-fix-uring-build
bazel: fix liburing configure probe failures on Fedora
2 parents b75774d + 093e6dd commit a3cdc6d

1 file changed

Lines changed: 19 additions & 7 deletions

File tree

bazel/thirdparty/liburing.patch

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
--- a/BUILD.bazel 2026-03-24 11:46:07.317446858 -0300
2-
+++ b/BUILD.bazel 2026-03-25 10:48:54.430923058 -0300
3-
@@ -20,20 +20,29 @@
1+
--- a/BUILD.bazel 2026-04-01 10:22:09.813888242 -0300
2+
+++ b/BUILD.bazel 2026-04-01 11:13:26.423352671 -0300
3+
@@ -20,20 +20,33 @@
44
"src/include/liburing/io_uring_version.h",
55
],
66
cmd = """
77
- export CC=$(CC) CXX=$(CC)++
88
+ export CC=$(CC) CXX=$(CC)++ CFLAGS="$(CC_FLAGS)"
9-
9+
+ # CORE-15978 Skip linking: probes only need compilation,
10+
+ # and because there is no LD_FLAGS equivalent of CC_FLAGS
11+
+ # exposed by bazel, system ld gets used, which can't
12+
+ # resolve sysroot linker scripts in the sandbox.
13+
+ export LDFLAGS="-c"
14+
1015
- # switch to the package dir to execute "configure" right there
1116
- pushd $$(dirname $(location configure))
1217
- mkdir -p src/include/liburing
@@ -22,19 +27,26 @@
2227
+ ln -sf $$pkg_dir/liburing.spec liburing.spec
2328
+ mkdir -p src/include/liburing
2429
+ $$pkg_dir/configure --use-libc
25-
30+
2631
# collect the outputs
2732
for out in $(OUTS); do
2833
- cp $$(realpath --relative-to=$(BINDIR) $$out) $$out
2934
+ cp $${out#$(RULEDIR)/} $$out
3035
done
3136
""",
3237
- toolchains = ["@bazel_tools//tools/cpp:current_cc_toolchain"],
33-
+ local = True,
3438
+ toolchains = [
3539
+ "@bazel_tools//tools/cpp:current_cc_toolchain",
3640
+ "@bazel_tools//tools/cpp:cc_flags",
3741
+ ],
3842
tools = ["configure"],
3943
)
40-
44+
45+
@@ -76,6 +89,7 @@
46+
"-Wall",
47+
"-Wextra",
48+
"-fno-stack-protector",
49+
+ "-Wno-unused-parameter",
50+
"-include config-host.h",
51+
],
52+
includes = ["src/include"],

0 commit comments

Comments
 (0)