Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 350478 Details for
Bug 470884
dev-libs/elfutils: build fails on uclibc
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Check if argp is provided by libc or is standalone
0002-Link-against-standalone-argp-library.patch (text/plain), 7.42 KB, created by
Anthony Basile
on 2013-06-09 01:29:32 UTC
(
hide
)
Description:
Check if argp is provided by libc or is standalone
Filename:
MIME Type:
Creator:
Anthony Basile
Created:
2013-06-09 01:29:32 UTC
Size:
7.42 KB
patch
obsolete
>From ed101c726caeeb8d6040dc0477333ec80ad63686 Mon Sep 17 00:00:00 2001 >From: "Anthony G. Basile" <blueness@gentoo.org> >Date: Sat, 8 Jun 2013 18:54:03 -0400 >Subject: [PATCH 2/6] Link against standalone argp library > >argp is not part of POSIX standards and not provided by uClibc or >some other standard C libraries. However, it is possible to link >against a breakout argp library. One is provided at > > http://www.lysator.liu.se/~nisse/misc/ > >This patch tests if libc provides argp otherwise it adds the linker >flag -largp where needed in the build system. > >Signed-off-by: Anthony G. Basile <blueness@gentoo.org> >--- > configure.ac | 26 ++++++++++++++++++++++++++ > libdw/Makefile.am | 2 +- > src/Makefile.am | 28 ++++++++++++++-------------- > tests/Makefile.am | 20 ++++++++++---------- > 4 files changed, 51 insertions(+), 25 deletions(-) > >diff --git a/configure.ac b/configure.ac >index 2a6b858..9d41918 100644 >--- a/configure.ac >+++ b/configure.ac >@@ -233,6 +233,32 @@ AC_CHECK_LIB([stdc++], [__cxa_demangle], [dnl > AC_DEFINE([USE_DEMANGLE], [1], [Defined if demangling is enabled])]) > AM_CONDITIONAL(DEMANGLE, test "$ac_cv_lib_stdcpp___cxa_demangle" = yes) > >+dnl Check if we have argp available from our libc >+AC_LINK_IFELSE( >+ [AC_LANG_PROGRAM( >+ [#include <argp.h>], >+ [int argc=1; char *argv[]={"test"}; argp_parse(0,argc,argv,0,0,0); return 0;] >+ )], >+ [libc_has_argp="true"], >+ [libc_has_argp="false"] >+) >+ >+dnl If our libc doesn't provide argp, then test for libargp >+if test "$libc_has_argp" = "false" ; then >+ AC_MSG_WARN("libc does not have argp") >+ AC_CHECK_LIB([argp], [argp_parse], [have_argp="true"], [have_argp="false"]) >+ >+ if test "$have_argp" = "false"; then >+ AC_MSG_ERROR("no libargp found") >+ else >+ argp_LDADD="-largp" >+ fi >+else >+ argp_LDADD="" >+fi >+AC_SUBST([argp_LDADD]) >+ >+ > dnl Check for __mempcpy > AC_CHECK_FUNCS_ONCE([__mempcpy]) > >diff --git a/libdw/Makefile.am b/libdw/Makefile.am >index 71a006f..46f89c1 100644 >--- a/libdw/Makefile.am >+++ b/libdw/Makefile.am >@@ -111,7 +111,7 @@ libdw.so: $(srcdir)/libdw.map libdw_pic.a \ > -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \ > -Wl,--version-script,$<,--no-undefined \ > -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\ >- -ldl $(zip_LIBS) >+ -ldl $(argp_LDADD) $(zip_LIBS) > if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi > ln -fs $@ $@.$(VERSION) > >diff --git a/src/Makefile.am b/src/Makefile.am >index 674846d..b1bf306 100644 >--- a/src/Makefile.am >+++ b/src/Makefile.am >@@ -95,26 +95,26 @@ addr2line_no_Wformat = yes > # XXX While the file is not finished, don't warn about this > ldgeneric_no_Wunused = yes > >-readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl >-nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl \ >+readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) $(argp_LDADD) -ldl >+nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) $(argp_LDADD) -ldl \ > $(demanglelib) >-size_LDADD = $(libelf) $(libeu) $(libmudflap) >-strip_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl >-ld_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl >+size_LDADD = $(libelf) $(libeu) $(libmudflap) $(argp_LDADD) >+strip_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) $(argp_LDADD) -ldl >+ld_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) $(argp_LDADD) -ldl > if NATIVE_LD > # -ldl is always needed for libebl. > ld_LDADD += libld_elf.a > endif > ld_LDFLAGS = -rdynamic >-elflint_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl >-findtextrel_LDADD = $(libdw) $(libelf) $(libmudflap) >-addr2line_LDADD = $(libdw) $(libelf) $(libmudflap) >-elfcmp_LDADD = $(libebl) $(libelf) $(libmudflap) -ldl >-objdump_LDADD = $(libasm) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl >-ranlib_LDADD = libar.a $(libelf) $(libeu) $(libmudflap) >-strings_LDADD = $(libelf) $(libeu) $(libmudflap) >-ar_LDADD = libar.a $(libelf) $(libeu) $(libmudflap) >-unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(libmudflap) -ldl >+elflint_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) $(argp_LDADD) -ldl >+findtextrel_LDADD = $(libdw) $(libelf) $(libmudflap) $(argp_LDADD) >+addr2line_LDADD = $(libdw) $(libelf) $(libmudflap) $(argp_LDADD) >+elfcmp_LDADD = $(libebl) $(libelf) $(libmudflap) $(argp_LDADD) -ldl >+objdump_LDADD = $(libasm) $(libebl) $(libelf) $(libeu) $(libmudflap) $(argp_LDADD) -ldl >+ranlib_LDADD = libar.a $(libelf) $(libeu) $(libmudflap) $(argp_LDADD) >+strings_LDADD = $(libelf) $(libeu) $(libmudflap) $(argp_LDADD) >+ar_LDADD = libar.a $(libelf) $(libeu) $(libmudflap) $(argp_LDADD) >+unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(libmudflap) $(argp_LDADD) -ldl > > ldlex.o: ldscript.c > ldlex_no_Werror = yes >diff --git a/tests/Makefile.am b/tests/Makefile.am >index 2d819c5..58cb1bd 100644 >--- a/tests/Makefile.am >+++ b/tests/Makefile.am >@@ -288,12 +288,12 @@ get_files_LDADD = $(libdw) $(libelf) $(libmudflap) > get_aranges_LDADD = $(libdw) $(libelf) $(libmudflap) > allfcts_LDADD = $(libdw) $(libelf) $(libmudflap) > line2addr_no_Wformat = yes >-line2addr_LDADD = $(libdw) $(libmudflap) >-addrscopes_LDADD = $(libdw) $(libmudflap) >-funcscopes_LDADD = $(libdw) $(libmudflap) >-funcretval_LDADD = $(libdw) $(libmudflap) >-allregs_LDADD = $(libdw) $(libmudflap) >-find_prologues_LDADD = $(libdw) $(libmudflap) >+line2addr_LDADD = $(libdw) $(libmudflap) $(argp_LDADD) >+addrscopes_LDADD = $(libdw) $(libmudflap) $(argp_LDADD) >+funcscopes_LDADD = $(libdw) $(libmudflap) $(argp_LDADD) >+funcretval_LDADD = $(libdw) $(libmudflap) $(argp_LDADD) >+allregs_LDADD = $(libdw) $(libmudflap) $(argp_LDADD) >+find_prologues_LDADD = $(libdw) $(libmudflap) $(argp_LDADD) > #show_ciefde_LDADD = ../libdwarf/libdwarf.so $(libelf) $(libmudflap) > asm_tst1_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl > asm_tst2_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl >@@ -304,23 +304,23 @@ asm_tst6_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl > asm_tst7_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl > asm_tst8_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl > asm_tst9_LDADD = $(libasm) $(libebl) $(libelf) $(libmudflap) -ldl >-dwflmodtest_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl >+dwflmodtest_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) $(argp_LDADD) -ldl > rdwrmmap_LDADD = $(libelf) $(libmudflap) > dwfl_bug_addr_overflow_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl > arls_LDADD = $(libelf) $(libmudflap) > dwfl_bug_fd_leak_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl > dwfl_bug_report_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl > dwfl_bug_getmodules_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl >-dwfl_addr_sect_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl >+dwfl_addr_sect_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) $(argp_LDADD) -ldl > dwarf_getmacros_LDADD = $(libdw) $(libmudflap) > dwarf_getstring_LDADD = $(libdw) $(libmudflap) >-addrcfi_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl >+addrcfi_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) $(argp_LDADD) -ldl > test_flag_nobits_LDADD = $(libelf) $(libmudflap) > rerequest_tag_LDADD = $(libdw) $(libmudflap) > alldts_LDADD = $(libebl) $(libelf) $(libmudflap) > md5_sha1_test_LDADD = $(libeu) > typeiter_LDADD = $(libdw) $(libelf) $(libmudflap) >-low_high_pc_LDADD = $(libdw) $(libelf) $(libmudflap) >+low_high_pc_LDADD = $(libdw) $(libelf) $(libmudflap) $(argp_LDADD) > test_elf_cntl_gelf_getshdr_LDADD = $(libelf) $(libmudflap) > dwflsyms_LDADD = $(libdw) $(libelf) $(libmudflap) > dwfllines_LDADD = $(libdw) $(libelf) $(libmudflap) >-- >1.7.8.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 470884
:
348828
|
348830
|
348832
|
348908
|
349604
|
349608
|
350476
| 350478 |
350480
|
350482
|
350484
|
350486
|
376194
|
376196
|
376198
|
459426
|
459428
|
459430
|
459432
|
459434