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.

Attachment: GG
Description: Binary data

Reply via email to