summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-03-14 22:56:22 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2020-03-14 23:17:57 +0000
commit9544a17f23043191f8cac9d99cc221758d68b08a (patch)
tree8bdfabbc0404aa8e90e0a4c574075b653c7ad801 /eclass/flag-o-matic.eclass
parentnet-im/pidgin: Attempt to fix installation with gnome-base/gconf (diff)
downloadgentoo-9544a17f23043191f8cac9d99cc221758d68b08a.tar.gz
gentoo-9544a17f23043191f8cac9d99cc221758d68b08a.tar.bz2
gentoo-9544a17f23043191f8cac9d99cc221758d68b08a.zip
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 <slyfox@gentoo.org>
Diffstat (limited to 'eclass/flag-o-matic.eclass')
-rw-r--r--eclass/flag-o-matic.eclass12
1 files changed, 6 insertions, 6 deletions
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[@]}"