On Sun, Nov 22, 2015 at 4:13 AM, Sebastian Pop <seb...@gmail.com> wrote: > On Sat, Nov 21, 2015 at 4:03 PM, David Edelsohn <dje....@gmail.com> wrote: >> Graphite relies on the ISL library and includes multiple ISL headers. >> The ISL headers refer to identifiers that are poisoned for use in GCC. >> The source files for Graphite were organized to include the ISL >> headers first, to avoid the identifier poisoning, which breaks some >> platforms because GCC header features are disabled. >> >> This patch reorganizes the graphite*.c header file inclusion order to >> list ISL header files near the end, just before the graphite header >> files on which they rely. A new macro, USES_ISL, is defined, which >> skips the relevant identifier poisoning, similar to logic for Flex and >> Bison. >> >> This patch also removes early inclusion of stddef.h for ISL because it >> now should be provided by GCC system.h >> >> This has been bootstrapped on powerpc-ibm-aix7.1.0.0 >> >> Okay for trunk? >> >> Thanks, David >> >> * system.h: Don't poison calloc and strdup if USES_ISL is defined. >> * graphite-dependences.c: Define USES_ISL. Include ISL header files >> after GCC header files and before graphite header files. >> * graphite-dependences.c: Same. >> * graphite-isl-ast-to-gimple.c: Same. >> * graphite-optimize-isl.c: Same. >> * graphite-poly.c: Same. >> * graphite-scop-detection.c: Same. >> * graphite-sese-to-poly.c: Same. >> * graphite.c: Same. > > The patch looks good to me. Thanks David for fixing this.
Note that if we run into more problems like this instead of guarding the poisoning we may as well move the include of the ISL headers to system.h guarded by USES_ISL. Richard. > Sebastian