summaryrefslogtreecommitdiffhomepage
path: root/sofort/ccenv/ccenv.sh
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2021-06-10 21:50:25 +0000
committermidipix <writeonce@midipix.org>2021-06-10 21:51:55 +0000
commita9b59eac43295d0b3c55370a43ae7ec1d175e2f8 (patch)
treef5041d2f3c35c69bf1d459e1bab212e1280d2d59 /sofort/ccenv/ccenv.sh
parent9d47b8655f129e6a5306f69656c17e603df0b493 (diff)
downloadtpax-a9b59eac43295d0b3c55370a43ae7ec1d175e2f8.tar.bz2
tpax-a9b59eac43295d0b3c55370a43ae7ec1d175e2f8.tar.xz
build system: ccenv_set_primary_tools(): be resilient to -print-file-name bugs.
Diffstat (limited to 'sofort/ccenv/ccenv.sh')
-rw-r--r--sofort/ccenv/ccenv.sh13
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