diff options
author | Alexey Neyman <stilor@att.net> | 2019-02-15 17:19:02 -0800 |
---|---|---|
committer | Alexey Neyman <stilor@att.net> | 2019-02-15 18:46:39 -0800 |
commit | 7217116836c3c363e1c18308f6541c66f8930a52 (patch) | |
tree | 607be24571440da648443b190d83a8f73e1d3380 /scripts/crosstool-NG.sh | |
parent | d5c73fd9e688ccb4b060d3295574e9333c4bbff5 (diff) | |
download | crosstool-ng-7217116836c3c363e1c18308f6541c66f8930a52.tar.gz crosstool-ng-7217116836c3c363e1c18308f6541c66f8930a52.tar.bz2 crosstool-ng-7217116836c3c363e1c18308f6541c66f8930a52.zip |
Check/increase `ulimit -n` setting
... 2.32 ld runs out of file descriptors while linking uClibc-ng on
SuperH.
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'scripts/crosstool-NG.sh')
-rw-r--r-- | scripts/crosstool-NG.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/crosstool-NG.sh b/scripts/crosstool-NG.sh index b15a4888..2e60f200 100644 --- a/scripts/crosstool-NG.sh +++ b/scripts/crosstool-NG.sh @@ -102,6 +102,14 @@ for d in \ esac done +n_open_files=$(ulimit -n) +if [ "${n_open_files}" -lt 2048 ]; then + # Newer ld seems to keep a lot of open file descriptors, hitting the default limit + # (1024) for example during uClibc-ng link. + CT_DoLog WARN "Number of open files ${n_open_files} may not be sufficient to build the toolchain; increasing to 2048" + ulimit -n 2048 +fi + # Where will we work? CT_WORK_DIR="${CT_WORK_DIR:-${CT_TOP_DIR}/.build}" CT_BUILD_DIR="${CT_BUILD_TOP_DIR}/build" |