aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-04-04 14:36:43 -0400
committerTom Rini <trini@konsulko.com>2023-04-04 14:36:43 -0400
commit698c2bd364ce4122a0d0db82b5a8d842186b2fa4 (patch)
tree3e6bccfc2033f154209afc4b888897ffa301f7d2
parent0916377b837a7a964587564c4560e4534aec72cb (diff)
parentd7e0678c7627e68ea3810ddc6ac3df209670a6cf (diff)
downloadu-boot-698c2bd364ce4122a0d0db82b5a8d842186b2fa4.zip
u-boot-698c2bd364ce4122a0d0db82b5a8d842186b2fa4.tar.gz
u-boot-698c2bd364ce4122a0d0db82b5a8d842186b2fa4.tar.bz2
Merge branch '2023-04-04-update-to-clang-16'
- Update our CI to use clang-16 for tests. This also changes slightly how we do linker lists so that we don't rely on undefined behavior that lead to clang-15 and later failing to work (and in some cases seemingly, earlier versions of clang would sometimes fail).
-rw-r--r--.azure-pipelines.yml6
-rw-r--r--.gitlab-ci.yml4
-rw-r--r--configs/smartweb_defconfig1
-rw-r--r--include/linker_lists.h16
-rw-r--r--test/py/requirements.txt8
-rw-r--r--tools/docker/Dockerfile15
6 files changed, 35 insertions, 15 deletions
diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
index 64da11e..642a16f 100644
--- a/.azure-pipelines.yml
+++ b/.azure-pipelines.yml
@@ -2,7 +2,7 @@ variables:
windows_vm: windows-2019
ubuntu_vm: ubuntu-22.04
macos_vm: macOS-12
- ci_runner_image: trini/u-boot-gitlab-ci-runner:jammy-20230308-21Mar2023
+ ci_runner_image: trini/u-boot-gitlab-ci-runner:jammy-20230308-04Apr2023
# Add '-u 0' options for Azure pipelines, otherwise we get "permission
# denied" error when it tries to "useradd -m -u 1001 vsts_azpcontainer",
# since our $(ci_runner_image) user is not root.
@@ -254,7 +254,7 @@ stages:
TEST_PY_BD: "sandbox"
sandbox_clang:
TEST_PY_BD: "sandbox"
- OVERRIDE: "-O clang-14"
+ OVERRIDE: "-O clang-16"
sandbox_nolto:
TEST_PY_BD: "sandbox"
BUILD_ENV: "NO_LTO=1"
@@ -509,7 +509,7 @@ stages:
OVERRIDE: "-a ASAN"
sandbox_clang_asan:
BUILDMAN: "sandbox"
- OVERRIDE: "-O clang-14 -a ASAN"
+ OVERRIDE: "-O clang-16 -a ASAN"
samsung_socfpga:
BUILDMAN: "samsung socfpga"
sun4i:
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2a42374..7509a7a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -10,7 +10,7 @@ default:
# Grab our configured image. The source for this is found
# in the u-boot tree at tools/docker/Dockerfile
-image: ${MIRROR_DOCKER}/trini/u-boot-gitlab-ci-runner:jammy-20230308-21Mar2023
+image: ${MIRROR_DOCKER}/trini/u-boot-gitlab-ci-runner:jammy-20230308-04Apr2023
# We run some tests in different order, to catch some failures quicker.
stages:
@@ -277,7 +277,7 @@ sandbox test.py:
sandbox with clang test.py:
variables:
TEST_PY_BD: "sandbox"
- OVERRIDE: "-O clang-14"
+ OVERRIDE: "-O clang-16"
<<: *buildman_and_testpy_dfn
sandbox without LTO test.py:
diff --git a/configs/smartweb_defconfig b/configs/smartweb_defconfig
index 4cbdab0..836e0c0 100644
--- a/configs/smartweb_defconfig
+++ b/configs/smartweb_defconfig
@@ -24,6 +24,7 @@ CONFIG_SPL_SYS_MALLOC_F_LEN=0x400
CONFIG_SPL=y
CONFIG_ENV_OFFSET_REDUND=0x180000
CONFIG_SYS_LOAD_ADDR=0x22000000
+CONFIG_LTO=y
CONFIG_FIT=y
CONFIG_NAND_BOOT=y
CONFIG_BOOTDELAY=3
diff --git a/include/linker_lists.h b/include/linker_lists.h
index d3da9d4..f9a2ee0 100644
--- a/include/linker_lists.h
+++ b/include/linker_lists.h
@@ -127,7 +127,9 @@
static char start[0] __aligned(CONFIG_LINKER_LIST_ALIGN) \
__attribute__((unused)) \
__section("__u_boot_list_2_"#_list"_1"); \
- (_type *)&start; \
+ _type * tmp = (_type *)&start; \
+ asm("":"+r"(tmp)); \
+ tmp; \
})
/**
@@ -153,7 +155,9 @@
({ \
static char end[0] __aligned(4) __attribute__((unused)) \
__section("__u_boot_list_2_"#_list"_3"); \
- (_type *)&end; \
+ _type * tmp = (_type *)&end; \
+ asm("":"+r"(tmp)); \
+ tmp; \
})
/**
* ll_entry_count() - Return the number of elements in linker-generated array
@@ -247,7 +251,9 @@
({ \
static char start[0] __aligned(4) __attribute__((unused)) \
__section("__u_boot_list_1"); \
- (_type *)&start; \
+ _type * tmp = (_type *)&start; \
+ asm("":"+r"(tmp)); \
+ tmp; \
})
/**
@@ -270,7 +276,9 @@
({ \
static char end[0] __aligned(4) __attribute__((unused)) \
__section("__u_boot_list_3"); \
- (_type *)&end; \
+ _type * tmp = (_type *)&end; \
+ asm("":"+r"(tmp)); \
+ tmp; \
})
#endif /* __ASSEMBLY__ */
diff --git a/test/py/requirements.txt b/test/py/requirements.txt
index e241780..86d6266 100644
--- a/test/py/requirements.txt
+++ b/test/py/requirements.txt
@@ -8,21 +8,21 @@ fixtures==3.0.0
importlib-metadata==0.23
linecache2==1.0.0
more-itertools==7.2.0
-packaging==19.2
+packaging==21.3
pbr==5.4.3
pluggy==0.13.0
py==1.10.0
pycryptodomex==3.9.8
pyelftools==0.27
pygit2==1.9.2
-pyparsing==2.4.2
+pyparsing==3.0.7
pytest==6.2.5
pytest-xdist==2.5.0
python-mimeparse==1.6.0
python-subunit==1.3.0
-requests==2.25.1
+requests==2.27.1
setuptools==58.3.0
-six==1.12.0
+six==1.16.0
testtools==2.3.0
traceback2==1.4.0
unittest2==1.1.0
diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile
index bd02531..801bebf 100644
--- a/tools/docker/Dockerfile
+++ b/tools/docker/Dockerfile
@@ -12,7 +12,7 @@ ENV DEBIAN_FRONTEND=noninteractive
# Add LLVM repository
RUN apt-get update && apt-get install -y gnupg2 wget xz-utils && rm -rf /var/lib/apt/lists/*
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
-RUN echo deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-14 main | tee /etc/apt/sources.list.d/llvm.list
+RUN echo deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main | tee /etc/apt/sources.list.d/llvm.list
# Manually install the kernel.org "Crosstool" based toolchains for gcc-12.2.0
RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/12.2.0/x86_64-gcc-12.2.0-nolibc-aarch64-linux.tar.xz | tar -C /opt -xJ
@@ -39,7 +39,7 @@ RUN apt-get update && apt-get install -y \
binutils-dev \
bison \
build-essential \
- clang-14 \
+ clang-16 \
coreutils \
cpio \
cppcheck \
@@ -265,6 +265,17 @@ RUN echo uboot ALL=NOPASSWD: ALL > /etc/sudoers.d/uboot
RUN useradd -m -U uboot
USER uboot:uboot
+# Populate the cache for pip to use. Get these via wget as the
+# COPY / ADD directives don't work as we need them to.
+RUN wget -O /tmp/pytest-requirements.txt https://source.denx.de/u-boot/u-boot/-/raw/master/test/py/requirements.txt
+RUN wget -O /tmp/sphinx-requirements.txt https://source.denx.de/u-boot/u-boot/-/raw/master/doc/sphinx/requirements.txt
+RUN virtualenv -p /usr/bin/python3 /tmp/venv && \
+ . /tmp/venv/bin/activate && \
+ pip install -r /tmp/pytest-requirements.txt \
+ -r /tmp/sphinx-requirements.txt && \
+ deactivate && \
+ rm -rf /tmp/venv /tmp/pytest-requirements.txt /tmp/sphinx-requirements.txt
+
# Create the buildman config file
RUN /bin/echo -e "[toolchain]\nroot = /usr" > ~/.buildman
RUN /bin/echo -e "kernelorg = /opt/gcc-12.2.0-nolibc/*" >> ~/.buildman