Skip to content

Commit

Permalink
add backwards compatibility for those relying on empty cpuinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
dmoody256 committed Jul 8, 2020
1 parent ff0ccc6 commit 251dbb5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions client/icecc-create-env.in
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,17 @@ if test -n "$clang"; then

search_addfile $orig_clang as /usr/bin
search_addfile $orig_clang objcopy /usr/bin

# HACK: Clang4.0 and later access /proc/cpuinfo and report an error when they fail
# to find it, even if they use a fallback mechanism, making the error useless
# (at least in this case). Since the file is not really needed, create a fake one.
# Only add an empty file if the user did not attempt to add there own.
if test -d /proc && [[ $extrafiles != *" /proc/cpuinfo"* ]]; then
mkdir $tempdir/fakeproc
mkdir $tempdir/fakeproc/proc
touch $tempdir/fakeproc/proc/cpuinfo
add_file $tempdir/fakeproc/proc/cpuinfo /proc/cpuinfo
fi
fi

# Do not do any prefix stripping on extra files, they (e.g. clang plugins) are usually
Expand Down

0 comments on commit 251dbb5

Please sign in to comment.