Discussion:
Odd Linaro GCC 4.8 2015.06 behavior with precompiled headers
Dragan Stancevic
2015-09-01 01:13:30 UTC
Permalink
Hi-

It seems that there is some discrepancy between Linaro GCC 4.8 2015.06 and Linaro GCC 4.8 2014.11 with regards to precompiled headers.

It appears that 2015.06 doesn't even attempt to open the precompiled headers according to strace. I have been looking on gcc mailing list but have not been able to find any fixes related to precompiled headers.

Does anyone have any pointers as to what should I be looking at to get to the bottom of this issue?

This simple program compiles without any problems on 2014.11, but fails on 2015.06 because 2015.06 doesn't even attempt to read tst.h.gch created by "make header"

***@tst:~$ cat Makefile
PROJ=tst
CC=arm-linux-gcc
LD=arm-linux-ld

all: header $(PROJ)

header: $(PROJ)._
cp $(PROJ)._ $(PROJ).h
$(CC) -x c-header -c $(PROJ).h

$(PROJ):
$(RM) $(PROJ).h
$(CC) $(PROJ).c -o $(PROJ)

clean:
$(RM) $(PROJ).h.gch $(PROJ).h $(PROJ)

***@tst:~$ cat tst._
#include <stdio.h>


***@tst:~$ cat tst.c
#include "tst.h"
int main(int argc, char**argv)
{
char *s = "Test";
printf("%s\n", s);
return 0;
}

Loading...