Commit Graph

5773 Commits

Author SHA1 Message Date
Gianfranco Costamagna
cc6c9b9776 Add two patches to unblock mesa build on arm* (Closes: #1022577) 2022-11-19 23:53:01 +01:00
Gianfranco Costamagna
8b4e09e299 Add spirv-14 to alternate dependencies for mips64el, to be reverted once a build of spirv-15 is available 2022-11-19 23:43:29 +01:00
Gianfranco Costamagna
09418e83d7 Update changelog 2022-11-19 23:25:23 +01:00
Gianfranco Costamagna
5a1ae8cca4 Add libomptarget to mips64el (Closes: #1023101) 2022-11-19 23:24:44 +01:00
Sylvestre Ledru
b938a0de44 Workaround some missing files on buster 2022-11-19 23:08:57 +01:00
Sylvestre Ledru
4134347b72 add the override 2022-11-19 19:06:05 +01:00
Sylvestre Ledru
2b5443eadb prepare upload 2022-11-19 10:23:25 +01:00
Sylvestre Ledru
92b5c74ce9 Merge branch '14-wasm-libcxx' into '14'
More WebAssembly (wasm32/wasm64) work, including libc++/libc++abi for wasm32-wasi

See merge request pkg-llvm-team/llvm-toolchain!103
2022-11-19 09:21:48 +00:00
Sylvestre Ledru
5a8e878733 Adjust some path since upstream changed the path from /usr/lib/llvm-16/lib/clang/16.0.0/ to /usr/lib/llvm-16/lib/clang/16/
See https://reviews.llvm.org/D125860
2022-11-19 10:17:35 +01:00
Faidon Liambotis
c0beef7a9c Add changelog entries for recent WebAssembly changes
* More WebAssembly (wasm32/wasm64) work:
  - Update patch wasm-sysroot-usr to stop including /usr/include when
    building for the non-OS (unknown) wasm targets, to avoid inadvertently
    including the host's (glibc) headers.
  - Re-enable builds on all architectures, previously disabled for
    arm64 armel mips64el mipsel ppc64el armhf in 1:14.0.6-4, due to an FTBFS
    related to the /usr/include issue above.
  - Update patch wasm-sysroot-usr to adjust system include paths for C++
    headers as well.
  - Build libc++ and libc++abi for wasm32-wasi, generating two new binary
    packages, and introducing a build dependency on wasi-libc.
  - Misc code organization fixes to debian/rules.
2022-11-18 11:43:50 +02:00
Faidon Liambotis
97d60707ed Build libc++/libc++abi for wasm32-wasi
Do a standalone build of libcxx/libcxxabi, for wasm32-wasi. libcxx
requires a libc, and thus this requires a new build dependency on
wasi-libc. wasi-libc is not currently available for wasm64, so limit the
build to wasm32.

This introduces two new binary packages:
  - libc++-${LLVM_VERSION}-dev-wasm32
  - libc++abi-${LLVM_VERSION}-dev-wasm32
There isn't currently a naming convention in Debian for WebAssembly. Use
a "-dev-wasm32" suffix, which makes it consistent with packages such as
"libc6-dev-i386" and "libstd-rust-dev-wasm32".

Given these builds are specific to WASI, it can be argued that the names
should be something like "-dev-wasm32-wasi", or simplified to
"-dev-wasi" (not very future proof) or "-dev-wasi32" (not something
upstream uses). Something to think through later on.

WebAssembly only supports shared linking, hence why we -dev packages are
provided, shipping development headers and static archives.
2022-11-18 11:43:50 +02:00
Sylvestre Ledru
225b522d55 rebase of the patches 2022-11-17 21:09:47 +01:00
Faidon Liambotis
9459395c21 d/rules: Makeify compiler-rt wasm target
Iterate on wasm32/wasm64 using make targets rather than shell, and place
build artifacts under a common "build-wasm" directory.
2022-11-17 21:05:07 +02:00
Faidon Liambotis
bbfc6cca07 d/rules: split override_dh_auto_build into multiple lines 2022-11-17 21:05:07 +02:00
Faidon Liambotis
6923a432bf d/rules: remove targets from .PHONY
We actually touch $@ at the end of these targets, so they are not phony.
2022-11-17 21:05:07 +02:00
Faidon Liambotis
ecbebd0a8f Patch the WebAssembly include paths for C++ as well
In wasm-sysroot-usr.diff we have changes to support compilation without
a sysroot and with system paths. These so far have applied to the C
include paths (among other things), i.e. /usr/include/<triple>. This was
mainly because that's what I had at hand to test and wanted to keep
things limited as a first iteration.

Now that we're iterated on it and cleared out some issues, make the
exact same changes for the C++ include paths as well, i.e.
/usr/include/<triple>/c++/v1. Nothing installs anything on those paths
there yet, so this is mostly preparatory for subsequent changes.
2022-11-17 21:04:52 +02:00
Faidon Liambotis
b91115bd58 Fix wasm include paths, unbreaking compiler-rt builds on !x86
compiler-rt WebAssembly builds were failing, and as a workaround commit
ca9dbba introduced COMPILER_RT_WASM_ENABLE, disabling its compilation on
several architectures (arm64 armel mips64el mipsel ppc64el armhf).

This was ultimately caused by the WebAssembly driver including paths in
bare /usr/include, when compiling for wasnNN-unknown-unknown targets.
This in turn resulted in this chain of include paths when building
compiler-rt, as one example out of many:
  1. compiler-rt/lib/builtins/divtf3.c:15                  #include "fp_lib.h"
  2. compiler-rt/lib/builtins/fp_lib.h:23                  #include "int_lib.h"
  3. compiler-rt/lib/builtins/int_lib.h:93                 #include <limits.h>
  4. /usr/lib/llvm-14/lib/clang/14.0.6/include/limits.h:20 #if __has_include_next(<limits.h>) #include_next <limits.h>
  5. /usr/include/limits.h:26                              #include <bits/libc-header-start.h>
  6. fatal error: 'bits/libc-header-start.h' file not found

/usr/include/stdint.h is the host's glibc header, and
bits/libc-header-start.h doesn't exist for the wasm targets. This is the
case with or without wasi-libc, as wasi-libc is musl-based and doesn't
have these paths at all.

The only reason builds worked on amd64 is accident:lly the B-D chain
brings in libc6-dev-i386 (through g++-multilib), which creates this
symlink:
  /usr/include/bits -> x86_64-linux-gnu/bits
This effectively meant that on amd64 builds, compiler-rt for wasm
targets was compiled with glibc x86_64 headers.

Ultimately this was rooted on the sysroot-based assumptions that the
upstream driver makes and that we are patching (evidently incompletely)
with our wasm-sysroot-usr.diff patch.

Update our patch to explicitly NOT include the bare /usr/include path on
non-OS targets (wasm32-unknown-unknown etc.), while keeping existing
behavior for backwards compatibility when --sysroot is passed.

Given this should (fingers crossed) address this invariance between
amd64 and other architectures, and unbreak those builds, revert commit
ca9dbba and the COMPILER_RT_WASM_ENABLE flag.
2022-11-17 21:00:23 +02:00
Sylvestre Ledru
b813bd5130 * New upstream release
* Remove the swig patches (applied upstream)
* Disable the MLIR testsuite run because of a freeze
  (Closes: #1024154)
  See https://github.com/llvm/llvm-project/issues/58357
* Adjust to protobuf 3.21 (Closes: #1023533)
2022-11-16 22:39:26 +01:00
Sylvestre Ledru
4692b2aa3d Merge remote-tracking branch 'origin/14' into 15 2022-11-16 22:38:42 +01:00
Sylvestre Ledru
bde3d49c95 store the sccache results in /tmp/buildd/source/sccache-stats.json 2022-11-16 20:51:28 +01:00
Sylvestre Ledru
77a5b1824f Remove the swig patches (applied upstream) 2022-11-16 17:51:53 +01:00
Sylvestre Ledru
3fa813e92c fix the path 2022-11-16 17:35:19 +01:00
Sylvestre Ledru
386696d0a0 New upstream release 2022-11-16 09:11:25 +01:00
Sylvestre Ledru
8ee2b70653 Merge remote-tracking branch 'origin/14' into 15 2022-11-16 09:08:58 +01:00
Sylvestre Ledru
eb4bb9e7a4 remove artifact 2022-11-15 18:25:04 +01:00
Sylvestre Ledru
e9f28b298e Disable the MLIR testsuite run because of a freeze (Closes: #1024154) See https://github.com/llvm/llvm-project/issues/58357 2022-11-15 18:24:02 +01:00
Sylvestre Ledru
6806d9a982 rebase of the patches 2022-11-15 10:47:16 +01:00
Sylvestre Ledru
19f47cc924 Adjust to protobuf 3.21 (Closes: #1023533) 2022-11-14 11:16:01 +01:00
Sylvestre Ledru
5e129ea18e pass sccache arg everywhere 2022-11-14 11:16:01 +01:00
Sylvestre Ledru
ada0fc6bb3 sccache: generate stats and publish them 2022-11-12 23:53:09 +01:00
Sylvestre Ledru
fd2dd270a3 remove disable-openmpd.diff - disable upstream 2022-11-12 08:58:27 +01:00
Sylvestre Ledru
1d4ed6ed4d Merge remote-tracking branch 'origin/15' into snapshot 2022-11-11 23:30:35 +01:00
Sylvestre Ledru
69277d9671 Merge remote-tracking branch 'origin/14' into 15 2022-11-11 23:30:14 +01:00
Sylvestre Ledru
2757a45bf7 bring back the packages 2022-11-11 23:29:02 +01:00
Sylvestre Ledru
2abbbcccdd disable the llvm spir 2022-11-11 23:28:18 +01:00
Sylvestre Ledru
5f299ff3c1 disable libclc 2022-11-11 19:34:12 +01:00
Sylvestre Ledru
325336b38f * New snapshot release
* mlir: Disable test on i386 because of
  See https://github.com/llvm/llvm-project/issues/58219
* disable-openmpd.diff: Disable the test of openmpd
  because of https://github.com/llvm/llvm-project/issues/58941
2022-11-11 17:46:24 +01:00
Sylvestre Ledru
160ea57318 Enable LLVM_USE_RELATIVE_PATHS_IN_DEBUG_INFO to help with caching 2022-11-11 16:26:28 +01:00
Sylvestre Ledru
92684f54f5 Merge remote-tracking branch 'origin/15' into snapshot 2022-11-11 15:00:11 +01:00
Sylvestre Ledru
98697f3cf1 remove the sccache log dump 2022-11-11 08:45:08 +01:00
Sylvestre Ledru
aa0b5d6492 fix path with 16 instead of 16.0.0 as version 2022-11-11 01:06:31 +01:00
Sylvestre Ledru
0125c0be4d Merge remote-tracking branch 'origin/14' into 15 2022-11-10 23:12:57 +01:00
Sylvestre Ledru
9db77ce328 do not dump the content of sccache.log. we are good 2022-11-10 23:05:02 +01:00
Sylvestre Ledru
e9022e33bc remove old an old and useless patch 2022-11-10 16:17:50 +01:00
Sylvestre Ledru
9ea3878d01 use the upstream option to set the option 2022-11-10 15:21:22 +01:00
Sylvestre Ledru
3270880abd We want to set the clang extra version ONLY in stage 2
because we want the clang stage 1 to be as reproducible as possible
when building with sccache (because this tool do a hash using the
compiler binary and other things)
2022-11-10 15:19:49 +01:00
Sylvestre Ledru
63341e11a5 remove an old gcc 4.9 workaround 2022-11-10 13:54:02 +01:00
Sylvestre Ledru
ef8fc80088 remove non applied patch 2022-11-10 13:54:02 +01:00
Sylvestre Ledru
622dbcbd40 rebase of the patches 2022-11-09 14:28:45 +01:00
Sylvestre Ledru
1e3332f2bf fix version 2022-11-04 19:44:02 +01:00