Skip to contentSkip to conversation

Fix a few recipes to obey LDFLAGS

PATCH In review Christopher Larson 6 participants 18 messages May 5, 2016 – May 24, 2016

lore
Share & tools
lore
#0 lore raw

cover Fix a few recipes to obey LDFLAGS

From: Christopher Larson <[email protected]>

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
Signature · 1 line
2.8.0
#1 lore raw

PATCH 1/3 ruby: obey LDFLAGS for the link of libruby

From: Christopher Larson <[email protected]>

---
 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
meta/recipes-devtools/ruby/ruby.inc +2 -1
index 313e752..fde67e9 100644
@@ -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
 
meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch new file +28 -0
new file mode 100644
index 0000000..b0114ba
@@ -0,0 +1,28 @@
+Upstream-Status: Pending
+
+From 306e95a9818d39d3349075aac9609e062b0f19ce Mon Sep 17 00:00:00 2001
+From: Christopher Larson <[email protected]>
+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 <[email protected]>
+---
+ 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
+
Signature · 1 line
2.8.0
#2 lore raw

PATCH 2/3 mkelfimage: obey LDFLAGS, sort out HOST_ flags

From: Christopher Larson <[email protected]>

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.

---
 ...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
meta/recipes-devtools/mkelfimage/mkelfimage/0002-Sort-out-HOST_-vs-non-HOST_-flags-and-obey-LDFLAGS.patch new file +73 -0
new file mode 100644
index 0000000..8139edc
@@ -0,0 +1,73 @@
+Upstream-Status: Pending
+
+From ef21bb404cb5dbfbaa95b693c9705da2fd7e7472 Mon Sep 17 00:00:00 2001
+From: Christopher Larson <[email protected]>
+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 <[email protected]>
+---
+ 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
+
meta/recipes-devtools/mkelfimage/mkelfimage_git.bb +3 -2
index 92435cd..9fcccb4 100644
@@ -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   \
 "
Signature · 1 line
2.8.0
#3 lore raw

Re: [master][PATCH 2/3] mkelfimage: obey LDFLAGS, sort out HOST_ flags

Quoted 6 lines · Christopher Larson

From: Christopher Larson <[email protected]>

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 ?

Quoted 110 lines
---
 ...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
meta/recipes-devtools/mkelfimage/mkelfimage/0002-Sort-out-HOST_-vs-non-HOST_-flags-and-obey-LDFLAGS.patch new file +73 -0
new file mode 100644
index 0000000..8139edc
@@ -0,0 +1,73 @@
+Upstream-Status: Pending
+
+From ef21bb404cb5dbfbaa95b693c9705da2fd7e7472 Mon Sep 17 00:00:00 2001
+From: Christopher Larson <[email protected]>
+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 <[email protected]>
+---
+ 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
+
meta/recipes-devtools/mkelfimage/mkelfimage_git.bb +3 -3
index 92435cd..9fcccb4 100644
@@ -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
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#4 lore raw

Re: [master][PATCH 2/3] mkelfimage: obey LDFLAGS, sort out HOST_ flags

Quoted 4 lines · Khem Raj
Quoted 2 lines · Christopher Larson

From: Christopher Larson <[email protected]>

Quoted 8 lines
Quoted 1 line

We weren't consistent in the HOST_ (aka BUILD_) and non-HOST_ flags, so

we

Quoted 1 line

were using BUILD_CPPFLAGS to compile target stuff, for example. Sort

that out,

Quoted 2 lines

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.

Signature · 5 lines
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
#5 lore raw

PATCH v2 2/3 mkelfimage: obey LDFLAGS, sort out HOST_ flags

In reply to Christopher Larson

From: Christopher Larson <[email protected]>

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.

---
 .../mkelfimage/mkelfimage/cross-compile.patch      | 86 +++++++++++++++-------
 meta/recipes-devtools/mkelfimage/mkelfimage_git.bb |  4 +-
 2 files changed, 63 insertions(+), 27 deletions(-)
meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch +61 -25
index 7692709..2ae4b61 100644
@@ -1,13 +1,43 @@
-make the tool to be cross compilable.
+From dc2712119d6832e24a9b7bed9ed4ce5ae03ce0a3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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 <[email protected]>
+Signed-off-by: Christopher Larson <[email protected]>
+
 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
+
meta/recipes-devtools/mkelfimage/mkelfimage_git.bb +2 -2
index 92435cd..d7a4429 100644
@@ -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   \
 "
Signature · 1 line
2.8.0
#6 lore raw

Re: [master][PATCHv2 2/3] mkelfimage: obey LDFLAGS, sort out HOST_ flags

Quoted 8 lines · Christopher Larson

From: Christopher Larson <[email protected]>

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.

Quoted 6 lines
---
 .../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

#7 lore raw

Re: [master][PATCHv2 2/3] mkelfimage: obey LDFLAGS, sort out HOST_ flags

Quoted 16 lines · Richard Purdie
Quoted 8 lines · Christopher Larson

