Commit Graph

5181 Commits

Author SHA1 Message Date
Faidon Liambotis
335200bf69 Add support for loading wasi-libc from /usr
The WebAssembly target seems to have been designed to be always passed a
--sysroot, likely because of being tested to work only with the
WASI-SDK. This results into passing bare, non-existing paths in include
paths, such as:
   -internal-isystem /include/wasm32-wasi -internal-isystem /include
(and similar for /lib/).

In Debian, the wasi-libc package ships its files in
/usr/include/wasm32-wasi, /usr/lib/wasm32-wasi etc.

Add support in the target for including paths from /usr as well. To
avoid changing the code in more intrusive ways (to do e.g. what the
Linux target does) add a bit of an indirection where the "sysroot"
defaults to "/usr" instead of the empty string. This should probably be
adjusted a bit if it were to be upstreamed.

Closes: #1020746
2022-10-07 15:48:50 +03:00
Faidon Liambotis
a94a2fe7c3 Default to compiler-rt for WebAssembly (wasm32/64)
Our packaging overrides the upstream choice for rtlib to default always
to libgcc. Unfortunately, libgcc is not available for WebAssembly
(wasm32/wasm64 targets). This makes every build to -target
wasm32-unknown-wasi fail, unless one passes --rtlib=compiler-rt.

Patch the upstream source to default, and only accept, compiler-rt for
the WebAssembly target to make everything work out of the box. This
mirrors similar code that the upstream Darwin and Fuchsia targets have.

GCC seems fairly far from supporting WebAssembly. If/when that day
comes, this patch can be dropped.
2022-10-07 15:45:21 +03:00
Faidon Liambotis
bcf5c6f89b Build compiler-rt for wasm32 and wasm64
Current shortcomings/future work:

 * Unfortunately this currently takes the form of a separate, standalone
   build (with the just-built stage2 toolchain), which makes this a
   little more convoluted. The upstream compiler-rt build system does
   not have a way (that I could find) to manually add additional targets
   to the build.

 * GNU strip (binutils) does not understand the WebAssembly binary, so
   dh_strip fails. llvm-strip does, but a) does not understand all the
   arguments that dh_strip passes (e.g. -N), b) fails with "invalid
   relocation offset" on --strip-debug (but works with --strip-all).

   This currently passes -X to dh_strip to exclude them from being
   stripped entirely. Invoking llvm-strip manually with --strip-all can
   be considered in the future.

* The wasm32/wasm64 binaries are, by design, architecture-independent.
  With this commit, they are being built in every architecture, and
  shipped in the libclang-common-X.Y-dev package, which is arch: any,
  but ships both architecture-dependent (native/host compiler-rt) and
  architecture-independent files (include headers etc.).

  In a future iteration, the wasm32/wasm64 compiler-rt library could be
  factored out to a separate (arch: all) package. This is left
  outstanding because it should probably happen alongside a different
  split for libclang-common-X.Y-dev that will include splitting the
  native libclang-rt as well.

