Signed-off-by: Brian Cain <bcain@quicinc.com>
Signed-off-by: Brian Cain <bcain@quicinc.com>
Signed-off-by: Brian Cain <brian.cain@gmail.com>
This commit includes a patch to the QEMU test suite. The tcg/multiarch/linux/linux-test.c file fails to compile under -Wall with LLVM 15.0.3 This is likely due to [recent improvements][1] to the -Wno-unused-but-set-variable diagnostic to fix false negatives when post/pre increment/decrement operator are involved. The patch simply deletes the unused variable since the semantics of the test will remain the same. [1]: llvm/llvm-project#54595 (comment) Signed-off-by: Mukilan Thiyagarajan <quic_mthiyaga@quicinc.com>
Signed-off-by: Mukilan Thiyagarajan <quic_mthiyaga@quicinc.com>
Signed-off-by: Brian Cain <bcain@quicinc.com>
Signed-off-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>
Revert "Switch to -O2 for libc build"
Using -O2 caused some problems with the "signals" check-tcg test from qemu-hexagon. This reverts commit 3479956. Signed-off-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>
Signed-off-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>
Signed-off-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>
Use python3.8 with QEMU configure
QEMU no longer supports python3.6, giving the following error when we
run build-toolchain.sh:
ERROR: Cannot use '/usr/bin/python3.6', Python >= 3.7 is required.
Use --python=/path/to/python to specify a supported Python.
So let's update to python3.8.
Signed-off-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>Remove "unused variable" QEMU patch
Signed-off-by: Brian Cain <bcain@quicinc.com>
Change to use cmake cache files
cmake cache files are a popular idiom with cmake projects in general and llvm-project specifically. If we have luck using these in the toolchain_for_hexagon repo, perhaps we could contribute them to llvm-project to make it easier for others to reproduce this build and easier for other llvm developers to see how our toolchain is built. Signed-off-by: Brian Cain <bcain@quicinc.com>
Switch test-toolchain to using cmake cache
Signed-off-by: Brian Cain <bcain@quicinc.com>
Add the cross toolchain path to QEMU configure
This path is required to be able to build the test cases invoked by the 'check-tcg' target. Without this change, the 'check-tcg' target reports 'nothing to do'. Signed-off-by: Brian Cain <bcain@quicinc.com>
Signed-off-by: Brian Cain <bcain@quicinc.com>
Disable tests, docs, add explicit crt flags
Signed-off-by: Brian Cain <bcain@quicinc.com>
LLVM_CONFIG_PATH is deprecated, without this change we get the following:
CMake Warning at cmake/Modules/CompilerRTUtils.cmake:281 (message):
LLVM_CONFIG_PATH is deprecated, please use LLVM_CMAKE_DIR instead
Call Stack (most recent call first):
CMakeLists.txt:87 (load_llvm_config)
Signed-off-by: Brian Cain <bcain@quicinc.com>Switch python version check to 3.8
python3.6 is not the one used later in the script, it's 3.8. Signed-off-by: Brian Cain <bcain@quicinc.com>
Switch the builtins cmake invocation to use a cache file
Signed-off-by: Brian Cain <bcain@quicinc.com>
Signed-off-by: Brian Cain <bcain@quicinc.com>
Add cross builds to support more host OS/arches
Disabled for now: these seem to work when tested but don't when built within the `docker build`. Signed-off-by: Brian Cain <bcain@quicinc.com>
Add additional compiler-rt build options to disabled
When building builtins, at that early stage we don't want to attempt other items in compiler-rt. Explicitly opt-out of those builds for the builtins. Signed-off-by: Brian Cain <bcain@quicinc.com>
While building libclang_rt.ubsan_standalone-hexagon.so (and possibly others),
we see assertions like the one shown below:
ld.lld: .../llvm-project/lld/ELF/Symbols.h:336: void lld::elf::Symbol::allocateAux(): Assertion `auxIdx == 0' failed.
Signed-off-by: Brian Cain <bcain@quicinc.com>Signed-off-by: Brian Cain <bcain@quicinc.com>
Add python3.8-venv to build container
Add the python3.8-venv package to avoid the error message below:
It's normally part of the Python standard library, maybe your distribution packages it separately?
(Debian puts ensurepip in its python3-venv package.)
Either install ensurepip, or alleviate the need for it in the first place by installing pip and setuptools for '/usr/bin/python3.8'.
ERROR: python venv creation failed
Signed-off-by: Brian Cain <bcain@quicinc.com>8.1.0 includes c42e77a90d9244c8caf76fe0e54f84200430a4e1 which removed a fallback for MAP_FIXED_NOREPLACE, this causes the QEMU build to fail. We will need to explore updating to a newer glibc or some kind of workaround. This reverts commit 5a08e99. Signed-off-by: Brian Cain <bcain@quicinc.com>
Revert "Revert "Update QEMU to 8.1.0""
This reverts commit a395465. Signed-off-by: Brian Cain <bcain@quicinc.com>
We have been living on borrowed time -- QEMU has for some time required Ubuntu 20.04 to build and recently has made changes that prevent QEMU from building on the glibc from Ubuntu 18.04. The ubuntu-based toolchain built by this repo will depend on 20.04. Update to 20.04 and make corresponding changes to the docker config to support differences between 18.04 and 20.04. Signed-off-by: Brian Cain <bcain@quicinc.com>
Signed-off-by: Brian Cain <bcain@quicinc.com>
Create an example for usage in the README
Signed-off-by: Brian Cain <bcain@quicinc.com>
Limit the depth of the git log used for manifest
`git log` could end up generating an unnecessarily long manifest output. It was chosen to avoid some pitfalls with unnecessarily long `git show` output with the CPython repo. This seems like a reasonable solution. Signed-off-by: Brian Cain <bcain@quicinc.com>
Add symlinks for "hexagon-unknown-none-elf" target
Signed-off-by: Brian Cain <bcain@quicinc.com>
Remove redundant calls to wait
Suggested-by: Rob Landley <rob@landley.net> Signed-off-by: Brian Cain <bcain@quicinc.com>
Signed-off-by: Brian Cain <bcain@quicinc.com>
Switch QEMU to use quic/qemu and include sysemu
Signed-off-by: Brian Cain <bcain@quicinc.com>
Enable ccache for local/non-docker builds
Signed-off-by: Brian Cain <bcain@quicinc.com>
Signed-off-by: Brian Cain <bcain@quicinc.com>
Update to quic/qemu 2 December tag
Signed-off-by: Brian Cain <bcain@quicinc.com>
Signed-off-by: Brian Cain <bcain@quicinc.com>
Move cross-compiler variables to different cache file
The default sysroot and symlinks are appropriate for building cross compilers targeting hexagon but not native ones, so we can move just this part out to a separate cache file. Signed-off-by: Brian Cain <bcain@quicinc.com>
Update to quic/qemu 12 December tag
Signed-off-by: Brian Cain <bcain@quicinc.com>
Correct the kernel install location
The kernel install location used by 48f7bf6 was incorrect. Signed-off-by: Brian Cain <bcain@quicinc.com>
Re-disable canadian toolchain build
The build completes successfully, but running a simple test fails:
$ ./clang+llvm-12.Dec.2023-cross-hexagon-unknown-linux-musl/x86_64-linux-gnu/bin/qemu-hexagon -L ./clang+llvm-12.Dec.2023-cross-hexagon-unknown-linux-musl/x86_64-linux-gnu/target/hexagon-unknown-linux-musl/usr/ hexagon-unknown-linux-musl-rootfs/bin/clang++ -o try_native try.cpp
Assertion failed: PrettyStackTraceHead == this && "Pretty stack trace entry destruction is out of order" (/root/hexagon-toolchain/llvm-project/llvm/lib/Support/PrettyStackTrace.cpp: ~PrettyStackTraceEntry: 229)
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
Segmentation fault
Signed-off-by: Brian Cain <bcain@quicinc.com>Switch LLVM commit to Dec 12 trunk
Signed-off-by: Brian Cain <bcain@quicinc.com>