Skip to content

Commit

Permalink
build: Revert "Drop support for Ubuntu 18.04 Bionic"
Browse files Browse the repository at this point in the history
  • Loading branch information
klzgrad committed Aug 1, 2024
1 parent 6476db9 commit 76e7bbe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/build/linux/sysroot_scripts/reversion_glibc.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# This constant comes from the oldest glibc version in
# //chrome/installer/linux/debian/dist_package_versions.json and
# //chrome/installer/linux/rpm/dist_package_provides.json
MAX_ALLOWED_GLIBC_VERSION = [2, 28]
MAX_ALLOWED_GLIBC_VERSION = [2, 26]

VERSION_PATTERN = re.compile("GLIBC_([0-9\.]+)")
SECTION_PATTERN = re.compile(r"^ *\[ *[0-9]+\] +(\S+) +\S+ + ([0-9a-f]+) .*$")
Expand Down
12 changes: 10 additions & 2 deletions src/build/linux/sysroot_scripts/sysroot_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,17 @@ def hacks_and_patches(install_root: str, script_dir: str, arch: str) -> None:
os.remove(qtchooser_conf)

# __GLIBC_MINOR__ is used as a feature test macro. Replace it with the
# earliest supported version of glibc (2.28).
# earliest supported version of glibc (2.26).
features_h = os.path.join(install_root, "usr", "include", "features.h")
replace_in_file(features_h, r"(#define\s+__GLIBC_MINOR__)", r"\1 28 //")
replace_in_file(features_h, r"(#define\s+__GLIBC_MINOR__)", r"\1 26 //")

# fcntl64() was introduced in glibc 2.28. Make sure to use fcntl() instead.
fcntl_h = os.path.join(install_root, "usr", "include", "fcntl.h")
replace_in_file(
fcntl_h,
r"#ifndef __USE_FILE_OFFSET64(\nextern int fcntl)",
r"#if 1\1",
)

# Do not use pthread_cond_clockwait as it was introduced in glibc 2.30.
cppconfig_h = os.path.join(
Expand Down

0 comments on commit 76e7bbe

Please sign in to comment.