diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-01-22 22:31:34 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-01-24 21:18:39 +0000 |
commit | ee036ed5a49547acefe6f70365f9df64068c7d8c (patch) | |
tree | 60dfe065012519dcde1a648b8637ecde63cbda38 /pkgs/development/compilers/llvm/14/default.nix | |
parent | bb7aafebb3086b5e0e7b80fad277c02cd4d86d13 (diff) |
llvmPackages: don't exclude FreeBSD from -lunwind
The exception for FreeBSD was added in 0afe9d1f704 ("freebsd packages: Init at 13.1"), but it seems to have been erroneous, as e.g. ncurses fails to build: x86_64-unknown-freebsd13-clang++ -o demo ../obj_s/demo.o -L../lib -lncurses++w -L../lib -lformw -lmenuw -lpanelw -lncursesw -lutil -DHAVE_CONFIG_H -DBUILDING_NCURSES_CXX -I../c++ -I. -I../include -DNDEBUG -O2 -fPIC -DPIC x86_64-unknown-freebsd13-ld: error: undefined symbol: _Unwind_Resume >>> referenced by demo.cc >>> ../obj_s/demo.o:(TestApplication::run()) >>> referenced by demo.cc >>> ../obj_s/demo.o:(_GLOBAL__sub_I_demo.cc) >>> referenced by demo.cc >>> ../obj_s/demo.o:(NCursesUserItem<UserData>::NCursesUserItem(char const*, char const*, UserData const*)) >>> referenced 46 more times clang-12: error: linker command failed with exit code 1 (use -v to see invocation) This is fixed by undoing the change, adding -lunwind on FreeBSD.
Diffstat (limited to 'pkgs/development/compilers/llvm/14/default.nix')
-rw-r--r-- | pkgs/development/compilers/llvm/14/default.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/development/compilers/llvm/14/default.nix b/pkgs/development/compilers/llvm/14/default.nix index 8965388ae691c..722603bb70628 100644 --- a/pkgs/development/compilers/llvm/14/default.nix +++ b/pkgs/development/compilers/llvm/14/default.nix @@ -167,7 +167,7 @@ let ] ++ lib.optional (!stdenv.targetPlatform.isWasm) "--unwindlib=libunwind" ++ lib.optional - (!stdenv.targetPlatform.isWasm && !stdenv.targetPlatform.isFreeBSD && stdenv.targetPlatform.useLLVM or false) + (!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false) "-lunwind" ++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions"; }; |