All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Fixes for eglibc parallel build and elfutils on uclibc
@ 2011-05-24 19:18 Khem Raj
  2011-05-24 19:18 ` [PATCH 1/2] elfutils_0.148.bb: Fix compilation " Khem Raj
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Khem Raj @ 2011-05-24 19:18 UTC (permalink / raw)
  To: OE core

This patchset addresses the issue Saul ran into with do_install on eglibc
second patch is to get elfutils compile partially for uclibc, the reason is that
it also provides libelf which is needed by other packages such as gcc 4.5
to build. So either we add a new recipe for just providing libelf and add
magic to chose which one to use or we make elfutils to not build everything
but only elfutils when doing it for uclibc. I chose the second aproach


The following changes since commit d33ada10fdcc830f11dc47bd55f529157d1d280b:

  elfutils_0.148.bb: Fix compilation on uclibc (2011-05-24 12:06:30 -0700)

are available in the git repository at:
  git@git.openembedded.org:openembedded-core-contrib.git kraj/misc-fixes
  http://cgit.openembedded.org/cgit.cgi//log/?h=kraj/misc-fixes

Khem Raj (2):
  elfutils_0.148.bb: Fix compilation on uclibc
  eglibc.inc: Transfer PARALLEL_MAKE to PARALLELMFLAGS

 meta/recipes-core/eglibc/eglibc.inc                |    6 ++
 .../elfutils/elfutils-0.148/uclibc-support.patch   |   91 ++++++++++++++++++++
 meta/recipes-devtools/elfutils/elfutils_0.148.bb   |   15 +++-
 3 files changed, 109 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.148/uclibc-support.patch

-- 
1.7.4.1




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

* [PATCH 1/2] elfutils_0.148.bb: Fix compilation on uclibc
  2011-05-24 19:18 [PATCH 0/2] Fixes for eglibc parallel build and elfutils on uclibc Khem Raj
@ 2011-05-24 19:18 ` Khem Raj
  2011-05-24 19:18 ` [PATCH V2 2/2] eglibc.inc: Transfer PARALLEL_MAKE to PARALLELMFLAGS Khem Raj
  2011-05-25 17:21 ` [PATCH 0/2] Fixes for eglibc parallel build and elfutils on uclibc Saul Wold
  2 siblings, 0 replies; 5+ messages in thread
From: Khem Raj @ 2011-05-24 19:18 UTC (permalink / raw)
  To: OE core

Currently all components of elfutils dont compile with uclibc
but elfutils is one part which is needed by other recipes e.g.
gcc 4.5 to compile. we make adjustments so that when compiling
for uclibc targets it _only_ builds and packages libelf

use --enable-uclibc only when building for uclibc targets

The supporting patch is also needed for compiling with uclibc
to specify -lintl and -luargp on linker commandline

Add missing inherit on gettext

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../elfutils/elfutils-0.148/uclibc-support.patch   |   91 ++++++++++++++++++++
 meta/recipes-devtools/elfutils/elfutils_0.148.bb   |   15 +++-
 2 files changed, 103 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.148/uclibc-support.patch

