diff options
author | midipix <writeonce@midipix.org> | 2021-06-10 21:50:25 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2021-06-10 21:51:54 +0000 |
commit | c83bcea2620b65a11798a936f8497f5f5e89844f (patch) | |
tree | 9a18705f3f9ddafb32803491309d0b91e6f41e6b | |
parent | 912a580ea95439b6d807f48cfd0c5380a11fbad1 (diff) | |
download | ptycon-c83bcea2620b65a11798a936f8497f5f5e89844f.tar.bz2 ptycon-c83bcea2620b65a11798a936f8497f5f5e89844f.tar.xz |
build system: ccenv_set_primary_tools(): be resilient to -print-file-name bugs.
-rw-r--r-- | sofort/ccenv/ccenv.sh | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sofort/ccenv/ccenv.sh b/sofort/ccenv/ccenv.sh index a0f69f2..e52f640 100644 --- a/sofort/ccenv/ccenv.sh +++ b/sofort/ccenv/ccenv.sh @@ -239,9 +239,16 @@ ccenv_set_primary_tools() # archive format preamble if [ -n "$ccenv_dumpmachine_switch" ]; then - ccenv_libgcc_a_header=$(od -b -N8 \ - $($ccenv_cc -print-file-name=libgcc.a) \ - | head -n1) + ccenv_libgcc_path=$($ccenv_cc -print-file-name=libgcc.a \ + 2>/dev/null) + + if [ -n "$ccenv_libgcc_path" ]; then + ccenv_libgcc_a_header=$(od -b -N8 \ + $($ccenv_cc -print-file-name=libgcc.a) \ + | head -n1) + else + ccenv_libgcc_a_header= + fi else ccenv_libgcc_a_header= fi |