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

cmake: fix crash on CC without libc support #187777

Merged
merged 1 commit into from
Aug 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ index b9381c3d7d..5e944640b5 100644
# CMake install location
"${_CMAKE_INSTALL_DIR}"
)
@@ -47,48 +44,46 @@ endif()
@@ -47,48 +44,48 @@ endif()

# Non "standard" but common install prefixes
list(APPEND CMAKE_SYSTEM_PREFIX_PATH
Expand All @@ -22,7 +22,9 @@ index b9381c3d7d..5e944640b5 100644
)

# List common include file locations not under the common prefixes.
+if(IS_DIRECTORY $ENV{NIX_CC})
+if(IS_DIRECTORY $ENV{NIX_CC}
+ AND EXISTS $ENV{NIX_CC}/nix-support/orig-libc
+ AND EXISTS $ENV{NIX_CC}/nix-support/orig-libc-dev)
+ file(STRINGS "$ENV{NIX_CC}/nix-support/orig-libc" _nix_cmake_libc)
+ file(STRINGS "$ENV{NIX_CC}/nix-support/orig-libc-dev" _nix_cmake_libc_dev)
+else()
Expand Down