diff --git a/meta/recipes-devtools/elfutils/elfutils-0.148/uclibc-support.patch b/meta/recipes-devtools/elfutils/elfutils-0.148/uclibc-support.patch
new file mode 100644
index 0000000..3cf16ac
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/elfutils-0.148/uclibc-support.patch
@@ -0,0 +1,91 @@
+on uclibc systems libintl and libuargp are separate from libc.
+so they need to be specified on commandline when we use proxy-libintl
+then libintl is a static archive so it should be listed last since
+elfutils does not respect disable-nls we need to link in libintl
+
+We add a new option --enable-uclibc which will be used to control
+the uclibc specific configurations during build.
+
+Signed-off-by: Khem Raj <raj.khem>
+
+Upstream-Status: Inappropriate [uclibc specific]
+
+Index: elfutils-0.148/configure.ac
+===================================================================
+--- elfutils-0.148.orig/configure.ac
++++ elfutils-0.148/configure.ac
+@@ -55,9 +55,16 @@ AS_IF([test "$use_locks" = yes], [AC_DEF
+ 
+ AH_TEMPLATE([USE_LOCKS], [Defined if libraries should be thread-safe.])
+ 
++AC_ARG_ENABLE([uclibc],
++AS_HELP_STRING([--enable-uclibc], [Use uclibc for system libraries]),
++use_uclibc=yes, use_uclibc=no)
++AM_CONDITIONAL(USE_UCLIBC, test "$use_uclibc" = yes)
++AS_IF([test "$use_uclibc" = yes], [AC_DEFINE(USE_UCLIBC)])
++
++AH_TEMPLATE([USE_UCLIBC], [Defined if uclibc libraries are used.])
++
+ dnl Add all the languages for which translations are available.
+ ALL_LINGUAS=
+-
+ AC_PROG_CC
+ AC_PROG_RANLIB
+ AC_PROG_YACC
+Index: elfutils-0.148/libelf/Makefile.am
+===================================================================
+--- elfutils-0.148.orig/libelf/Makefile.am
++++ elfutils-0.148/libelf/Makefile.am
+@@ -93,7 +93,12 @@ if !MUDFLAP
+ libelf_pic_a_SOURCES =
+ am_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os)
+ 
++
+ libelf_so_LDLIBS =
++if USE_UCLIBC
++libelf_so_LDLIBS += -lintl -luargp
++endif
++
+ if USE_LOCKS
+ libelf_so_LDLIBS += -lpthread
+ endif
+Index: elfutils-0.148/libdw/Makefile.am
+===================================================================
+--- elfutils-0.148.orig/libdw/Makefile.am
++++ elfutils-0.148/libdw/Makefile.am
+@@ -98,6 +98,11 @@ if !MUDFLAP
+ libdw_pic_a_SOURCES =
+ am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os)
+ 
++libdw_so_LDLIBS =
++if USE_UCLIBC
++libdw_so_LDLIBS += -lintl -luargp
++endif
++
+ libdw_so_SOURCES =
+ libdw.so: $(srcdir)/libdw.map libdw_pic.a \
+ 	  ../libdwfl/libdwfl_pic.a ../libebl/libebl.a \
+@@ -108,7 +113,7 @@ libdw.so: $(srcdir)/libdw.map libdw_pic.
+ 		-Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
+ 		-Wl,--version-script,$<,--no-undefined \
+ 		-Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
+-		-ldl $(zip_LIBS)
++		-ldl $(zip_LIBS) $(libdw_so_LDLIBS)
+ 	if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi
+ 	ln -fs $@ $@.$(VERSION)
+ 
+Index: elfutils-0.148/libcpu/Makefile.am
+===================================================================
+--- elfutils-0.148.orig/libcpu/Makefile.am
++++ elfutils-0.148/libcpu/Makefile.am
+@@ -63,6 +63,10 @@ i386_parse_CFLAGS = -DNMNES="`wc -l < i3
+ i386_lex.o: i386_parse.h
+ i386_gendis_LDADD = $(libeu) -lm $(libmudflap)
+ 
++if USE_UCLIBC
++i386_gendis_LDADD += -luargp -lintl
++endif
++
+ i386_parse.h: i386_parse.c ;
+ 
+ noinst_HEADERS = memory-access.h i386_parse.h i386_data.h
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.148.bb b/meta/recipes-devtools/elfutils/elfutils_0.148.bb
index df933f6..115ff9b 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.148.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.148.bb
@@ -30,6 +30,9 @@ SRC_URI += "\
 	file://remove-unused.patch \
 	file://mempcpy.patch \
 "
+# Only apply when building uclibc based target recipe
+SRC_URI_append_libc-uclibc = " ${@['', 'file://uclibc-support.patch']['${PN}' == '${BPN}']}"
+
 # The buildsystem wants to generate 2 .h files from source using a binary it just built,
 # which can not pass the cross compiling, so let's work around it by adding 2 .h files
 # along with the do_configure_prepend()
@@ -38,9 +41,10 @@ SRC_URI += "\
         file://i386_dis.h \
         file://x86_64_dis.h \
 "
-inherit autotools
+inherit autotools gettext
 
 EXTRA_OECONF = "--program-prefix=eu-"