Closes: #1010932
2022-10-07 15:42:47 +03:00
Faidon Liambotis
6d85b82fd9 Fix NJOBS when DEB_BUILD_OPTIONS is not present
NJOBS is supposed to have the -j argument (as in the DEB_BUILD_OPTIONS
case)
2022-10-07 15:30:35 +03:00
Sylvestre Ledru
46d44aa1c8 disable bolt on arm64 2022-10-07 11:35:32 +02:00
Sylvestre Ledru
5bfe8cc3c2 fix bolt 2022-10-05 22:52:56 +02:00
Sylvestre Ledru
83fab60250 hardcode ninja as we support only one 2022-10-05 22:52:55 +02:00
Sylvestre Ledru
6e2ba0bc7d respect nocheck for real 2022-10-05 22:52:55 +02:00
Sylvestre Ledru
1bdf2c87b5 New upstream release 2022-10-05 22:52:55 +02:00
Sylvestre Ledru
2c13bd0050 disable bolt (to avoid new) for now 2022-10-05 22:52:55 +02:00
Sylvestre Ledru
16e0582032 fix typo 2022-10-05 15:48:57 +02:00
Sylvestre Ledru
b0120e6c32 Upload to unstable now that we have removed 12 from the archive 2022-10-04 09:27:37 +02:00
Sylvestre Ledru
40422bb78e add bolt support 2022-10-04 09:24:13 +02:00
Sylvestre Ledru
d2c9c9a4e8 fix the version 2022-10-04 09:24:13 +02:00
Sylvestre Ledru
e5e029eb86 fix the check 2022-09-23 16:19:08 +02:00
Sylvestre Ledru
83e104384a Unbreak the clang symlink. See https://github.com/llvm/llvm-project/issues/57857 2022-09-21 00:21:34 +02:00
Sylvestre Ledru
b4059015fe add a check to see if the symlink is broken or not 2022-09-21 00:20:14 +02:00
Sylvestre Ledru
73f488dc74 bring back the symlink 2022-09-21 00:20:14 +02:00
Sylvestre Ledru
c1c1615446 New upstream release 2022-09-21 00:19:57 +02:00
Sylvestre Ledru
6bc21995c4 rebase of the patch 2022-09-20 09:10:40 +02:00
Sylvestre Ledru
5c4defdee1 add the close bug 2022-09-12 18:07:31 +02:00
Sylvestre Ledru
94ae211d9e release 2022-09-12 18:03:16 +02:00
Gianfranco Costamagna
afe1e23e09 Upload to experimental 2022-09-12 17:58:28 +02:00
Gianfranco Costamagna
791bbcc5f1 Fix build on ppc64 and riscv64 2022-09-12 17:57:07 +02:00
Sylvestre Ledru
d560e3a069 New stable release 2022-09-06 09:15:10 +02:00
Sylvestre Ledru
bbdeb8c37a syscall-mips64el-def.diff: fix the call to undeclared function 'syscall'; on mips 2022-09-02 11:49:12 +02:00
Sylvestre Ledru
9ccfbc2edd prepare upload 2022-08-31 17:11:09 +02:00
Sylvestre Ledru
6cddfd8a51 improve libclc 2022-08-31 13:58:53 +02:00
Sylvestre Ledru
53465968c5 add a check for llvm spir 2022-08-31 12:18:49 +02:00
Sylvestre Ledru
b766a30adb fix the libclc check 2022-08-31 10:49:04 +02:00
Sylvestre Ledru
b4bfc17608 Fix a typo to silent lintian (Closes: #1018770) 2022-08-30 16:11:30 +02:00
Sylvestre Ledru
25af6d2de8 Fix a typo to silent lintian (Closes: #1018770) 2022-08-30 16:10:59 +02:00
Sylvestre Ledru
6d4ee32c1c Revert "Remove -DBUILTINS_CMAKE_ARGS & -DRUNTIMES_CMAKE_ARGS from the cmake call. It is done by -DBOOTSTRAP_RUNTIMES_CMAKE_ARGS & -DBOOTSTRAP_BUILTINS_CMAKE_ARGS instead"
This reverts commit 607fbd2e61.
2022-08-27 22:02:22 +02:00
Sylvestre Ledru
44b0b60733 Trim trailing whitespace.
Changes-By: lintian-brush
Fixes: lintian: trailing-whitespace
See-also: https://lintian.debian.org/tags/trailing-whitespace.html
2022-08-27 22:02:21 +02:00
Sylvestre Ledru
cf41aafc55 Update of the build dep from llvm-spirv => llvm-spirv-14 as it is now versionned. It should build libclc 2022-08-26 11:03:46 +02:00
Sylvestre Ledru
da3a22030a Prepare new upload 2022-08-25 13:32:35 +02:00
Sylvestre Ledru
607fbd2e61 Remove -DBUILTINS_CMAKE_ARGS & -DRUNTIMES_CMAKE_ARGS from the cmake call. It is done by -DBOOTSTRAP_RUNTIMES_CMAKE_ARGS & -DBOOTSTRAP_BUILTINS_CMAKE_ARGS instead 2022-08-23 11:58:47 +02:00
Sylvestre Ledru
d6c406bdc9 rename the variable for something more explicit 2022-08-20 13:42:22 +02:00
Sylvestre Ledru
9bdde72430 For Debian Stretch for apt.llvm.org, use clang-14 to build itself as gcc 7 isn't available 2022-08-20 13:22:27 +02:00
Sylvestre Ledru
c5ec8f3c73 * Second testing release of 15 2022-08-10 01:03:16 +02:00
Sylvestre Ledru
9b94273214 also remove the ref to the file 2022-08-01 22:58:23 +02:00
Sylvestre Ledru
c508c904c3 Remove 'debian/patches/revert-openmp-path.diff' applied upstream 2022-08-01 09:44:28 +02:00
Sylvestre Ledru
0a879a4665 First testing release of 15 2022-08-01 09:31:23 +02:00
Sylvestre Ledru
8f5835a38d revert https://reviews.llvm.org/D130545 2022-07-28 09:36:01 +02:00
Sylvestre Ledru
753a5fe5e0 fix changelog 2022-07-27 09:29:21 +02:00
Sylvestre Ledru
0e0bef4402 fix some versions 2022-07-27 09:16:05 +02:00
Sylvestre Ledru
d2eca9bf30 main is now 16. Creating a branch for 15. 2022-07-27 08:56:24 +02:00
Sylvestre Ledru
b39bafded8 clang doesn't have a specific SONAME anymore. See https://reviews.llvm.org/D129160 for the rational 2022-07-26 13:00:35 +02:00
Sylvestre Ledru
5f79e3de90 rebase of the patches 2022-07-26 09:06:15 +02:00
Sylvestre Ledru
a9cce9cf00 prepare upload 2022-07-24 18:13:13 +02:00