Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

llvm9 #14656

Merged
merged 22 commits into from
Sep 26, 2019
Merged

llvm9 #14656

merged 22 commits into from
Sep 26, 2019

Conversation

q66
Copy link
Contributor

@q66 q66 commented Sep 22, 2019

This adds llvm9, strips down llvm8 to a minimum (and updates it to 8.0.1), and bumps a bunch of other packages that should be bumped.

Platform testing:

  • x86_64 [need help]
  • x86_64-musl [need help]
  • i686 [need help]
  • ppc64le
  • ppc64le-musl
  • ppc64
  • ppc64-musl
  • ppc
  • ppc-musl
  • aarch64
  • aarch64-musl
  • armv7l [need help]
  • armv6l [need help]
  • armv7l-musl [need help]

To bump + test:

  • llvm
  • libcxxabi
  • libcxx
  • llvm-libunwind
  • libGL
  • beignet [need help, x86 only]
  • libclc-git
  • juCi++
  • kdevelop
  • rtags
  • bcc
  • ccls
  • clazy
  • include-what-you-use
  • shiboken2
  • codelite
  • gnome-builder
  • bpftrace
  • qtcreator
  • qt5 [to be bumped by 5.13.1 update]

rebuild but not bump (no target llvm/clang dependency):

  • ardour
  • afl [need help, x86 only]
  • blender
  • firefox
  • firefox-esr
  • icecat
  • thunderbird
  • chromium [need help, won't build here]
  • godot
  • ispc [need help, x86 only]
  • yosys
  • rdedup
  • pijul

Rust will need to be bumped but we'll do that as a part of the upcoming Rust update to avoid building twice.

@q66
Copy link
Contributor Author

q66 commented Sep 22, 2019

This will need a few more iterations before it at least builds properly on my machine, so wait with testing until I've done so...

@q66
Copy link
Contributor Author

q66 commented Sep 22, 2019

Also switching llvm to py3 while at it.

@q66
Copy link
Contributor Author

q66 commented Sep 23, 2019

py3 transition done, llvm is now buildable... i think testing can begin

@q66 q66 force-pushed the llvm9 branch 3 times, most recently from 220eba5 to cbf774d Compare September 23, 2019 15:54
@q66
Copy link
Contributor Author

q66 commented Sep 23, 2019

Added patches fixing llvm-libunwind on 32-bit ppc and a subtle libcxx fix on ppc* in general, added a gcc9 miscompilation backport patch for clang

@q66 q66 force-pushed the llvm9 branch 4 times, most recently from 661fb49 to f205c64 Compare September 24, 2019 01:14
@leahneukirchen
Copy link
Member

Tested llvm* build on x86_64, works!

beignet: /usr/bin/ld: CMakeFiles/gbeinterp.dir/gbe_bin_interpreter.cpp.o:(.data.rel+0x0):
undefined reference to `llvm::DisableABIBreakingChecks'

@leahneukirchen
Copy link
Member

leahneukirchen commented Sep 24, 2019

afl: clang-9: error: unknown argument: '-fstack-clash-protection'

Patching that out:

echo 0 | ../afl-showmap -m none -q -o .test-instr0 ./test-instr
echo 1 | ../afl-showmap -m none -q -o .test-instr1 ./test-instr

Oops, the instrumentation does not seem to be behaving correctly!

Please ping <lcamtuf@google.com> to troubleshoot the issue.

@leahneukirchen
Copy link
Member

ispc works.

@q66
Copy link
Contributor Author

q66 commented Sep 24, 2019

I suspect afl has been broken all along then since -fstack-clash-protection is not a thing in clang8 either, AFAIK it's a hardening flag we add ourselves. Beignet will probably need patching.

@leahneukirchen
Copy link
Member

AFL bump and fix: https://0x0.st/ztdv.diff

@leahneukirchen
Copy link
Member

Arch uses a Git snapshot for beignet and a llvm8 patch.

@q66
Copy link
Contributor Author

q66 commented Sep 24, 2019

Added afl update into the batch...

@q66
Copy link
Contributor Author

q66 commented Sep 24, 2019

Looks like the Arch llvm8 patch should be the one for beignet; can you try dropping it into the tree and building with it?

@leahneukirchen
Copy link
Member

Yes, but it doesnt work on 1.3.2 release I think.

@q66
Copy link
Contributor Author

q66 commented Sep 24, 2019

It should, I looked at their git and it seems there was only a handful of commits since then.

@leahneukirchen
Copy link
Member

/builddir/Beignet-1.3.2-Source/backend/src/llvm/llvm_sampler_fix.cpp: In member 
function 'bool gbe::SamplerFix::visitCallInst(llvm::CallInst*)':
/builddir/Beignet-1.3.2-Source/backend/src/llvm/llvm_sampler_fix.cpp:85:53: erro
r: cannot convert 'llvm::FunctionCallee' to 'llvm::Value*' in initialization

@q66
Copy link
Contributor Author

q66 commented Sep 24, 2019

As I see it,

Value* samplerCvt = M->getOrInsertFunction("__gen_ocl_sampler_to_int", i32Ty, I->getOperand(0)->getType());

will need changing to

Value* samplerCvt = M->getOrInsertFunction("__gen_ocl_sampler_to_int", i32Ty, I->getOperand(0)->getType()).getCallee();

in two places in that file when compiling for llvm9.

@leahneukirchen
Copy link
Member

FreeBSD has a complete patchset, but I have other things to do right now: https://bz-attachments.freebsd.org/attachment.cgi?id=206326

@leahneukirchen
Copy link
Member

Chromium built on x86_64.

@q66
Copy link
Contributor Author

q66 commented Sep 25, 2019

Rebased, and dropped qt5 rebuild as it'll be done by the 5.13.1 update: #14701 - beignet still broken for some reason

@q66
Copy link
Contributor Author

q66 commented Sep 25, 2019

Beignet fixed. I think this makes all the packages

@q66
Copy link
Contributor Author

q66 commented Sep 26, 2019

This is ready to land

@Hoshpak Hoshpak merged commit 0fd665d into void-linux:master Sep 26, 2019
@q66 q66 deleted the llvm9 branch October 19, 2019 18:12
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants