All of lore.kernel.org
 help / color / mirror / Atom feed
* [master][PATCH 0/3] Fix a few recipes to obey LDFLAGS
@ 2016-05-05 19:30 Christopher Larson
  2016-05-05 19:30 ` [master][PATCH 1/3] ruby: obey LDFLAGS for the link of libruby Christopher Larson
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Christopher Larson @ 2016-05-05 19:30 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

The following changes since commit 1a0e56630c5c27d8899dd0979ae0b86bbe227881:

  utils.bbclass: note for deprecated base_contains (2016-04-29 07:53:58 +0100)

are available in the git repository at:

  git://github.com/kergoth/openembedded-core more-ldflags-fixes
  https://github.com/kergoth/openembedded-core/tree/more-ldflags-fixes

Christopher Larson (3):
  ruby: obey LDFLAGS for the link of libruby
  mkelfimage: obey LDFLAGS, sort out HOST_ flags
  pong-clock: obey CFLAGS, LDFLAGS

 ...HOST_-vs-non-HOST_-flags-and-obey-LDFLAGS.patch | 73 ++++++++++++++++++++++
 meta/recipes-devtools/mkelfimage/mkelfimage_git.bb |  5 +-
 meta/recipes-devtools/ruby/ruby.inc                |  3 +-
 ...0002-Obey-LDFLAGS-for-the-link-of-libruby.patch | 28 +++++++++
 meta/recipes-graphics/pong-clock/pong-clock_1.0.bb |  2 +-
 5 files changed, 107 insertions(+), 4 deletions(-)
 create mode 100644 meta/recipes-devtools/mkelfimage/mkelfimage/0002-Sort-out-HOST_-vs-non-HOST_-flags-and-obey-LDFLAGS.patch
 create mode 100644 meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch

-- 
2.8.0



^ permalink raw reply	[flat|nested] 18+ messages in thread

* [master][PATCH 1/3] ruby: obey LDFLAGS for the link of libruby
  2016-05-05 19:30 [master][PATCH 0/3] Fix a few recipes to obey LDFLAGS Christopher Larson
@ 2016-05-05 19:30 ` Christopher Larson
  2016-05-05 19:30 ` [master][PATCH 2/3] mkelfimage: obey LDFLAGS, sort out HOST_ flags Christopher Larson
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 18+ messages in thread
From: Christopher Larson @ 2016-05-05 19:30 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 meta/recipes-devtools/ruby/ruby.inc                |  3 ++-
 ...0002-Obey-LDFLAGS-for-the-link-of-libruby.patch | 28 ++++++++++++++++++++++
 2 files changed, 30 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch

diff --git a/meta/recipes-devtools/ruby/ruby.inc b/meta/recipes-devtools/ruby/ruby.inc
index 313e752..fde67e9 100644
--- a/meta/recipes-devtools/ruby/ruby.inc
+++ b/meta/recipes-devtools/ruby/ruby.inc
@@ -20,7 +20,8 @@ DEPENDS_class-native = "openssl-native libyaml-native"
 SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
 SRC_URI = "http://cache.ruby-lang.org/pub/ruby/${SHRT_VER}/ruby-${PV}.tar.gz \
            file://extmk.patch \
-"
+           file://0002-Obey-LDFLAGS-for-the-link-of-libruby.patch \
+           "
 
 inherit autotools
 
diff --git a/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch b/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch
new file mode 100644
index 0000000..b0114ba
--- /dev/null
+++ b/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch
@@ -0,0 +1,28 @@
+Upstream-Status: Pending
+
+From 306e95a9818d39d3349075aac9609e062b0f19ce Mon Sep 17 00:00:00 2001
+From: Christopher Larson <chris_larson@mentor.com>
+Date: Thu, 5 May 2016 10:59:07 -0700
+Subject: [PATCH 2/2] Obey LDFLAGS for the link of libruby
+
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+---
+ Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 7da2488..5b4aea1 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -75,7 +75,7 @@ EXTLIBS =
+ LIBS = @LIBS@ $(EXTLIBS)
+ MISSING = @LIBOBJS@ @ALLOCA@
+ LDSHARED = @LIBRUBY_LDSHARED@
+-DLDFLAGS = @LIBRUBY_DLDFLAGS@ $(XLDFLAGS) $(ARCH_FLAG)
++DLDFLAGS = @LIBRUBY_DLDFLAGS@ @LDFLAGS@ $(XLDFLAGS) $(ARCH_FLAG)
+ SOLIBS = @SOLIBS@
+ MAINLIBS = @MAINLIBS@
+ ARCHMINIOBJS = @MINIOBJS@
+-- 
+2.8.0
+
-- 
2.8.0



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [master][PATCH 2/3] mkelfimage: obey LDFLAGS, sort out HOST_ flags
  2016-05-05 19:30 [master][PATCH 0/3] Fix a few recipes to obey LDFLAGS Christopher Larson
  2016-05-05 19:30 ` [master][PATCH 1/3] ruby: obey LDFLAGS for the link of libruby Christopher Larson
@ 2016-05-05 19:30 ` Christopher Larson
  2016-05-05 21:54   ` Khem Raj
       [not found]   ` <cover.1462489051.git.chris_larson@mentor.com>
  2016-05-05 19:30 ` [master][PATCH 3/3] pong-clock: obey CFLAGS, LDFLAGS Christopher Larson
  2016-05-12 18:08 ` [master][PATCH 0/3] Fix a few recipes to obey LDFLAGS Christopher Larson
  3 siblings, 2 replies; 18+ messages in thread
From: Christopher Larson @ 2016-05-05 19:30 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@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_larson@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_larson@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_larson@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



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [master][PATCH 3/3] pong-clock: obey CFLAGS, LDFLAGS
  2016-05-05 19:30 [master][PATCH 0/3] Fix a few recipes to obey LDFLAGS Christopher Larson
  2016-05-05 19:30 ` [master][PATCH 1/3] ruby: obey LDFLAGS for the link of libruby Christopher Larson
  2016-05-05 19:30 ` [master][PATCH 2/3] mkelfimage: obey LDFLAGS, sort out HOST_ flags Christopher Larson
@ 2016-05-05 19:30 ` Christopher Larson
  2016-05-05 22:30   ` Khem Raj
  2016-05-12 18:08 ` [master][PATCH 0/3] Fix a few recipes to obey LDFLAGS Christopher Larson
  3 siblings, 1 reply; 18+ messages in thread
