On Wednesday, August 23 2017, Pedro Alves wrote: > On 08/23/2017 05:17 AM, Sergio Durigan Junior wrote: >> Hi there, >> >> This is a series of two patches, one for GDB and one for GCC, which aims >> to improve the detection and handling of triplets present on compiler >> names. The motivation for this series was mostly the fact that GDB's >> "compile" command is broken on Debian unstable, as can be seen here: >> >> <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=851146> >> >> The reason for the failure is the fact that Debian compiles GCC using >> the --program-{prefix,suffix} options from configure in order to name >> the compiler using the full triplet (i.e., Debian's GCC is not merely >> named "gcc", but e.g. "x86_64-linux-gnu-gcc-7"), which end up naming the >> C_COMPILER_NAME and CP_COMPILER_NAME defines with the specified prefix >> and suffix. Therefore, the regexp being used to match the compiler name >> is wrong because it doesn't take into account the fact that the defines >> may already contain the triplets. > > As discussed on IRC, I think the problem is that C_COMPILER_NAME > in libcc1 includes the full triplet in the first place. I think > that it shouldn't. I think that C_COMPILER_NAME should always > be "gcc".
Thanks for summarizing the discussion. I tend to agree with the rationale, and having C_COMPILER_NAME as "gcc" is also a valid fix for the original problem. As I said, I'd also like to hear others' opinions about the issue. I can then submit a proper patch. Thanks, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/