Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Build: find c-pragma.h,c-common.h regardless of gcc version

Add an extra -I line for the non-flattened location, then change all
inclusions to rely on the preprocessor search path to find the file.  It
is legal to specify a non-existent directory in the search path, so this
will work with both old and new layouts.
  • Loading branch information...
commit 598c56676f6a217543701590c91c91931041179f 1 parent 99da8c8
authored March 25, 2012
2  Makefile
@@ -97,7 +97,7 @@ PYTHON_CONFIG=python-config
97 97
 PYTHON_INCLUDES=$(shell $(PYTHON_CONFIG) --includes)
98 98
 PYTHON_LIBS=$(shell $(PYTHON_CONFIG) --libs)
99 99
 
100  
-CPPFLAGS+= -I$(GCCPLUGINS_DIR)/include -I. $(PYTHON_INCLUDES)
  100
+CPPFLAGS+= -I$(GCCPLUGINS_DIR)/include -I$(GCCPLUGINS_DIR)/include/c-family -I. $(PYTHON_INCLUDES)
101 101
 # Allow user to pick optimization, choose whether warnings are fatal,
102 102
 # and choose debugging information level.
103 103
 CFLAGS?=-O2 -Werror -g
2  gcc-python-option.c
@@ -20,7 +20,7 @@
20 20
 #include <Python.h>
21 21
 #include "gcc-python.h"
22 22
 #include "gcc-python-wrappers.h"
23  
-#include "c-family/c-common.h" /* for warn_format */
  23
+#include "c-common.h" /* for warn_format */
24 24
 #include "diagnostic.h"
25 25
 
26 26
 
7  gcc-python.c
@@ -34,7 +34,12 @@ int plugin_is_GPL_compatible;
34 34
 #include "cgraph.h"
35 35
 #include "opts.h"
36 36
 
37  
-#include "c-family/c-pragma.h" /* for parse_in */
  37
+/*
  38
+ * Use an unqualified name here and rely on dual search paths to let the
  39
+ * compiler find it.  This deals with c-pragma.h moving to a
  40
+ * subdirectory in newer versions of gcc.
  41
+ */
  42
+#include "c-pragma.h" /* for parse_in */
38 43
 
39 44
 #if 0
40 45
 #define LOG(msg) \

0 notes on commit 598c566

Please sign in to comment.
Something went wrong with that request. Please try again.