Created attachment 10628 [details] Fix. GDB-7.9 and GCC-5.0 contain instant code compilation feature: https://sourceware.org/gdb/wiki/GCCCompileAndExecute GDB calls gcc in a way like: x86_64-redhat-linux-gcc -m64 -mcmodel=large -std=gnu11 -fno-exceptions -O0 -gdwarf-4 -fPIC -w -fno-stack-protector -fplugin=libcc1plugin -fplugin-arg-libcc1plugin-fd=8 /tmp/gdbobj-SBkCR2/out1.c -c -o /tmp/gdbobj-SBkCR2/out1.o And GDB then communicates with child GCC over fd 8 (in this case). With ccache the command hangs. IMO it hans because it runs the command twice and so after all the communication with GDB completes second GCC tries to communicate again - which cannot work. ------------------------------------------------------------------------------ Command line: x86_64-redhat-linux-gcc -m64 -mcmodel=large -std=gnu11 -fno-exceptions -O0 -gdwarf-4 -fPIC -w -fno-stack-protector -fplugin=libcc1plugin -fplugin-arg-libcc1plugin-fd=8 /tmp/gdbobj-mhxyIe/out1.c -c -o /tmp/gdbobj-mhxyIe/out1.o Hostname: host1.jankratochvil.net Working directory: /home/jkratoch/redhat/gdb-clean/gdb/testsuite Source file: /tmp/gdbobj-mhxyIe/out1.c Object file: /tmp/gdbobj-mhxyIe/out1.o Trying direct lookup Looking for object file hash in /home/jkratoch/.ccache/8/f/ffd320700a68c954a27813482a8236-36287.manifest No such manifest file Did not find object file hash in manifest Running preprocessor Executing /usr/bin/x86_64-redhat-linux-gcc -m64 -mcmodel=large -std=gnu11 -fno-exceptions -O0 -gdwarf-4 -fPIC -w -fno-stack-protector -fplugin=libcc1plugin -fplugin-arg-libcc1plugin-fd=8 -E /tmp/gdbobj-mhxyIe/out1.c Failed to stat include file gdb command line: No such file or directory Disabling direct mode Got object file hash from preprocessor Object file /home/jkratoch/.ccache/d/6/a33e6857193e3619bdf58567cd261a-29788.o not in cache Running real compiler Executing /usr/bin/x86_64-redhat-linux-gcc -m64 -mcmodel=large -std=gnu11 -fno-exceptions -O0 -gdwarf-4 -fPIC -w -fno-stack-protector -fplugin=libcc1plugin -fplugin-arg-libcc1plugin-fd=8 -c -o /tmp/gdbobj-mhxyIe/out1.o /home/jkratoch/.ccache/tmp/out1.stdout.host1.jankratochvil.net.9782.nBRkk6.i <hang> ------------------------------------------------------------------------------ Attaching a fix, thanks.
Thanks, fixed in 4f8931b4c7ea6aa7e453279857ee1425631510d2.
Included in v3.2.2.