Currently tc-getCPP is defined tc-getCPP() { tc-getPROG CPP "${CC:-gcc} -E" "$@"; } This breaks an scripts trying to pipe input: echo "main(){}" | tc-getCPP as gcc -E does not accept piped data Changing tc-getCPP to tc-getCPP() { tc-getPROG CPP cpp "$@"; } fixes that. Any reason to keep this old definition of tc-getCPP ?
> as gcc -E does not accept piped data Sure it does: % echo "int main(){return 0;}" | gcc -E - # 1 "<stdin>" # 1 "<built-in>" # 1 "<command-line>" # 31 "<command-line>" # 1 "/usr/include/stdc-predef.h" 1 3 4 # 32 "<command-line>" 2 # 1 "<stdin>" int main(){return 0;} > Any reason to keep this old definition of tc-getCPP ? https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c65f6083898968b5442eeb66afd4298a3b4264e2
(In reply to Mike Gilbert from comment #1) > > as gcc -E does not accept piped data > > Sure it does: > > % echo "int main(){return 0;}" | gcc -E - > # 1 "<stdin>" > # 1 "<built-in>" > # 1 "<command-line>" > # 31 "<command-line>" > # 1 "/usr/include/stdc-predef.h" 1 3 4 > # 32 "<command-line>" 2 > # 1 "<stdin>" > int main(){return 0;} But this requiers you to know that cpp is really gcc. > > > Any reason to keep this old definition of tc-getCPP ? > > https://gitweb.gentoo.org/repo/gentoo.git/commit/ > ?id=c65f6083898968b5442eeb66afd4298a3b4264e2 I see, not an easy fix then.