Fix gcc compilation due to nix problem
This commit is contained in:
parent
517c90704a
commit
93638c4488
3
Makefile
3
Makefile
@ -73,12 +73,15 @@ bench: $(BENCH_TARGETS)
|
|||||||
.PHONY: clean tangle bench
|
.PHONY: clean tangle bench
|
||||||
|
|
||||||
%: %.o
|
%: %.o
|
||||||
|
$(info [bin] $@)
|
||||||
$(CXX) $< $(CXXFLAGS) $(LDFLAGS) -o $@
|
$(CXX) $< $(CXXFLAGS) $(LDFLAGS) -o $@
|
||||||
|
|
||||||
%.o: %.cxx
|
%.o: %.cxx
|
||||||
|
$(info [obj] $@)
|
||||||
$(CXX) -c $< $(CXXFLAGS) -o $@
|
$(CXX) -c $< $(CXXFLAGS) -o $@
|
||||||
|
|
||||||
%.d: %.cxx
|
%.d: %.cxx
|
||||||
|
$(info [dep] $@)
|
||||||
$(CXX) -M $< $(CXXFLAGS) -o $@
|
$(CXX) -M $< $(CXXFLAGS) -o $@
|
||||||
|
|
||||||
.PHONY: install
|
.PHONY: install
|
||||||
|
|||||||
9
etc/nix/clang.nix
Normal file
9
etc/nix/clang.nix
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{ pkgs, ...}:
|
||||||
|
|
||||||
|
{
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
clang
|
||||||
|
llvmPackages.openmp
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
38
shell.nix
38
shell.nix
@ -1,40 +1,28 @@
|
|||||||
{ pkgs ? import <nixpkgs> {} }:
|
{ pkgs ? import <nixpkgs> {} , with-clang ? false }:
|
||||||
|
|
||||||
pkgs.mkShell rec {
|
let
|
||||||
|
compiler-configuration
|
||||||
|
= if with-clang
|
||||||
|
then (import ./etc/nix/clang.nix { inherit pkgs; }).buildInputs
|
||||||
|
else [ pkgs.gcc ];
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
|
pkgs.mkShell {
|
||||||
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
|
|
||||||
clang
|
|
||||||
llvmPackages.openmp
|
|
||||||
|
|
||||||
coreutils
|
coreutils
|
||||||
git
|
git
|
||||||
|
|
||||||
gcc
|
|
||||||
blas
|
blas
|
||||||
openmpi
|
openmpi
|
||||||
mpi
|
|
||||||
|
|
||||||
|
gnumake
|
||||||
|
binutils
|
||||||
emacs
|
emacs
|
||||||
];
|
|
||||||
|
|
||||||
/*
|
] ++ compiler-configuration;
|
||||||
openblas = pkgs.openblas.override {
|
|
||||||
enableStatic = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
scalapack = import ./etc/nix/scalapack.nix {
|
|
||||||
lib = pkgs.lib;
|
|
||||||
stdenv = pkgs.stdenv;
|
|
||||||
fetchFromGitHub = pkgs.fetchFromGitHub;
|
|
||||||
cmake = pkgs.cmake;
|
|
||||||
openssh = pkgs.openssh;
|
|
||||||
gfortran = pkgs.gfortran;
|
|
||||||
mpi = pkgs.mpi;
|
|
||||||
blas = pkgs.blas;
|
|
||||||
lapack = pkgs.lapack;
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
export LAPACK_PATH=${pkgs.lapack}
|
export LAPACK_PATH=${pkgs.lapack}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user