From: Sergei Trofimovich Date: Sat, 14 Mar 2020 22:56:22 +0000 (+0000) Subject: flag-o-matic.eclass: crash in test-flag-PROG() when ${TEMP} is not writable X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9544a17f23043191f8cac9d99cc221758d68b08a;p=gentoo.git flag-o-matic.eclass: crash in test-flag-PROG() when ${TEMP} is not writable Reported by qolfixes on #gentoo-toolchain. Due to permission error in temp/ glibc ebuild silently filtered away all flags from CFLAGS and failed with an obscure error. The change turn flag filtering error into early fatal error. Signed-off-by: Sergei Trofimovich --- diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass index 5cc58f9e9392..1e685864f465 100644 --- a/eclass/flag-o-matic.eclass +++ b/eclass/flag-o-matic.eclass @@ -446,30 +446,30 @@ test-flag-PROG() { case "${lang}" in # compiler/assembler only c) - in_ext='.c' + in_ext='c' in_src='int main(void) { return 0; }' cmdline_extra+=(-xc -c) ;; c++) - in_ext='.cc' + in_ext='cc' in_src='int main(void) { return 0; }' cmdline_extra+=(-xc++ -c) ;; f77) - in_ext='.f' + in_ext='f' # fixed source form in_src=' end' cmdline_extra+=(-xf77 -c) ;; f95) - in_ext='.f90' + in_ext='f90' in_src='end' cmdline_extra+=(-xf95 -c) ;; # C compiler/assembler/linker c+ld) - in_ext='.c' + in_ext='c' in_src='int main(void) { return 0; }' cmdline_extra+=(-xc) ;; @@ -477,7 +477,7 @@ test-flag-PROG() { local test_in=${T}/test-flag.${in_ext} local test_out=${T}/test-flag.exe - printf "%s\n" "${in_src}" > "${test_in}" || return 1 + printf "%s\n" "${in_src}" > "${test_in}" || die "Failed to create '${test_in}'" local cmdline=( "${comp[@]}"