From: Christopher Larson <chris_lar...@mentor.com> We weren't consistent in the HOST_ (aka BUILD_) and non-HOST_ flags, so we were using BUILD_CPPFLAGS to compile target stuff, for example. Sort that out, and make sure we obey LDFLAGS.
Signed-off-by: Christopher Larson <chris_lar...@mentor.com> --- ...HOST_-vs-non-HOST_-flags-and-obey-LDFLAGS.patch | 73 ++++++++++++++++++++++ meta/recipes-devtools/mkelfimage/mkelfimage_git.bb | 5 +- 2 files changed, 76 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-devtools/mkelfimage/mkelfimage/0002-Sort-out-HOST_-vs-non-HOST_-flags-and-obey-LDFLAGS.patch diff --git a/meta/recipes-devtools/mkelfimage/mkelfimage/0002-Sort-out-HOST_-vs-non-HOST_-flags-and-obey-LDFLAGS.patch b/meta/recipes-devtools/mkelfimage/mkelfimage/0002-Sort-out-HOST_-vs-non-HOST_-flags-and-obey-LDFLAGS.patch new file mode 100644 index 0000000..8139edc --- /dev/null +++ b/meta/recipes-devtools/mkelfimage/mkelfimage/0002-Sort-out-HOST_-vs-non-HOST_-flags-and-obey-LDFLAGS.patch @@ -0,0 +1,73 @@ +Upstream-Status: Pending + +From ef21bb404cb5dbfbaa95b693c9705da2fd7e7472 Mon Sep 17 00:00:00 2001 +From: Christopher Larson <chris_lar...@mentor.com> +Date: Thu, 5 May 2016 11:49:24 -0700 +Subject: Sort out HOST_ vs non-HOST_ flags, and obey LDFLAGS + +Signed-off-by: Christopher Larson <chris_lar...@mentor.com> +--- + Makefile.conf.in | 3 +++ + configure.ac | 6 +++++- + main/Makefile | 4 ++-- + 3 files changed, 10 insertions(+), 3 deletions(-) + +diff --git a/Makefile.conf.in b/Makefile.conf.in +index 4645e44..dcb6cf2 100644 +--- a/Makefile.conf.in ++++ b/Makefile.conf.in +@@ -17,6 +17,9 @@ DEFS=@DEFS@ + LIBS=@LIBS@ + HOST_CC=@HOST_CC@ + HOST_CFLAGS=@HOST_CFLAGS@ $(DEFS) ++CC=@CC@ ++CFLAGS=@CFLAGS@ $(DEFS) ++LDFLAGS=@LDFLAGS@ + + I386_CC =@I386_CC@ + I386_LD =@I386_LD@ +diff --git a/configure.ac b/configure.ac +index d8bd7aa..2962a4a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -175,7 +175,8 @@ fi + + dnl ---Output variables... + +-HOST_CFLAGS="$HOST_CFLAGS -O2 -Wall \$(HOST_CPPFLAGS)" ++CFLAGS="${CFLAGS:--O2} -Wall \$(CPPFLAGS)" ++HOST_CFLAGS="${HOST_CFLAGS:--O2} -Wall \$(HOST_CPPFLAGS)" + + dnl TODO: figure out how to set these appropriately for compilers other than gcc + I386_CFLAGS="$I386_CFLAGS -Os -ffreestanding -Wall -W -Wno-format \$(I386_CPPFLAGS)" +@@ -189,6 +190,9 @@ IA64_LDFLAGS='-static --warn-multiple-gp --warn-common' + + AC_SUBST([HOST_CC]) + AC_SUBST([HOST_CFLAGS]) ++AC_SUBST([CC]) ++AC_SUBST([CFLAGS]) ++AC_SUBST([LDFLAGS]) + + AC_SUBST([I386_CC]) + AC_SUBST([I386_LD]) +diff --git a/main/Makefile b/main/Makefile +index d9fb1d8..cd53613 100644 +--- a/main/Makefile ++++ b/main/Makefile +@@ -4,11 +4,11 @@ MKELF_OBJS=$(OBJDIR)/main/mkelfImage.o \ + + $(OBJDIR)/sbin/mkelfImage: $(MKELF_OBJS) $(DEPS) + $(MKDIR) -p $(@D) +- $(CC) $(HOST_CFLAGS) $(MKELF_OBJS) -o $@ $(LIBS) ++ $(CC) $(CFLAGS) $(LDFLAGS) $(MKELF_OBJS) -o $@ $(LIBS) + + $(OBJDIR)/main/mkelfImage.o: main/mkelfImage.c include/mkelfImage.h $(DEPS) + $(MKDIR) -p $(@D) +- $(CC) $(HOST_CFLAGS) -c $< -o $@ ++ $(CC) $(CFLAGS) -c $< -o $@ + + $(OBJDIR)/man/man8/mkelfImage.8: main/mkelfImage.man + $(MKDIR) -p $(@D) +-- +2.8.0 + diff --git a/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb b/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb index 92435cd..9fcccb4 100644 --- a/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb +++ b/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb @@ -13,8 +13,9 @@ http://review.coreboot.org/gitweb?p=coreboot.git;a=commit;h=34fc4ab80b507739e258 DEPENDS += "zlib" SRC_URI = "git://review.coreboot.org/p/coreboot;protocol=http \ - file://cross-compile.patch \ - " + file://cross-compile.patch \ + file://0002-Sort-out-HOST_-vs-non-HOST_-flags-and-obey-LDFLAGS.patch \ + " SRC_URI_append_class-native = " \ file://fix-makefile-to-find-libz.patch \ " -- 2.8.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core