forked from rarias/bscpkgs
fixup! aocc: init at 5.0.0
This commit is contained in:
parent
d22a0b4daa
commit
4c7774e435
@ -1,29 +1,12 @@
|
||||
{ lib
|
||||
{ wrapCCWith
|
||||
, aoccUnwrapped
|
||||
, wrapCCWith
|
||||
}:
|
||||
|
||||
let
|
||||
wrapCCWith {
|
||||
cc = aoccUnwrapped;
|
||||
stdenv = aoccUnwrapped.stdenv;
|
||||
targetConfig = stdenv.targetPlatform.config;
|
||||
|
||||
gcc = stdenv.cc;
|
||||
|
||||
in wrapCCWith {
|
||||
inherit cc;
|
||||
|
||||
extraBuildCommands = ''
|
||||
echo "-isystem ${cc}/include" >> $out/nix-support/cc-cflags
|
||||
|
||||
echo "-L${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-ldflags
|
||||
echo "-L${gcc.cc.lib}/lib" >> $out/nix-support/cc-ldflags
|
||||
echo "-L${cc}/lib" >> $out/nix-support/cc-ldflags
|
||||
|
||||
# Need the gcc in the path
|
||||
echo 'export "PATH=${gcc}/bin:$PATH"' >> $out/nix-support/cc-wrapper-hook
|
||||
|
||||
# Disable hardening by default
|
||||
echo "" > $out/nix-support/add-hardening.sh
|
||||
wrap aocc $wrapper $ccPath/clang
|
||||
wrap aocc++ $wrapper $ccPath/clang++
|
||||
'';
|
||||
}
|
||||
|
@ -10,12 +10,13 @@
|
||||
|
||||
let
|
||||
# in newer nixpkgs the runtime is hsakmt
|
||||
rocmRuntime = if rocmPackages ? hsakmt then
|
||||
rocmPackages.hsakmt
|
||||
else
|
||||
rocmPackages.rocm-runtime;
|
||||
rocmRuntime =
|
||||
if rocmPackages ? hsakmt then
|
||||
rocmPackages.hsakmt
|
||||
else
|
||||
rocmPackages.rocm-runtime;
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
stdenv.mkDerivation {
|
||||
pname = "aocc-compiler";
|
||||
version = "5.0.0";
|
||||
|
||||
@ -41,9 +42,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
ln -s ${lib.getLib libffi}/lib/libffi.so $out/lib/libffi.so.6
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
isClang = true;
|
||||
};
|
||||
passthru = {
|
||||
inherit rocmRuntime;
|
||||
isClang = true; # Needed for wrapCCWith
|
||||
};
|
||||
|
||||
meta.mainProgram = "clang";
|
||||
})
|
||||
meta.mainProgram = "clang";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user