diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2016-08-17 14:31:25 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2016-08-22 16:43:26 +0000 |
commit | 60f9d69e016b11c468c98ea75ba0a60c44afbbc4 (patch) | |
tree | ecb49581a9e41a37943c22cd9ef3f63451b20ee7 /import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0044-gengtypes.patch | |
parent | e18c61205e0234b03697129c20cc69c9b3940efc (diff) | |
download | blackbird-openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.tar.gz blackbird-openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.zip |
yocto-poky: Move to import-layers subdir
We are going to import additional layers, so create a subdir to
hold all of the layers that we import with git-subtree.
Change-Id: I6f732153a22be8ca663035c518837e3cc5ec0799
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0044-gengtypes.patch')
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0044-gengtypes.patch | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0044-gengtypes.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0044-gengtypes.patch new file mode 100644 index 000000000..e38761d4c --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0044-gengtypes.patch @@ -0,0 +1,97 @@ +gengtype is generated for both the build system and the target. -DGENERATOR_FILE +was added in the patch http://gcc.gnu.org/ml/gcc-patches/2012-07/msg00273.html +and was applied to both versions of gengtype. + +Unfortunately the presence of this flag triggers the build configuration (bconfig.h) +to be included for the target build of gengtype. Compiling gengtype with the target +compiler and bconfig.h can result in errors if the build and target systems are +dissimilar. An example case this fails is cross compiling gcc on linux for a darwin +target system: + +In file included from /media/build1/poky/build/tmp/work-shared/gcc-4.8.1-r0/gcc-4.8.1/gcc/gengtype-parse.c:25:0: +| /media/build1/poky/build/tmp/work-shared/gcc-4.8.1-r0/gcc-4.8.1/gcc/gengtype-parse.c: In function 'void parse_error(const char*, ...)': +| /media/build1/poky/build/tmp/work-shared/gcc-4.8.1-r0/gcc-4.8.1/gcc/system.h:93:53: error: 'fputc_unlocked' was not declared in this scope +| # define fputc(C, Stream) fputc_unlocked (C, Stream) + +which occurs since auto-build.h and auto-host.h have differnet values of +HAVE_FPUTC_UNLOCKED: + +#define HAVE_FPUTC_UNLOCKED 1 +/* #undef HAVE_FPUTS_UNLOCKED */ + +The obvious fix is to only include the flag on build/ targets which this patch does, however +this also leads to compile errors due to const_tree being undefined but used in double_int.h + +I added a GENERATOR_FILE2 flag to workaround those in the +target case and allow the build to succeed. + +Only the build/gengtypes should have the -DGENERATOR_FILE + +RP 22/8/2013 + +Upstream-Status: Pending + +Index: gcc-4.8.1/gcc/Makefile.in +=================================================================== +--- gcc-4.8.1.orig/gcc/Makefile.in 2013-08-19 11:40:36.844014424 +0000 ++++ gcc-4.8.1/gcc/Makefile.in 2013-08-19 11:40:37.784014402 +0000 +@@ -3903,27 +3903,29 @@ + + gengtype-lex.o build/gengtype-lex.o : gengtype-lex.c gengtype.h $(SYSTEM_H) + gengtype-lex.o: $(CONFIG_H) $(BCONFIG_H) +-CFLAGS-gengtype-lex.o += -DGENERATOR_FILE ++CFLAGS-build/gengtype-lex.o += -DGENERATOR_FILE + build/gengtype-lex.o: $(BCONFIG_H) + + gengtype-parse.o build/gengtype-parse.o : gengtype-parse.c gengtype.h \ + $(SYSTEM_H) + gengtype-parse.o: $(CONFIG_H) +-CFLAGS-gengtype-parse.o += -DGENERATOR_FILE ++CFLAGS-build/gengtype-parse.o += -DGENERATOR_FILE + build/gengtype-parse.o: $(BCONFIG_H) + + gengtype-state.o build/gengtype-state.o: gengtype-state.c $(SYSTEM_H) \ + gengtype.h errors.h double-int.h version.h $(HASHTAB_H) $(OBSTACK_H) \ + $(XREGEX_H) + gengtype-state.o: $(CONFIG_H) +-CFLAGS-gengtype-state.o += -DGENERATOR_FILE ++CFLAGS-gengtype-state.o += -DGENERATOR_FILE2 ++CFLAGS-build/gengtype-state.o += -DGENERATOR_FILE + build/gengtype-state.o: $(BCONFIG_H) + + gengtype.o build/gengtype.o : gengtype.c $(SYSTEM_H) gengtype.h \ + rtl.def insn-notes.def errors.h double-int.h version.h $(HASHTAB_H) \ + $(OBSTACK_H) $(XREGEX_H) + gengtype.o: $(CONFIG_H) +-CFLAGS-gengtype.o += -DGENERATOR_FILE ++CFLAGS-gengtype.o += -DGENERATOR_FILE2 ++CFLAGS-build/gengtype.o += -DGENERATOR_FILE + build/gengtype.o: $(BCONFIG_H) + + build/genmddeps.o: genmddeps.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \ +@@ -3988,7 +3990,7 @@ + # any system header is included. + gengtype-lex.c : gengtype-lex.l + -$(FLEX) $(FLEXFLAGS) -o$@ $< && { \ +- echo '#include "bconfig.h"' > $@.tmp; \ ++ echo '' > $@.tmp; \ + cat $@ >> $@.tmp; \ + mv $@.tmp $@; \ + } +Index: gcc-4.8.1/gcc/double-int.h +=================================================================== +--- gcc-4.8.1.orig/gcc/double-int.h 2013-01-30 11:04:30.000000000 +0000 ++++ gcc-4.8.1/gcc/double-int.h 2013-08-19 11:41:51.564012719 +0000 +@@ -448,10 +448,12 @@ + + + #ifndef GENERATOR_FILE ++#ifndef GENERATOR_FILE2 + /* Conversion to and from GMP integer representations. */ + + void mpz_set_double_int (mpz_t, double_int, bool); + double_int mpz_get_double_int (const_tree, mpz_t, bool); + #endif ++#endif + + #endif /* DOUBLE_INT_H */ |