forked from rarias/bscpkgs
fixup! aocc: init at 5.0.0
This commit is contained in:
parent
d22a0b4daa
commit
d47b9d48b5
@ -1,29 +1,16 @@
|
|||||||
{ lib
|
{ wrapCCWith
|
||||||
, aoccUnwrapped
|
, aoccUnwrapped
|
||||||
, wrapCCWith
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
cc = aoccUnwrapped;
|
cc = aoccUnwrapped;
|
||||||
stdenv = aoccUnwrapped.stdenv;
|
|
||||||
targetConfig = stdenv.targetPlatform.config;
|
|
||||||
|
|
||||||
gcc = stdenv.cc;
|
|
||||||
|
|
||||||
in wrapCCWith {
|
in wrapCCWith {
|
||||||
inherit cc;
|
inherit cc;
|
||||||
|
|
||||||
extraBuildCommands = ''
|
extraBuildCommands = ''
|
||||||
echo "-isystem ${cc}/include" >> $out/nix-support/cc-cflags
|
echo "-isystem ${cc}/include" >> $out/nix-support/cc-cflags
|
||||||
|
|
||||||
echo "-L${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-ldflags
|
wrap aocc $wrapper $ccPath/clang
|
||||||
echo "-L${gcc.cc.lib}/lib" >> $out/nix-support/cc-ldflags
|
wrap aocc++ $wrapper $ccPath/clang++
|
||||||
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
|
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
@ -10,12 +10,13 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
# in newer nixpkgs the runtime is hsakmt
|
# in newer nixpkgs the runtime is hsakmt
|
||||||
rocmRuntime = if rocmPackages ? hsakmt then
|
rocmRuntime =
|
||||||
|
if rocmPackages ? hsakmt then
|
||||||
rocmPackages.hsakmt
|
rocmPackages.hsakmt
|
||||||
else
|
else
|
||||||
rocmPackages.rocm-runtime;
|
rocmPackages.rocm-runtime;
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation {
|
||||||
pname = "aocc-compiler";
|
pname = "aocc-compiler";
|
||||||
version = "5.0.0";
|
version = "5.0.0";
|
||||||
|
|
||||||
@ -42,8 +43,9 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
isClang = true;
|
inherit rocmRuntime;
|
||||||
|
isClang = true; # Needed for wrapCCWith
|
||||||
};
|
};
|
||||||
|
|
||||||
meta.mainProgram = "clang";
|
meta.mainProgram = "clang";
|
||||||
})
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user