From 1d6286b6d57bcb3d8f09075fb0b9363a87fb8512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Harboe?= Date: Fri, 2 Oct 2026 09:08:11 +0200 Subject: [PATCH] patches: remove the icu and bison patches nothing applies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They patched the icu and bison bazel modules for ORFS's own bazel build. ORFS no longer builds with bazel, and nothing in the tree reads patches/icu or patches/bison. Signed-off-by: Øyvind Harboe --- ...ib-wrapper-headers-use-I-not-isystem.patch | 61 ------------------- ...ck-bazel-runfiles-before-dereference.patch | 24 -------- 2 files changed, 85 deletions(-) delete mode 100644 patches/bison/0001-gnulib-wrapper-headers-use-I-not-isystem.patch delete mode 100644 patches/icu/0001-putil-null-check-bazel-runfiles-before-dereference.patch diff --git a/patches/bison/0001-gnulib-wrapper-headers-use-I-not-isystem.patch b/patches/bison/0001-gnulib-wrapper-headers-use-I-not-isystem.patch deleted file mode 100644 index feb3911152..0000000000 --- a/patches/bison/0001-gnulib-wrapper-headers-use-I-not-isystem.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Oyvind Harboe -Date: Mon, 6 Jul 2026 00:00:00 +0000 -Subject: [PATCH] BUILD: let gnulib wrapper headers shadow libc via -I - -Gnulib generates wrapper headers (lib/stdio.h, lib/fcntl.h, ...) that -must be found before the libc ones; they forward with #include_next and -add gnulib decorations (_GL_ATTRIBUTE_DEALLOC etc.) that lib/*-safer.h -and src/*.c rely on. The overlay's 'includes = ["lib"]' emits -isystem, -which loses to toolchains that inject libc headers as earlier -isystem -entries (e.g. the zero-sysroot hermetic-llvm BCR toolchain), and a dir -listed as both -I and -isystem is kept as -isystem, so the -I must -replace it, not merely accompany it. - -Plain -I outranks every -isystem, restoring autotools' AM_CPPFLAGS = --I./lib ordering. $(BINDIR) covers the generated wrappers, the source -path the checked-in ones. - -Same class of fix as sed@4.9.bcr.5 (BCR #7915) and gawk@5.3.2.bcr.7 -(BCR #7989); to be proposed upstream as bison@3.8.2.bcr.8. ---- -diff --git a/BUILD.bazel b/BUILD.bazel ---- a/BUILD.bazel -+++ b/BUILD.bazel -@@ -711,7 +711,19 @@ - tags = ["manual"], - ) - --BISON_COPTS = select({ -+# Gnulib's wrapper headers (generated lib/stdio.h, lib/fcntl.h, ... plus -+# the checked-in lib/*-safer.h helpers) must shadow the libc headers: they -+# forward via #include_next and add gnulib decorations -+# (_GL_ATTRIBUTE_DEALLOC etc.) that lib/ and src/ sources rely on. -+# `includes = ["lib"]` emits -isystem, which loses against toolchains that -+# inject libc headers as earlier -isystem entries (e.g. the zero-sysroot -+# hermetic-llvm BCR toolchain). Plain -I outranks every -isystem (and a dir -+# listed as both -I and -isystem stays -isystem, so the -isystem form must -+# go entirely). This restores autotools' AM_CPPFLAGS = -I./lib ordering. -+BISON_COPTS = [ -+ "-Iexternal/" + repo_name() + "/lib", -+ "-I$(BINDIR)/external/" + repo_name() + "/lib", -+] + select({ - "@rules_cc//cc/compiler:clang": [ - "-w", - "-std=c11", -@@ -813,7 +825,6 @@ - "src/scan-skel.c", - ":configmake_h_src", - ], -- includes = ["lib"], - textual_hdrs = [ - "lib/timevar.def", - "lib/printf-frexp.c", -@@ -997,6 +1008,7 @@ - "lib/main.c", - "lib/yyerror.c", - ], -+ copts = BISON_COPTS, - implementation_deps = [":headers"], - local_defines = LOCAL_DEFINES, - ) diff --git a/patches/icu/0001-putil-null-check-bazel-runfiles-before-dereference.patch b/patches/icu/0001-putil-null-check-bazel-runfiles-before-dereference.patch deleted file mode 100644 index f7253499df..0000000000 --- a/patches/icu/0001-putil-null-check-bazel-runfiles-before-dereference.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/icu4c/source/common/putil.cpp -+++ b/icu4c/source/common/putil.cpp -@@ -1494,9 +1494,19 @@ - #endif - - #if defined(BAZEL_CURRENT_REPOSITORY) && defined(ICU_DATA_DIR_BAZEL) -+ // Runfiles::Create() returns nullptr when no runfiles tree is reachable, -+ // which is the case for a binary copied out of bazel-bin by an install -+ // step (its .runfiles directory is gone and $RUNFILES_DIR/ -+ // $RUNFILES_MANIFEST_FILE are unset). The unconditional dereference below -+ // then segfaults the first time any locale-aware compare (QCollator, -+ // std::locale, ...) reaches this function. Fall through to the "" -+ // default instead. - std::unique_ptr runfiles(Runfiles::Create("", BAZEL_CURRENT_REPOSITORY)); -- std::string dat_path = runfiles->Rlocation(ICU_DATA_DIR_BAZEL); -- path = dat_path.c_str(); -+ std::string dat_path = runfiles ? runfiles->Rlocation(ICU_DATA_DIR_BAZEL) -+ : std::string(); -+ if (!dat_path.empty()) { -+ path = dat_path.c_str(); -+ } - #endif - - if(path==nullptr) {