This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Graphite header order
- From: David Edelsohn <dje dot gcc at gmail dot com>
- To: Sebastian Pop <s dot pop at samsung dot com>
- Cc: GCC Development <gcc at gcc dot gnu dot org>
- Date: Fri, 20 Nov 2015 10:31:54 -0500
- Subject: Graphite header order
- Authentication-results: sourceware.org; auth=none
Sebastian,
I have tried to build GCC with Graphite and ISL on AIX and encountered
two problems:
(1) isl/ctx.h
typedef enum {
isl_stat_error = -1,
isl_stat_ok = 0,
} isl_stat;
GCC complains about the comma in "isl_stat_ok = 0,". This seems like
a general bug that should appear on all targets.
(2) All of the graphite*.c files include ISL headers first. This
order is not supported by GCC development and creates conflicts for
types and definitions provided / overridden by GCC headers, especially
system.h and its dependent headers like hwint.h.
I presume that ISL headers are included first is they use calloc() and
strdup(), which are poisoned by GCC in system.h.
I am uncertain of the exact header dependencies, but the primary
dependency seems to be that the ISL headers must be included before
graphite-poly.h. The identifier poisoning problem needs to be
addressed by not poisoning the identifiers for files that include ISL
headers. The Graphite files need some sort of a macro like
#define IN_GRAPHITE
or
#define IN_ISL
and system.h must not poison the identifiers when that macro is present.
I am going to try with a hack of bracketing system.h with #undef
IN_GCC / #define IN_GCC in the graphite files.
Thanks, David