+EXTRA_OECONF_append_libc-uclibc = " ${@['', '--enable-uclibc']['${PN}' == '${BPN}']}"
 
 do_configure_prepend() {
 	sed -i 's:./i386_gendis:echo\ \#:g' ${S}/libcpu/Makefile.am
@@ -48,8 +52,13 @@ do_configure_prepend() {
 	cp ${WORKDIR}/*dis.h ${S}/libcpu
 }
 
-# Only append ldflags for target recipe
-TARGET_LDFLAGS_libc-uclibc += "${@['', '-lintl -luargp']['${PN}' == '${BPN}']}"
+# we can not build complete elfutils when using uclibc
+# but some recipes e.g. gcc 4.5 depends on libelf so we
+# build only libelf for uclibc case
+
+EXTRA_OEMAKE_libc-uclibc = "-C libelf"
+EXTRA_OEMAKE_virtclass-native = ""
+EXTRA_OEMAKE_virtclass-nativesdk = ""
 
 BBCLASSEXTEND = "native nativesdk"
 
-- 
1.7.4.1




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

* [PATCH V2 2/2] eglibc.inc: Transfer PARALLEL_MAKE to PARALLELMFLAGS
  2011-05-24 19:18 [PATCH 0/2] Fixes for eglibc parallel build and elfutils on uclibc Khem Raj
  2011-05-24 19:18 ` [PATCH 1/2] elfutils_0.148.bb: Fix compilation " Khem Raj
@ 2011-05-24 19:18 ` Khem Raj
  2011-05-24 20:41   ` Khem Raj
  2011-05-25 17:21 ` [PATCH 0/2] Fixes for eglibc parallel build and elfutils on uclibc Saul Wold
  2 siblings, 1 reply; 5+ messages in thread
From: Khem Raj @ 2011-05-24 19:18 UTC (permalink / raw)
  To: OE core

* Currently we are passing -jN or -j N flags to eglibc makefiles
  however eglibc uses a make variable called PARALLELMFLAGS
  to pass information about parallel build to sub-makes

* Currently make install ran without parallelism but now
  it should have parallel building flags passed to do_install
  correctly which inturn should improve build time of
  eglibc on systems using parallel build -j with values > 1

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-core/eglibc/eglibc.inc |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/meta/recipes-core/eglibc/eglibc.inc b/meta/recipes-core/eglibc/eglibc.inc
index 8314cb1..46ffa82 100644
--- a/meta/recipes-core/eglibc/eglibc.inc
+++ b/meta/recipes-core/eglibc/eglibc.inc
@@ -36,4 +36,10 @@ INHIBIT_DEFAULT_DEPS = "1"
 
 ARM_INSTRUCTION_SET = "arm"
 
+# eglibc uses PARALLELMFLAGS variable to pass parallel build info so transfer
+# PARALLEL_MAKE into PARALLELMFLAGS and empty out PARALLEL_MAKE
+EGLIBCPARALLELISM := "PARALLELMFLAGS="${PARALLEL_MAKE}""
+EXTRA_OEMAKE += ${EGLIBCPARALLELISM}
+PARALLEL_MAKE = ""
+
 PACKAGES = "glibc catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-doc glibc-locale libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile"
-- 
1.7.4.1




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

* Re: [PATCH V2 2/2] eglibc.inc: Transfer PARALLEL_MAKE to PARALLELMFLAGS
  2011-05-24 19:18 ` [PATCH V2 2/2] eglibc.inc: Transfer PARALLEL_MAKE to PARALLELMFLAGS Khem Raj
@ 2011-05-24 20:41   ` Khem Raj
  0 siblings, 0 replies; 5+ messages in thread
From: Khem Raj @ 2011-05-24 20:41 UTC (permalink / raw)
  To: OE core

On (24/05/11 12:18), Khem Raj wrote:
> * Currently we are passing -jN or -j N flags to eglibc makefiles
>   however eglibc uses a make variable called PARALLELMFLAGS
>   to pass information about parallel build to sub-makes
> 
> * Currently make install ran without parallelism but now
>   it should have parallel building flags passed to do_install
>   correctly which inturn should improve build time of
>   eglibc on systems using parallel build -j with values > 1

I forgot to attach the times of do_compile+do_install using -j 2

with patch

real    11m11.557s
user    11m27.270s
sys     2m54.000s

without patch

real    12m39.788s
user    11m36.850s
sys     3m14.310s

> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  meta/recipes-core/eglibc/eglibc.inc |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/meta/recipes-core/eglibc/eglibc.inc b/meta/recipes-core/eglibc/eglibc.inc
> index 8314cb1..46ffa82 100644
> --- a/meta/recipes-core/eglibc/eglibc.inc
> +++ b/meta/recipes-core/eglibc/eglibc.inc
> @@ -36,4 +36,10 @@ INHIBIT_DEFAULT_DEPS = "1"
>  
>  ARM_INSTRUCTION_SET = "arm"
>  
> +# eglibc uses PARALLELMFLAGS variable to pass parallel build info so transfer
> +# PARALLEL_MAKE into PARALLELMFLAGS and empty out PARALLEL_MAKE
> +EGLIBCPARALLELISM := "PARALLELMFLAGS="${PARALLEL_MAKE}""
> +EXTRA_OEMAKE += ${EGLIBCPARALLELISM}
> +PARALLEL_MAKE = ""
> +
>  PACKAGES = "glibc catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-doc glibc-locale libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile"
> -- 
> 1.7.4.1
> 

-- 
-Khem



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

* Re: [PATCH 0/2] Fixes for eglibc parallel build and elfutils on uclibc
  2011-05-24 19:18 [PATCH 0/2] Fixes for eglibc parallel build and elfutils on uclibc Khem Raj
  2011-05-24 19:18 ` [PATCH 1/2] elfutils_0.148.bb: Fix compilation " Khem Raj
  2011-05-24 19:18 ` [PATCH V2 2/2] eglibc.inc: Transfer PARALLEL_MAKE to PARALLELMFLAGS Khem Raj
@ 2011-05-25 17:21 ` Saul Wold
  2 siblings, 0 replies; 5+ messages in thread
From: Saul Wold @ 2011-05-25 17:21 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On 05/24/2011 12:18 PM, Khem Raj wrote:
> This patchset addresses the issue Saul ran into with do_install on eglibc
> second patch is to get elfutils compile partially for uclibc, the reason is that
> it also provides libelf which is needed by other packages such as gcc 4.5
> to build. So either we add a new recipe for just providing libelf and add
> magic to chose which one to use or we make elfutils to not build everything
> but only elfutils when doing it for uclibc. I chose the second aproach
>
>
> The following changes since commit d33ada10fdcc830f11dc47bd55f529157d1d280b:
>
>    elfutils_0.148.bb: Fix compilation on uclibc (2011-05-24 12:06:30 -0700)
>
> are available in the git repository at:
>    git@git.openembedded.org:openembedded-core-contrib.git kraj/misc-fixes
>    http://cgit.openembedded.org/cgit.cgi//log/?h=kraj/misc-fixes
>
> Khem Raj (2):
>    elfutils_0.148.bb: Fix compilation on uclibc
>    eglibc.inc: Transfer PARALLEL_MAKE to PARALLELMFLAGS
>
>   meta/recipes-core/eglibc/eglibc.inc                |    6 ++
>   .../elfutils/elfutils-0.148/uclibc-support.patch   |   91 ++++++++++++++++++++
>   meta/recipes-devtools/elfutils/elfutils_0.148.bb   |   15 +++-
>   3 files changed, 109 insertions(+), 3 deletions(-)
>   create mode 100644 meta/recipes-devtools/elfutils/elfutils-0.148/uclibc-support.patch
>
Fixed version merged into OE-Core

Thanks
	Sau!




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

end of thread, other threads:[~2011-05-25 17:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-24 19:18 [PATCH 0/2] Fixes for eglibc parallel build and elfutils on uclibc Khem Raj
2011-05-24 19:18 ` [PATCH 1/2] elfutils_0.148.bb: Fix compilation " Khem Raj
2011-05-24 19:18 ` [PATCH V2 2/2] eglibc.inc: Transfer PARALLEL_MAKE to PARALLELMFLAGS Khem Raj
2011-05-24 20:41   ` Khem Raj
2011-05-25 17:21 ` [PATCH 0/2] Fixes for eglibc parallel build and elfutils on uclibc Saul Wold

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.