From: Christopher Larson @ 2016-05-05 19:30 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 meta/recipes-graphics/pong-clock/pong-clock_1.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/pong-clock/pong-clock_1.0.bb b/meta/recipes-graphics/pong-clock/pong-clock_1.0.bb
index 0e1a792..6c3bcd8 100644
--- a/meta/recipes-graphics/pong-clock/pong-clock_1.0.bb
+++ b/meta/recipes-graphics/pong-clock/pong-clock_1.0.bb
@@ -13,7 +13,7 @@ LIC_FILES_CHKSUM = "file://pong-clock-no-flicker.c;beginline=1;endline=23;md5=dd
 S = "${WORKDIR}"
 
 do_compile () {
-	${CC} -o pong-clock pong-clock-no-flicker.c `pkg-config --cflags --libs x11 xau xdmcp`
+	${CC} ${CFLAGS} ${LDFLAGS} -o pong-clock pong-clock-no-flicker.c `pkg-config --cflags --libs x11 xau xdmcp`
 }
 
 do_install () {
-- 
2.8.0



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [master][PATCH 2/3] mkelfimage: obey LDFLAGS, sort out HOST_ flags
  2016-05-05 19:30 ` [master][PATCH 2/3] mkelfimage: obey LDFLAGS, sort out HOST_ flags Christopher Larson
@ 2016-05-05 21:54   ` Khem Raj
  2016-05-05 22:16     ` Christopher Larson
       [not found]   ` <cover.1462489051.git.chris_larson@mentor.com>
  1 sibling, 1 reply; 18+ messages in thread
From: Khem Raj @ 2016-05-05 21:54 UTC (permalink / raw)
  To: Christopher Larson
  Cc: Christopher Larson, Patches and discussions about the oe-core layer

On Thu, May 5, 2016 at 12:30 PM, Christopher Larson <kergoth@gmail.com> wrote:
> From: Christopher Larson <chris_larson@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.
>

may be you should fold it into cross_compile patch ?

> Signed-off-by: Christopher Larson <chris_larson@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_larson@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_larson@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


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [master][PATCH 2/3] mkelfimage: obey LDFLAGS, sort out HOST_ flags
  2016-05-05 21:54   ` Khem Raj
@ 2016-05-05 22:16     ` Christopher Larson
  0 siblings, 0 replies; 18+ messages in thread
From: Christopher Larson @ 2016-05-05 22:16 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

On Thu, May 5, 2016 at 2:54 PM, Khem Raj <raj.khem@gmail.com> wrote:

> On Thu, May 5, 2016 at 12:30 PM, Christopher Larson <kergoth@gmail.com>
> wrote:
> > From: Christopher Larson <chris_larson@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.
> >
>
> may be you should fold it into cross_compile patch ?


Probably a good idea, since this builds on that. I'll send a v2, thanks.
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics

[-- Attachment #2: Type: text/html, Size: 1230 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [master][PATCH 3/3] pong-clock: obey CFLAGS, LDFLAGS
  2016-05-05 19:30 ` [master][PATCH 3/3] pong-clock: obey CFLAGS, LDFLAGS Christopher Larson
@ 2016-05-05 22:30   ` Khem Raj
  0 siblings, 0 replies; 18+ messages in thread
From: Khem Raj @ 2016-05-05 22:30 UTC (permalink / raw)
  To: Christopher Larson; +Cc: Christopher Larson, openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1442 bytes --]


> On May 5, 2016, at 12:30 PM, Christopher Larson <kergoth@gmail.com> wrote:
> 
> From: Christopher Larson <chris_larson@mentor.com>
> 
> Signed-off-by: Christopher Larson <chris_larson@mentor.com>
> ---
> meta/recipes-graphics/pong-clock/pong-clock_1.0.bb | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-graphics/pong-clock/pong-clock_1.0.bb b/meta/recipes-graphics/pong-clock/pong-clock_1.0.bb
> index 0e1a792..6c3bcd8 100644
> --- a/meta/recipes-graphics/pong-clock/pong-clock_1.0.bb
> +++ b/meta/recipes-graphics/pong-clock/pong-clock_1.0.bb
> @@ -13,7 +13,7 @@ LIC_FILES_CHKSUM = "file://pong-clock-no-flicker.c;beginline=1;endline=23;md5=dd
> S = "${WORKDIR}"
> 
> do_compile () {
> -	${CC} -o pong-clock pong-clock-no-flicker.c `pkg-config --cflags --libs x11 xau xdmcp`
> +	${CC} ${CFLAGS} ${LDFLAGS} -o pong-clock pong-clock-no-flicker.c `pkg-config --cflags --libs x11 xau xdmcl`

This could be improved if compile and link steps are done separately and you see the effect what I was making a point
from user point of view the toolchain is integrated.

$CC hello.c

should produce a a.out which can be executed.

> }
> 
> do_install () {
> --
> 2.8.0
> 
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 211 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [master][PATCHv2 2/3] mkelfimage: obey LDFLAGS, sort out HOST_ flags
       [not found]   ` <cover.1462489051.git.chris_larson@mentor.com>
@ 2016-05-05 22:59     ` Christopher Larson
  2016-05-14  6:25       ` Richard Purdie
  2016-05-20 17:04       ` [PATCHv3] " Christopher Larson
  0 siblings, 2 replies; 18+ messages in thread
From: Christopher Larson @ 2016-05-05 22:59 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@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_larson@mentor.com>
---
 .../mkelfimage/mkelfimage/cross-compile.patch      | 86 +++++++++++++++-------
 meta/recipes-devtools/mkelfimage/mkelfimage_git.bb |  4 +-
 2 files changed, 63 insertions(+), 27 deletions(-)

diff --git a/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch b/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch
index 7692709..2ae4b61 100644
--- a/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch
+++ b/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch
@@ -1,13 +1,43 @@
-make the tool to be cross compilable.
+From dc2712119d6832e24a9b7bed9ed4ce5ae03ce0a3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 14 Jul 2012 14:14:07 -0700
+Subject: [PATCH] mkelfimage: Fix cross build
+
+Make the tool to be cross compilable, by separating the variables for build
+tools from those for the target. Also modified to obey LDFLAGS.
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+
 Upstream-Status: Pending
 
-Index: mkelfImage/configure.ac
-===================================================================
---- mkelfImage.orig/configure.ac	2012-07-14 14:04:48.964898667 -0700
-+++ mkelfImage/configure.ac	2012-07-14 14:10:47.800916083 -0700
-@@ -70,6 +70,9 @@
+---
+ util/mkelfImage/Makefile.conf.in    | 3 +++
+ util/mkelfImage/configure.ac        | 7 +++++--
+ util/mkelfImage/linux-i386/Makefile | 2 +-
+ util/mkelfImage/linux-ia64/Makefile | 2 +-
+ util/mkelfImage/main/Makefile       | 4 ++--
+ 5 files changed, 12 insertions(+), 6 deletions(-)
+
+diff --git a/util/mkelfImage/Makefile.conf.in b/util/mkelfImage/Makefile.conf.in
+index 4645e44..dcb6cf2 100644
+--- a/util/mkelfImage/Makefile.conf.in
++++ b/util/mkelfImage/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/util/mkelfImage/configure.ac b/util/mkelfImage/configure.ac
+index 652b952..0f2ac72 100644
+--- a/util/mkelfImage/configure.ac
++++ b/util/mkelfImage/configure.ac
+@@ -70,6 +70,9 @@ if test "with_default" != no ; then
  		AC_MSG_ERROR([cc not found])
  	fi
  	eval "${with_default}_CC='$CC'"
@@ -17,19 +47,22 @@ Index: mkelfImage/configure.ac
  	AC_PROG_CPP
  	if test "$CPP" = no; then
  		AC_MSG_ERROR([cpp not found])
-@@ -172,7 +175,6 @@
+@@ -172,8 +175,8 @@ fi
  
  dnl ---Output variables...
  
 -HOST_CC=$CC
- HOST_CFLAGS="$HOST_CFLAGS -O2 -Wall \$(HOST_CPPFLAGS)"
+-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
-Index: mkelfImage/linux-i386/Makefile
-===================================================================
---- mkelfImage.orig/linux-i386/Makefile	2012-07-14 14:04:48.964898667 -0700
-+++ mkelfImage/linux-i386/Makefile	2012-07-14 14:04:49.032898671 -0700
-@@ -4,7 +4,7 @@
+ I386_CFLAGS="$I386_CFLAGS -Os -ffreestanding -Wall -W -Wno-format \$(I386_CPPFLAGS)"
+diff --git a/util/mkelfImage/linux-i386/Makefile b/util/mkelfImage/linux-i386/Makefile
+index 51531d6..7e8aa3c 100644
+--- a/util/mkelfImage/linux-i386/Makefile
++++ b/util/mkelfImage/linux-i386/Makefile
+@@ -4,7 +4,7 @@ LI386_DEP=Makefile Makefile.conf $(LI386_DIR)/Makefile
  
  $(LI386_OBJ)/mkelf-linux-i386.o: $(LI386_DIR)/mkelf-linux-i386.c $(LI386_DIR)/convert.bin.c $(LI386_DEP)
  	$(MKDIR) -p $(@D)
@@ -38,11 +71,11 @@ Index: mkelfImage/linux-i386/Makefile
  
  
  ifdef I386_CC
-Index: mkelfImage/linux-ia64/Makefile
-===================================================================
---- mkelfImage.orig/linux-ia64/Makefile	2012-07-14 14:04:48.964898667 -0700
-+++ mkelfImage/linux-ia64/Makefile	2012-07-14 14:04:49.032898671 -0700
-@@ -4,7 +4,7 @@
+diff --git a/util/mkelfImage/linux-ia64/Makefile b/util/mkelfImage/linux-ia64/Makefile
+index 38f5d8c..5df8870 100644
+--- a/util/mkelfImage/linux-ia64/Makefile
++++ b/util/mkelfImage/linux-ia64/Makefile
+@@ -4,7 +4,7 @@ LIA64_DEP=Makefile Makefile.conf $(LIA64_DIR)/Makefile
  
  $(LIA64_OBJ)/mkelf-linux-ia64.o: $(LIA64_DIR)/mkelf-linux-ia64.c $(LIA64_DIR)/convert.bin.c $(LIA64_DEP)
  	$(MKDIR) -p $(@D)
@@ -51,21 +84,24 @@ Index: mkelfImage/linux-ia64/Makefile
  
  ifdef IA64_CC
  
-Index: mkelfImage/main/Makefile
-===================================================================
---- mkelfImage.orig/main/Makefile	2012-07-14 14:04:48.964898667 -0700
-+++ mkelfImage/main/Makefile	2012-07-14 14:04:49.032898671 -0700
-@@ -4,11 +4,11 @@
+diff --git a/util/mkelfImage/main/Makefile b/util/mkelfImage/main/Makefile
+index 403b0a4..cd53613 100644
+--- a/util/mkelfImage/main/Makefile
++++ b/util/mkelfImage/main/Makefile
+@@ -4,11 +4,11 @@ MKELF_OBJS=$(OBJDIR)/main/mkelfImage.o \
  
  $(OBJDIR)/sbin/mkelfImage: $(MKELF_OBJS) $(DEPS)
  	$(MKDIR) -p $(@D)
 -	$(HOST_CC) $(HOST_CFLAGS) $(MKELF_OBJS) -o $@ $(LIBS)
-+	$(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)
 -	$(HOST_CC) $(HOST_CFLAGS) -c $< -o $@
-+	$(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..d7a4429 100644
--- a/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
+++ b/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
@@ -13,8 +13,8 @@ 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 \
+           "
 SRC_URI_append_class-native = " \
            file://fix-makefile-to-find-libz.patch   \
 "
-- 
2.8.0



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [master][PATCH 0/3] Fix a few recipes to obey LDFLAGS
  2016-05-05 19:30 [master][PATCH 0/3] Fix a few recipes to obey LDFLAGS Christopher Larson
                   ` (2 preceding siblings ...)
  2016-05-05 19:30 ` [master][PATCH 3/3] pong-clock: obey CFLAGS, LDFLAGS Christopher Larson
@ 2016-05-12 18:08 ` Christopher Larson
  3 siblings, 0 replies; 18+ messages in thread
From: Christopher Larson @ 2016-05-12 18:08 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Christopher Larson

[-- Attachment #1: Type: text/plain, Size: 960 bytes --]

On Thu, May 5, 2016 at 12:30 PM, Christopher Larson <kergoth@gmail.com>
wrote:

> From: Christopher Larson <chris_larson@mentor.com>
>
> The following changes since commit
> 1a0e56630c5c27d8899dd0979ae0b86bbe227881:
>
>   utils.bbclass: note for deprecated base_contains (2016-04-29 07:53:58
> +0100)
>
> are available in the git repository at:
>
>   git://github.com/kergoth/openembedded-core more-ldflags-fixes
>   https://github.com/kergoth/openembedded-core/tree/more-ldflags-fixes
>
> Christopher Larson (3):
>   ruby: obey LDFLAGS for the link of libruby
>   mkelfimage: obey LDFLAGS, sort out HOST_ flags
>   pong-clock: obey CFLAGS, LDFLAGS
>

Just a ping to check status on this, as the autobuilder hit at least 2 of
these 3 issues testing the ldflags "poison" patch.
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics

[-- Attachment #2: Type: text/html, Size: 1648 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [master][PATCHv2 2/3] mkelfimage: obey LDFLAGS, sort out HOST_ flags
  2016-05-05 22:59     ` [master][PATCHv2 " Christopher Larson
@ 2016-05-14  6:25       ` Richard Purdie
  2016-05-16 22:37         ` Christopher Larson
  2016-05-20 17:04       ` [PATCHv3] " Christopher Larson
  1 sibling, 1 reply; 18+ messages in thread
From: Richard Purdie @ 2016-05-14  6:25 UTC (permalink / raw)
  To: Christopher Larson, openembedded-core; +Cc: Christopher Larson

On Thu, 2016-05-05 at 15:59 -0700, Christopher Larson wrote:
> From: Christopher Larson <chris_larson@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_larson@mentor.com>
> ---
>  .../mkelfimage/mkelfimage/cross-compile.patch      | 86
> +++++++++++++++-------
>  meta/recipes-devtools/mkelfimage/mkelfimage_git.bb |  4 +-
>  2 files changed, 63 insertions(+), 27 deletions(-)

http://errors.yoctoproject.org/Errors/Details/62910/

Could you check the patch please?

Cheers,

Richard



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [master][PATCHv2 2/3] mkelfimage: obey LDFLAGS, sort out HOST_ flags
  2016-05-14  6:25       ` Richard Purdie
@ 2016-05-16 22:37         ` Christopher Larson
  0 siblings, 0 replies; 18+ messages in thread
From: Christopher Larson @ 2016-05-16 22:37 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 1099 bytes --]

On Fri, May 13, 2016 at 11:25 PM, Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:

> On Thu, 2016-05-05 at 15:59 -0700, Christopher Larson wrote:
> > From: Christopher Larson <chris_larson@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_larson@mentor.com>
> > ---
> >  .../mkelfimage/mkelfimage/cross-compile.patch      | 86
> > +++++++++++++++-------
> >  meta/recipes-devtools/mkelfimage/mkelfimage_git.bb |  4 +-
> >  2 files changed, 63 insertions(+), 27 deletions(-)
>
> http://errors.yoctoproject.org/Errors/Details/62910/
>
> Could you check the patch please?


Looking at this now, sorry for the delay, went from having a sick kid to
being sick myself, the past few days.
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics

[-- Attachment #2: Type: text/html, Size: 1852 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCHv3] mkelfimage: obey LDFLAGS, sort out HOST_ flags
  2016-05-05 22:59     ` [master][PATCHv2 " Christopher Larson
  2016-05-14  6:25       ` Richard Purdie
@ 2016-05-20 17:04       ` Christopher Larson
  2016-05-23  4:52         ` Khem Raj
  1 sibling, 1 reply; 18+ messages in thread
From: Christopher Larson @ 2016-05-20 17:04 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@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_larson@mentor.com>
---

v2 change: fixed patch file paths

 .../mkelfimage/mkelfimage/cross-compile.patch      | 85 +++++++++++++++-------
 meta/recipes-devtools/mkelfimage/mkelfimage_git.bb |  4 +-
 2 files changed, 62 insertions(+), 27 deletions(-)

diff --git a/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch b/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch
index 7692709..2ae9fb5 100644
--- a/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch
+++ b/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch
@@ -1,13 +1,43 @@
-make the tool to be cross compilable.
+From dc2712119d6832e24a9b7bed9ed4ce5ae03ce0a3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 14 Jul 2012 14:14:07 -0700
+Subject: [PATCH] mkelfimage: Fix cross build
+
+Make the tool to be cross compilable, by separating the variables for build
+tools from those for the target. Also modified to obey LDFLAGS.
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+
 Upstream-Status: Pending
 
-Index: mkelfImage/configure.ac
-===================================================================
---- mkelfImage.orig/configure.ac	2012-07-14 14:04:48.964898667 -0700
-+++ mkelfImage/configure.ac	2012-07-14 14:10:47.800916083 -0700
-@@ -70,6 +70,9 @@
+---
+ Makefile.conf.in    | 3 +++
+ configure.ac        | 7 +++++--
+ linux-i386/Makefile | 2 +-
+ linux-ia64/Makefile | 2 +-
+ main/Makefile       | 4 ++--
+ 5 files changed, 12 insertions(+), 6 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 652b952..0f2ac72 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -70,6 +70,9 @@ if test "with_default" != no ; then
  		AC_MSG_ERROR([cc not found])
  	fi
  	eval "${with_default}_CC='$CC'"
@@ -17,19 +47,22 @@ Index: mkelfImage/configure.ac
  	AC_PROG_CPP
  	if test "$CPP" = no; then
  		AC_MSG_ERROR([cpp not found])
-@@ -172,7 +175,6 @@
+@@ -172,8 +175,8 @@ fi
  
  dnl ---Output variables...
  
 -HOST_CC=$CC
- HOST_CFLAGS="$HOST_CFLAGS -O2 -Wall \$(HOST_CPPFLAGS)"
+-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
-Index: mkelfImage/linux-i386/Makefile
-===================================================================
---- mkelfImage.orig/linux-i386/Makefile	2012-07-14 14:04:48.964898667 -0700
-+++ mkelfImage/linux-i386/Makefile	2012-07-14 14:04:49.032898671 -0700
-@@ -4,7 +4,7 @@
+ I386_CFLAGS="$I386_CFLAGS -Os -ffreestanding -Wall -W -Wno-format \$(I386_CPPFLAGS)"
+diff --git a/linux-i386/Makefile b/linux-i386/Makefile
+index 51531d6..7e8aa3c 100644
+--- a/linux-i386/Makefile
++++ b/linux-i386/Makefile
+@@ -4,7 +4,7 @@ LI386_DEP=Makefile Makefile.conf $(LI386_DIR)/Makefile
  
  $(LI386_OBJ)/mkelf-linux-i386.o: $(LI386_DIR)/mkelf-linux-i386.c $(LI386_DIR)/convert.bin.c $(LI386_DEP)
  	$(MKDIR) -p $(@D)
@@ -38,11 +71,11 @@ Index: mkelfImage/linux-i386/Makefile
  
  
  ifdef I386_CC
-Index: mkelfImage/linux-ia64/Makefile
-===================================================================
---- mkelfImage.orig/linux-ia64/Makefile	2012-07-14 14:04:48.964898667 -0700
-+++ mkelfImage/linux-ia64/Makefile	2012-07-14 14:04:49.032898671 -0700
-@@ -4,7 +4,7 @@
+diff --git a/linux-ia64/Makefile b/linux-ia64/Makefile
+index 38f5d8c..5df8870 100644
+--- a/linux-ia64/Makefile
++++ b/linux-ia64/Makefile
+@@ -4,7 +4,7 @@ LIA64_DEP=Makefile Makefile.conf $(LIA64_DIR)/Makefile
  
  $(LIA64_OBJ)/mkelf-linux-ia64.o: $(LIA64_DIR)/mkelf-linux-ia64.c $(LIA64_DIR)/convert.bin.c $(LIA64_DEP)
  	$(MKDIR) -p $(@D)
@@ -51,21 +84,23 @@ Index: mkelfImage/linux-ia64/Makefile
  
  ifdef IA64_CC
  
-Index: mkelfImage/main/Makefile
-===================================================================
---- mkelfImage.orig/main/Makefile	2012-07-14 14:04:48.964898667 -0700
-+++ mkelfImage/main/Makefile	2012-07-14 14:04:49.032898671 -0700
-@@ -4,11 +4,11 @@
+diff --git a/main/Makefile b/main/Makefile
+index 403b0a4..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)
 -	$(HOST_CC) $(HOST_CFLAGS) $(MKELF_OBJS) -o $@ $(LIBS)
-+	$(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)
 -	$(HOST_CC) $(HOST_CFLAGS) -c $< -o $@
-+	$(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..d7a4429 100644
--- a/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
+++ b/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
@@ -13,8 +13,8 @@ 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 \
+           "
 SRC_URI_append_class-native = " \
            file://fix-makefile-to-find-libz.patch   \
 "
-- 
2.8.0



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCHv3] mkelfimage: obey LDFLAGS, sort out HOST_ flags
  2016-05-20 17:04       ` [PATCHv3] " Christopher Larson
@ 2016-05-23  4:52         ` Khem Raj
  2016-05-23 13:31           ` Patrick Ohly
  0 siblings, 1 reply; 18+ messages in thread
From: Khem Raj @ 2016-05-23  4:52 UTC (permalink / raw)
  To: Christopher Larson, openembedded-core; +Cc: Christopher Larson

[-- Attachment #1: Type: text/plain, Size: 7091 bytes --]

I am getting these errors with clang now

http://errors.yoctoproject.org/Errors/Details/64935/

On Fri, May 20, 2016 at 8:04 PM Christopher Larson <kergoth@gmail.com>
wrote:

> From: Christopher Larson <chris_larson@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_larson@mentor.com>
> ---
>
> v2 change: fixed patch file paths
>
>  .../mkelfimage/mkelfimage/cross-compile.patch      | 85
> +++++++++++++++-------
>  meta/recipes-devtools/mkelfimage/mkelfimage_git.bb |  4 +-
>  2 files changed, 62 insertions(+), 27 deletions(-)
>
> diff --git
> a/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch
> b/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch
> index 7692709..2ae9fb5 100644
> --- a/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch
> +++ b/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch
> @@ -1,13 +1,43 @@
> -make the tool to be cross compilable.
> +From dc2712119d6832e24a9b7bed9ed4ce5ae03ce0a3 Mon Sep 17 00:00:00 2001
> +From: Khem Raj <raj.khem@gmail.com>
> +Date: Sat, 14 Jul 2012 14:14:07 -0700
> +Subject: [PATCH] mkelfimage: Fix cross build
> +
> +Make the tool to be cross compilable, by separating the variables for
> build
> +tools from those for the target. Also modified to obey LDFLAGS.
>
>  Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +Signed-off-by: Christopher Larson <chris_larson@mentor.com>
> +
>  Upstream-Status: Pending
>
> -Index: mkelfImage/configure.ac
> -===================================================================
> ---- mkelfImage.orig/configure.ac       2012-07-14 14:04:48.964898667
> -0700
> -+++ mkelfImage/configure.ac    2012-07-14 14:10:47.800916083 -0700
> -@@ -70,6 +70,9 @@
> +---
> + Makefile.conf.in    | 3 +++
> + configure.ac        | 7 +++++--
> + linux-i386/Makefile | 2 +-
> + linux-ia64/Makefile | 2 +-
> + main/Makefile       | 4 ++--
> + 5 files changed, 12 insertions(+), 6 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 652b952..0f2ac72 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -70,6 +70,9 @@ if test "with_default" != no ; then
>                 AC_MSG_ERROR([cc not found])
>         fi
>         eval "${with_default}_CC='$CC'"
> @@ -17,19 +47,22 @@ Index: mkelfImage/configure.ac
>         AC_PROG_CPP
>         if test "$CPP" = no; then
>                 AC_MSG_ERROR([cpp not found])
> -@@ -172,7 +175,6 @@
> +@@ -172,8 +175,8 @@ fi
>
>   dnl ---Output variables...
>
>  -HOST_CC=$CC
> - HOST_CFLAGS="$HOST_CFLAGS -O2 -Wall \$(HOST_CPPFLAGS)"
> +-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
> -Index: mkelfImage/linux-i386/Makefile
> -===================================================================
> ---- mkelfImage.orig/linux-i386/Makefile        2012-07-14
> 14:04:48.964898667 -0700
> -+++ mkelfImage/linux-i386/Makefile     2012-07-14 14:04:49.032898671 -0700
> -@@ -4,7 +4,7 @@
> + I386_CFLAGS="$I386_CFLAGS -Os -ffreestanding -Wall -W -Wno-format
> \$(I386_CPPFLAGS)"
> +diff --git a/linux-i386/Makefile b/linux-i386/Makefile
> +index 51531d6..7e8aa3c 100644
> +--- a/linux-i386/Makefile
> ++++ b/linux-i386/Makefile
> +@@ -4,7 +4,7 @@ LI386_DEP=Makefile Makefile.conf $(LI386_DIR)/Makefile
>
>   $(LI386_OBJ)/mkelf-linux-i386.o: $(LI386_DIR)/mkelf-linux-i386.c
> $(LI386_DIR)/convert.bin.c $(LI386_DEP)
>         $(MKDIR) -p $(@D)
> @@ -38,11 +71,11 @@ Index: mkelfImage/linux-i386/Makefile
>
>
>   ifdef I386_CC
> -Index: mkelfImage/linux-ia64/Makefile
> -===================================================================
> ---- mkelfImage.orig/linux-ia64/Makefile        2012-07-14
> 14:04:48.964898667 -0700
> -+++ mkelfImage/linux-ia64/Makefile     2012-07-14 14:04:49.032898671 -0700
> -@@ -4,7 +4,7 @@
> +diff --git a/linux-ia64/Makefile b/linux-ia64/Makefile
> +index 38f5d8c..5df8870 100644
> +--- a/linux-ia64/Makefile
> ++++ b/linux-ia64/Makefile
> +@@ -4,7 +4,7 @@ LIA64_DEP=Makefile Makefile.conf $(LIA64_DIR)/Makefile
>
>   $(LIA64_OBJ)/mkelf-linux-ia64.o: $(LIA64_DIR)/mkelf-linux-ia64.c
> $(LIA64_DIR)/convert.bin.c $(LIA64_DEP)
>         $(MKDIR) -p $(@D)
> @@ -51,21 +84,23 @@ Index: mkelfImage/linux-ia64/Makefile
>
>   ifdef IA64_CC
>
> -Index: mkelfImage/main/Makefile
> -===================================================================
> ---- mkelfImage.orig/main/Makefile      2012-07-14 14:04:48.964898667 -0700
> -+++ mkelfImage/main/Makefile   2012-07-14 14:04:49.032898671 -0700
> -@@ -4,11 +4,11 @@
> +diff --git a/main/Makefile b/main/Makefile
> +index 403b0a4..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)
>  -      $(HOST_CC) $(HOST_CFLAGS) $(MKELF_OBJS) -o $@ $(LIBS)
> -+      $(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)
>  -      $(HOST_CC) $(HOST_CFLAGS) -c $< -o $@
> -+      $(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..d7a4429 100644
> --- a/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
> +++ b/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
> @@ -13,8 +13,8 @@
> 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 \
> +           "
>  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
>

[-- Attachment #2: Type: text/html, Size: 10097 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCHv3] mkelfimage: obey LDFLAGS, sort out HOST_ flags
  2016-05-23  4:52         ` Khem Raj
@ 2016-05-23 13:31           ` Patrick Ohly
  2016-05-23 19:59             ` Christopher Larson
  2016-05-23 20:01             ` Christopher Larson
  0 siblings, 2 replies; 18+ messages in thread
From: Patrick Ohly @ 2016-05-23 13:31 UTC (permalink / raw)
  To: Khem Raj; +Cc: Christopher Larson, openembedded-core

On Mon, 2016-05-23 at 04:52 +0000, Khem Raj wrote:
> I am getting these errors with clang now
> 
> 
> http://errors.yoctoproject.org/Errors/Details/64935/

And I am getting the same link error also during normal builds for
Beaglebone (but not other platforms):

https://ostroproject.org/jenkins/job/build_beaglebone/1663/console
...
arm-ostro-linux-gnueabi-gcc  -march=armv7-a -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a8 --sysroot=/var/lib/jenkins/ostro-worker-17-slot-1-JopZL/ostro-os/build/tmp-glibc/sysroots/beaglebone -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/var/lib/jenkins/ostro-worker-17-slot-1-JopZL/ostro-os/build/tmp-glibc/work/cortexa8hf-neon-ostro-linux-gnueabi/mkelfimage/4.0+gitAUTOINC+686a48a339-r0=/usr/src/debug/mkelfimage/4.0+gitAUTOINC+686a48a339-r0 -fdebug-prefix-map=/var/lib/jenkins/ostro-worker-17-slot-1-JopZL/ostro-os/build/tmp-glibc/sysroots/x86_64-linux= -fdebug-prefix-map=/var/lib/jenkins/ostro-worker-17-slot-1-JopZL/ostro-os/build/tmp-glibc/sysroots/beaglebone=  -fstack-protector-strong -pie -fpie -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -fno-stack-protector -Wall -DVERSION='"2.7"' -DRELEASE_DATE='"27 March 2006"' -I include -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ZLIB_H=1 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fstack-protector-strong -Wl,-z,relro,-z,now objdir/main/mkelfImage.o objdir/linux-i386/mkelf-linux-i386.o objdir/linux-ia64/mkelf-linux-ia64.o -o objdir/sbin/mkelfImage -lz
/var/lib/jenkins/ostro-worker-17-slot-1-JopZL/ostro-os/build/tmp-glibc/sysroots/x86_64-linux/usr/bin/arm-ostro-linux-gnueabi/../../libexec/arm-ostro-linux-gnueabi/gcc/arm-ostro-linux-gnueabi/5.3.0/ld: objdir/linux-i386/mkelf-linux-i386.o: relocation R_ARM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPIC
objdir/linux-i386/mkelf-linux-i386.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
main/Makefile:6: recipe for target 'objdir/sbin/mkelfImage' failed
...

Reverting the commit fixes that, so can we just do that in OE-core
master while the problem gets sorted out?

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.





^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCHv3] mkelfimage: obey LDFLAGS, sort out HOST_ flags
  2016-05-23 13:31           ` Patrick Ohly
@ 2016-05-23 19:59             ` Christopher Larson
  2016-05-23 20:07               ` Burton, Ross
  2016-05-23 20:01             ` Christopher Larson
  1 sibling, 1 reply; 18+ messages in thread
From: Christopher Larson @ 2016-05-23 19:59 UTC (permalink / raw)
  To: Patrick Ohly; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 3135 bytes --]

On Mon, May 23, 2016 at 6:31 AM, Patrick Ohly <patrick.ohly@intel.com>
wrote:

> On Mon, 2016-05-23 at 04:52 +0000, Khem Raj wrote:
> > I am getting these errors with clang now
> >
> >
> > http://errors.yoctoproject.org/Errors/Details/64935/
>
> And I am getting the same link error also during normal builds for
> Beaglebone (but not other platforms):
>
> https://ostroproject.org/jenkins/job/build_beaglebone/1663/console
> ...
> arm-ostro-linux-gnueabi-gcc  -march=armv7-a -mfpu=neon  -mfloat-abi=hard
> -mcpu=cortex-a8
> --sysroot=/var/lib/jenkins/ostro-worker-17-slot-1-JopZL/ostro-os/build/tmp-glibc/sysroots/beaglebone
> -O2 -pipe -g -feliminate-unused-debug-types
> -fdebug-prefix-map=/var/lib/jenkins/ostro-worker-17-slot-1-JopZL/ostro-os/build/tmp-glibc/work/cortexa8hf-neon-ostro-linux-gnueabi/mkelfimage/4.0+gitAUTOINC+686a48a339-r0=/usr/src/debug/mkelfimage/4.0+gitAUTOINC+686a48a339-r0
> -fdebug-prefix-map=/var/lib/jenkins/ostro-worker-17-slot-1-JopZL/ostro-os/build/tmp-glibc/sysroots/x86_64-linux=
> -fdebug-prefix-map=/var/lib/jenkins/ostro-worker-17-slot-1-JopZL/ostro-os/build/tmp-glibc/sysroots/beaglebone=
> -fstack-protector-strong -pie -fpie -D_FORTIFY_SOURCE=2 -Wformat
> -Wformat-security -Werror=format-security -fno-stack-protector -Wall
> -DVERSION='"2.7"' -DRELEASE_DATE='"27 March 2006"' -I include
> -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
> -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\"
> -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
> -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
> -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ZLIB_H=1 -Wl,-O1
> -Wl,--hash-style=gnu -Wl,--as-needed -fstack-protector-strong
> -Wl,-z,relro,-z,now objdir/main/mkelfImage.o
> objdir/linux-i386/mkelf-linux-i386.o objdir/linux-ia64/mkelf-linux-ia64.o
> -o objdir/sbin/mkelfImage -lz
> /var/lib/jenkins/ostro-worker-17-slot-1-JopZL/ostro-os/build/tmp-glibc/sysroots/x86_64-linux/usr/bin/arm-ostro-linux-gnueabi/../../libexec/arm-ostro-linux-gnueabi/gcc/arm-ostro-linux-gnueabi/5.3.0/ld:
> objdir/linux-i386/mkelf-linux-i386.o: relocation R_ARM_MOVW_ABS_NC against
> `a local symbol' can not be used when making a shared object; recompile
> with -fPIC
> objdir/linux-i386/mkelf-linux-i386.o: error adding symbols: Bad value
> collect2: error: ld returned 1 exit status
> main/Makefile:6: recipe for target 'objdir/sbin/mkelfImage' failed
> ...
>
> Reverting the commit fixes that, so can we just do that in OE-core
> master while the problem gets sorted out?


I'm not opposed to reverting this, as the issue being fixed was clearly not
as bad as this result, but I'm completely unable to repro this for
beaglebone with meta-ti, either with the internal toolchain or the external
sourcery toolchain. Was this with clang, or some specific toolchain
version? Or perhaps ostro is doing something special there?
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics

[-- Attachment #2: Type: text/html, Size: 3855 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCHv3] mkelfimage: obey LDFLAGS, sort out HOST_ flags
  2016-05-23 13:31           ` Patrick Ohly
  2016-05-23 19:59             ` Christopher Larson
@ 2016-05-23 20:01             ` Christopher Larson
  1 sibling, 0 replies; 18+ messages in thread
From: Christopher Larson @ 2016-05-23 20:01 UTC (permalink / raw)
  To: Patrick Ohly; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 2892 bytes --]

On Mon, May 23, 2016 at 6:31 AM, Patrick Ohly <patrick.ohly@intel.com>
wrote:

> On Mon, 2016-05-23 at 04:52 +0000, Khem Raj wrote:
> > I am getting these errors with clang now
> >
> >
> > http://errors.yoctoproject.org/Errors/Details/64935/
>
> And I am getting the same link error also during normal builds for
> Beaglebone (but not other platforms):
>
> https://ostroproject.org/jenkins/job/build_beaglebone/1663/console
> ...
> arm-ostro-linux-gnueabi-gcc  -march=armv7-a -mfpu=neon  -mfloat-abi=hard
> -mcpu=cortex-a8
> --sysroot=/var/lib/jenkins/ostro-worker-17-slot-1-JopZL/ostro-os/build/tmp-glibc/sysroots/beaglebone
> -O2 -pipe -g -feliminate-unused-debug-types
> -fdebug-prefix-map=/var/lib/jenkins/ostro-worker-17-slot-1-JopZL/ostro-os/build/tmp-glibc/work/cortexa8hf-neon-ostro-linux-gnueabi/mkelfimage/4.0+gitAUTOINC+686a48a339-r0=/usr/src/debug/mkelfimage/4.0+gitAUTOINC+686a48a339-r0
> -fdebug-prefix-map=/var/lib/jenkins/ostro-worker-17-slot-1-JopZL/ostro-os/build/tmp-glibc/sysroots/x86_64-linux=
> -fdebug-prefix-map=/var/lib/jenkins/ostro-worker-17-slot-1-JopZL/ostro-os/build/tmp-glibc/sysroots/beaglebone=
> -fstack-protector-strong -pie -fpie -D_FORTIFY_SOURCE=2 -Wformat
> -Wformat-security -Werror=format-security -fno-stack-protector -Wall
> -DVERSION='"2.7"' -DRELEASE_DATE='"27 March 2006"' -I include
> -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
> -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\"
> -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
> -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
> -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ZLIB_H=1 -Wl,-O1
> -Wl,--hash-style=gnu -Wl,--as-needed -fstack-protector-strong
> -Wl,-z,relro,-z,now objdir/main/mkelfImage.o
> objdir/linux-i386/mkelf-linux-i386.o objdir/linux-ia64/mkelf-linux-ia64.o
> -o objdir/sbin/mkelfImage -lz
> /var/lib/jenkins/ostro-worker-17-slot-1-JopZL/ostro-os/build/tmp-glibc/sysroots/x86_64-linux/usr/bin/arm-ostro-linux-gnueabi/../../libexec/arm-ostro-linux-gnueabi/gcc/arm-ostro-linux-gnueabi/5.3.0/ld:
> objdir/linux-i386/mkelf-linux-i386.o: relocation R_ARM_MOVW_ABS_NC against
> `a local symbol' can not be used when making a shared object; recompile
> with -fPIC
> objdir/linux-i386/mkelf-linux-i386.o: error adding symbols: Bad value
> collect2: error: ld returned 1 exit status
> main/Makefile:6: recipe for target 'objdir/sbin/mkelfImage' failed
> ...
>
> Reverting the commit fixes that, so can we just do that in OE-core
> master while the problem gets sorted out?


I'll submit a revert patch to the list for now, unless someone gets to it
sooner. Thanks for the feedback.
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics

[-- Attachment #2: Type: text/html, Size: 3603 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCHv3] mkelfimage: obey LDFLAGS, sort out HOST_ flags
  2016-05-23 19:59             ` Christopher Larson
@ 2016-05-23 20:07               ` Burton, Ross
  2016-05-24 13:49                 ` Khem Raj
  0 siblings, 1 reply; 18+ messages in thread
From: Burton, Ross @ 2016-05-23 20:07 UTC (permalink / raw)
  To: Christopher Larson; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 511 bytes --]

On 23 May 2016 at 20:59, Christopher Larson <kergoth@gmail.com> wrote:

> I'm not opposed to reverting this, as the issue being fixed was clearly
> not as bad as this result, but I'm completely unable to repro this for
> beaglebone with meta-ti, either with the internal toolchain or the external
> sourcery toolchain. Was this with clang, or some specific toolchain
> version? Or perhaps ostro is doing something special there?
>

Ostro enables the security flags, which impacts the linking.

Ross

[-- Attachment #2: Type: text/html, Size: 914 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCHv3] mkelfimage: obey LDFLAGS, sort out HOST_ flags
  2016-05-23 20:07               ` Burton, Ross
@ 2016-05-24 13:49                 ` Khem Raj
  0 siblings, 0 replies; 18+ messages in thread
From: Khem Raj @ 2016-05-24 13:49 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Patches and discussions about the oe-core layer

On Mon, May 23, 2016 at 11:07 PM, Burton, Ross <ross.burton@intel.com> wrote:
>
> On 23 May 2016 at 20:59, Christopher Larson <kergoth@gmail.com> wrote:
>>
>> I'm not opposed to reverting this, as the issue being fixed was clearly
>> not as bad as this result, but I'm completely unable to repro this for
>> beaglebone with meta-ti, either with the internal toolchain or the external
>> sourcery toolchain. Was this with clang, or some specific toolchain version?
>> Or perhaps ostro is doing something special there?
>
>
> Ostro enables the security flags, which impacts the linking.

Same here. All my testing is with security flags enabled.

>
> Ross
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2016-05-24 13:49 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-05 19:30 [master][PATCH 0/3] Fix a few recipes to obey LDFLAGS Christopher Larson
2016-05-05 19:30 ` [master][PATCH 1/3] ruby: obey LDFLAGS for the link of libruby Christopher Larson
2016-05-05 19:30 ` [master][PATCH 2/3] mkelfimage: obey LDFLAGS, sort out HOST_ flags Christopher Larson
2016-05-05 21:54   ` Khem Raj
2016-05-05 22:16     ` Christopher Larson
     [not found]   ` <cover.1462489051.git.chris_larson@mentor.com>
2016-05-05 22:59     ` [master][PATCHv2 " Christopher Larson
2016-05-14  6:25       ` Richard Purdie
2016-05-16 22:37         ` Christopher Larson
2016-05-20 17:04       ` [PATCHv3] " Christopher Larson
2016-05-23  4:52         ` Khem Raj
2016-05-23 13:31           ` Patrick Ohly
2016-05-23 19:59             ` Christopher Larson
2016-05-23 20:07               ` Burton, Ross
2016-05-24 13:49                 ` Khem Raj
2016-05-23 20:01             ` Christopher Larson
2016-05-05 19:30 ` [master][PATCH 3/3] pong-clock: obey CFLAGS, LDFLAGS Christopher Larson
2016-05-05 22:30   ` Khem Raj
2016-05-12 18:08 ` [master][PATCH 0/3] Fix a few recipes to obey LDFLAGS Christopher Larson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.