summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Hsin-chen Chuang <chharry@google.com> 2024-11-13 17:29:39 +0800
committer Hsin-chen Chuang <chharry@google.com> 2024-11-14 21:37:54 +0800
commit6a70439d074c1514ec25ef5d9fa8d88ed3f0848b (patch)
tree1e6cceaf59bd455be14ccee9cca94903133a65f0
parente1acd8fbb8fb76907cb26130105e6942081e7946 (diff)
Uprev Floss linux build env to Debian 13 (trixie) for C++20 support
A patch for libchrome/BUILD.gn to remove `-Xclang-only=` is needed in the trixie (clang 16) environment because that's not supported in the public. In bookworm (clang 14) the flag only generates a warning rather than failing the build. Bug: 378773945 Tag: #floss Test: mmm packages/modules/Bluetooth Test: ./container-build-image.py && ./build-in-container.py with https://r.android.com/3345590 Flag: EXEMPT, Floss-only change Change-Id: Ie461dcde5a2b1efed245d0cce70bb6e6992b4e97
-rw-r--r--floss/build/Dockerfile13
-rw-r--r--system/build/dpkg/libchrome/debian/patches/0001-remove-xclang-only.patch15
-rw-r--r--system/build/dpkg/libchrome/debian/patches/series1
-rw-r--r--system/device/include/device_iot_config.h1
-rw-r--r--system/include/hardware/avrcp/avrcp_common.h1
5 files changed, 25 insertions, 6 deletions
diff --git a/floss/build/Dockerfile b/floss/build/Dockerfile
index dc46ea94a2..71d1f42462 100644
--- a/floss/build/Dockerfile
+++ b/floss/build/Dockerfile
@@ -5,8 +5,8 @@
# Inherit from a recent Debian version. The slim version is a smaller variant
# meant for containers.
-# This digest is taken from the tag debian:bookworm-slim (if you want to update)
-FROM debian@sha256:b66f66d473ef3128436ba2812198edcae86c268eb530dff44ff6ae26f9a2ee30
+# This digest is taken from the tag debian:trixie-slim (if you want to update)
+FROM debian@sha256:711e115ddeee4722199c82fb5aa189693f473a14999180ae6112ab2da5664ce5
# First install all required apt packages.
RUN apt-get update && \
@@ -37,20 +37,21 @@ RUN apt-get update && \
libgtest-dev \
libgmock-dev \
liblc3-dev \
- liblz4-tool \
- libncurses5 \
+ libncurses6 \
libnss3-dev \
libprotobuf-dev \
- libre2-9 \
+ libre2-11 \
libre2-dev \
libssl-dev \
libtinyxml2-dev \
libx11-dev \
libxml2-utils \
+ lz4 \
ninja-build \
openssl \
protobuf-compiler \
python3 \
+ python3-six \
unzip \
x11proto-core-dev \
xsltproc \
@@ -77,7 +78,7 @@ RUN cargo install --git https://android.googlesource.com/platform/build --rev 8f
# Rename llvm packages. By default, they are named 11vm-ar-13, etc. which won't
# work properly with the build.
ADD llvm-rename.sh /tmp
-RUN /tmp/llvm-rename.sh 14
+RUN /tmp/llvm-rename.sh 16
# At this point, the base container is ready. Now we need to build and install
# both libchrome and modp-b64. If you ran this via `docker-build-image.py`, this
diff --git a/system/build/dpkg/libchrome/debian/patches/0001-remove-xclang-only.patch b/system/build/dpkg/libchrome/debian/patches/0001-remove-xclang-only.patch
new file mode 100644
index 0000000000..27cd93d24e
--- /dev/null
+++ b/system/build/dpkg/libchrome/debian/patches/0001-remove-xclang-only.patch
@@ -0,0 +1,15 @@
+Remove `-Xclang-only=` as that's not supported in the Debian LLVM
+toolchain. Since clang is specified in the ../rules file, we don't need
+to worry about the compatibility with other compilers.
+
+--- a/libchrome/BUILD.gn
++++ b/libchrome/BUILD.gn
+@@ -82,7 +82,7 @@ config("libchrome_config") {
+ "-Wno-narrowing",
+ "-Wno-unreachable-code-return",
+ "-Wno-unused-local-typedefs",
+- "-Xclang-only=-Wno-char-subscripts",
++ "-Wno-char-subscripts",
+ ]
+
+ # Address sanitizer + coverage builds do not support -z,defs.
diff --git a/system/build/dpkg/libchrome/debian/patches/series b/system/build/dpkg/libchrome/debian/patches/series
index 87ac01c2f4..354387423b 100644
--- a/system/build/dpkg/libchrome/debian/patches/series
+++ b/system/build/dpkg/libchrome/debian/patches/series
@@ -2,3 +2,4 @@
0001-Add-missing-includes.patch
0001-rebase_path-for-write_args.patch
0001-Perfetto-instance-hack.patch
+0001-remove-xclang-only.patch
diff --git a/system/device/include/device_iot_config.h b/system/device/include/device_iot_config.h
index 28275d46b4..d98476b901 100644
--- a/system/device/include/device_iot_config.h
+++ b/system/device/include/device_iot_config.h
@@ -22,6 +22,7 @@
#include <stdbool.h>
#include <stddef.h>
+#include <cstdint>
#include <string>
#include "device_iot_conf_defs.h"
diff --git a/system/include/hardware/avrcp/avrcp_common.h b/system/include/hardware/avrcp/avrcp_common.h
index 9ce0fba50a..52ef874b8c 100644
--- a/system/include/hardware/avrcp/avrcp_common.h
+++ b/system/include/hardware/avrcp/avrcp_common.h
@@ -16,6 +16,7 @@
#pragma once
+#include <cstdint>
#include <set>
namespace bluetooth {