From: Christopher Larson <[email protected]>

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.

Quoted 6 lines
---
 .../mkelfimage/mkelfimage/cross-compile.patch      | 86
+++++++++++++++-------
 meta/recipes-devtools/mkelfimage/mkelfimage_git.bb |  4 +-
 2 files changed, 63 insertions(+), 27 deletions(-)
Quoted 3 lines

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.

Signature · 5 lines
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
#8 lore raw

PATCH v3 1/1 mkelfimage: obey LDFLAGS, sort out HOST_ flags

In reply to Christopher Larson

From: Christopher Larson <[email protected]>

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.

---

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(-)
meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch +60 -25
index 7692709..2ae9fb5 100644
@@ -1,13 +1,43 @@
-make the tool to be cross compilable.
+From dc2712119d6832e24a9b7bed9ed4ce5ae03ce0a3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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 <[email protected]>
+Signed-off-by: Christopher Larson <[email protected]>
+
 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
meta/recipes-devtools/mkelfimage/mkelfimage_git.bb +2 -2
index 92435cd..d7a4429 100644
@@ -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   \
 "
Signature · 1 line
2.8.0
#9 lore raw

Re: [PATCHv3] mkelfimage: obey LDFLAGS, sort out HOST_ flags

I am getting these errors with clang now

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

Quoted 186 lines · Christopher Larson

From: Christopher Larson <[email protected]>

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.

---

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

meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch +6 -1
@@ -1,13 +1,43 @@
-make the tool to be cross compilable.
+From dc2712119d6832e24a9b7bed9ed4ce5ae03ce0a3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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

meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch +34 -8
+tools from those for the target. Also modified to obey LDFLAGS.
 
 Signed-off-by: Khem Raj <[email protected]>
+Signed-off-by: Christopher Larson <[email protected]>
+
 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)"

meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch +5 -0
+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)
meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch +0 -3
@@ -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 @@

meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch +5 -0
+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)
meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch +9 -7
@@ -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
meta/recipes-devtools/mkelfimage/mkelfimage_git.bb +0 -0
index 92435cd..d7a4429 100644
@@ -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 \

meta/recipes-devtools/mkelfimage/mkelfimage_git.bb +2 -3
-           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
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#10 lore raw

Re: [PATCHv3] mkelfimage: obey LDFLAGS, sort out HOST_ flags

Quoted 4 lines · Khem Raj

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?

Signature · 6 lines
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.
#11 lore raw

Re: [PATCHv3] mkelfimage: obey LDFLAGS, sort out HOST_ flags

Quoted 39 lines · Patrick Ohly
Quoted 4 lines · Khem Raj

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

(quoted diff) +0 -16
-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
...

Quoted 2 lines

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?

Signature · 5 lines
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
#12 lore raw

Re: [PATCHv3] mkelfimage: obey LDFLAGS, sort out HOST_ flags

Quoted 6 lines · Christopher Larson

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

#13 lore raw

Re: [PATCHv3] mkelfimage: obey LDFLAGS, sort out HOST_ flags

Quoted 11 lines · Ross
Quoted 6 lines · Christopher Larson

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.

Quoted 9 lines

Ross

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#14 lore raw

Re: [PATCHv3] mkelfimage: obey LDFLAGS, sort out HOST_ flags

In reply to Patrick Ohly
Quoted 39 lines · Patrick Ohly
Quoted 4 lines · Khem Raj

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

(quoted diff) +0 -16
-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
...

Quoted 2 lines

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.

Signature · 5 lines
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
#15 lore raw

PATCH 3/3 pong-clock: obey CFLAGS, LDFLAGS

In reply to Christopher Larson

From: Christopher Larson <[email protected]>

---
 meta/recipes-graphics/pong-clock/pong-clock_1.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/pong-clock/pong-clock_1.0.bb +1 -1
index 0e1a792..6c3bcd8 100644
@@ -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 () {
Signature · 1 line
2.8.0
#16 lore raw

Re: [master][PATCH 3/3] pong-clock: obey CFLAGS, LDFLAGS

Quoted 18 lines · Christopher Larson

From: Christopher Larson <[email protected]>

---
meta/recipes-graphics/pong-clock/pong-clock_1.0.bb | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/pong-clock/pong-clock_1.0.bb +0 -0
index 0e1a792..6c3bcd8 100644
@@ -13,7 +13,7 @@ LIC_FILES_CHKSUM = "file://pong-clock-no-flicker.c;beginline=1;endline=23;md5=dd

S = "${WORKDIR}"

do_compile () {

meta/recipes-graphics/pong-clock/pong-clock_1.0.bb

Quoted 2 lines
meta/recipes-graphics/pong-clock/pong-clock_1.0.bb +1 -1
-	${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.

Quoted 11 lines

}

do_install () {
--
2.8.0

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#17 lore raw
In reply to Christopher Larson
Quoted 10 lines · Christopher Larson

From: Christopher Larson <[email protected]>

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:

Quoted 8 lines

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.

Signature · 5 lines
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics