diff options
| author | Khem Raj <raj.khem@gmail.com> | 2014-08-28 06:00:54 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-09-01 18:00:31 +0100 |
| commit | 1027c535ea753e63d9ffe469a423e04467cf8940 (patch) | |
| tree | cae4c0f7548f996a1f58d6a57806edfde475ff6e /meta/recipes-core/eglibc | |
| parent | 750b2a89af404dc7b275aa40fb693b07b9b297fe (diff) | |
| download | openembedded-core-1027c535ea753e63d9ffe469a423e04467cf8940.tar.gz openembedded-core-1027c535ea753e63d9ffe469a423e04467cf8940.tar.bz2 openembedded-core-1027c535ea753e63d9ffe469a423e04467cf8940.zip | |
glibc: Migrate eglibc 2.19 -> glibc 2.20
- This is a big swoop change where we switch to using glibc
- option-groups are forward ported
- cross-localedef is extracted out from eglibc and hosted
at github.com/kraj/localedef, its used for cross-localedef
recipe
- Other non ported patches from eglibc are forward ported
ppc8xx cache line workaround
SH fpcr values
dynamic resolver
installing PIC archives is there but is not applied
libc header bootstrap
- Delete eglibc recipes we moved back to using glibc now
- Fix ppc/e500 build
- Fix crypt module build when options are used
- Fix fnmatch build when options OPTION_EGLIBC_LOCALE_CODE is unset
HAVE_MBSTATE_T and HAVE_MBSRTOWCS should be defined conditionally
based upon OPTION_EGLIBC_LOCALE_CODE being set/unset
- Move the ports/ patches to relevant files now that ports is gone
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta/recipes-core/eglibc')
59 files changed, 0 insertions, 7397 deletions
diff --git a/meta/recipes-core/eglibc/cross-localedef-native-2.19/fix_for_centos_5.8.patch b/meta/recipes-core/eglibc/cross-localedef-native-2.19/fix_for_centos_5.8.patch deleted file mode 100644 index 7618c99534..0000000000 --- a/meta/recipes-core/eglibc/cross-localedef-native-2.19/fix_for_centos_5.8.patch +++ /dev/null @@ -1,18 +0,0 @@ -Upstream-Status: Inappropriate [other] - -This is a hack to fix building the locale bits on an older -CentOs 5.X machine - -Index: eglibc-2_16/libc/locale/programs/config.h -=================================================================== ---- eglibc-2_16.orig/libc/locale/programs/config.h -+++ eglibc-2_16/libc/locale/programs/config.h -@@ -19,6 +19,8 @@ - #ifndef _LD_CONFIG_H - #define _LD_CONFIG_H 1 - -+#define DUMMY_LOCALE_T -+ - /* Use the internal textdomain used for libc messages. */ - #define PACKAGE _libc_intl_domainname - #ifndef VERSION diff --git a/meta/recipes-core/eglibc/cross-localedef-native_2.19.bb b/meta/recipes-core/eglibc/cross-localedef-native_2.19.bb deleted file mode 100644 index 1c13eb824a..0000000000 --- a/meta/recipes-core/eglibc/cross-localedef-native_2.19.bb +++ /dev/null @@ -1,48 +0,0 @@ -SUMMARY = "Cross locale generation tool for eglibc" -HOMEPAGE = "http://www.eglibc.org/home" -SECTION = "libs" -LICENSE = "LGPL-2.1" - -LIC_DIR = "${WORKDIR}/eglibc-${PV}/libc" -LIC_FILES_CHKSUM = "file://${LIC_DIR}/LICENSES;md5=e9a558e243b36d3209f380deb394b213 \ - file://${LIC_DIR}/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://${LIC_DIR}/posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ - file://${LIC_DIR}/COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" - - -inherit native -inherit autotools - -FILESEXTRAPATHS =. "${FILE_DIRNAME}/${P}:" - -SRC_URI = "http://downloads.yoctoproject.org/releases/eglibc/eglibc-${PV}-svnr25243.tar.bz2 \ - file://fix_for_centos_5.8.patch;patchdir=.. \ - " -SRC_URI[md5sum] = "197836c2ba42fb146e971222647198dd" -SRC_URI[sha256sum] = "baaa030531fc308f7820c46acdf8e1b2f8e3c1f40bcd28b6e440d1c95d170d4c" - -S = "${WORKDIR}/eglibc-${PV}/localedef" - -do_unpack_append() { - bb.build.exec_func('do_move_ports', d) -} - -do_move_ports() { - if test -d ${WORKDIR}/eglibc-${PV}/ports ; then - rm -rf ${WORKDIR}/libc/ports - mv ${WORKDIR}/eglibc-${PV}/ports ${WORKDIR}/libc/ - fi -} - -EXTRA_OECONF = "--with-glibc=${WORKDIR}/eglibc-${PV}/libc" -CFLAGS += "-DNOT_IN_libc=1" - -do_configure () { - ${S}/configure ${EXTRA_OECONF} -} - - -do_install() { - install -d ${D}${bindir} - install -m 0755 ${B}/localedef ${D}${bindir}/cross-localedef -} diff --git a/meta/recipes-core/eglibc/eglibc-2.19/0001-R_ARM_TLS_DTPOFF32.patch b/meta/recipes-core/eglibc/eglibc-2.19/0001-R_ARM_TLS_DTPOFF32.patch deleted file mode 100644 index b4489e9ae9..0000000000 --- a/meta/recipes-core/eglibc/eglibc-2.19/0001-R_ARM_TLS_DTPOFF32.patch +++ /dev/null @@ -1,56 +0,0 @@ - -Quote from bug 1443 which explains what the patch does : - - We build some random program and link it with -lust. When we run it, - it dies with a SIGSEGV before reaching main(). - - Libust.so depends on liburcu-bp.so from the usermode-rcu package. - Although libust.so is not prelinked, liburcu-bp.so IS prelinked; this - is critical. - - Libust.so uses a TLS / __thread variable that is defined in liburcu- - bp.so. There are special ARM-specific relocation types that allow two - shared libraries to share thread-specific data. This is critical too. - - One more critical issue: although liburcu-bp.so is prelinked, we can't - load it at its prelinked address, because we also link against - librt.so, and librt.so uses that address. - - The dynamic linker is forced to relink liburcu-bp.so at a different - address. In the course of relinking, it processes the special ARM - relocation record mentioned above. The prelinker has already filled - in the information, which is a short offset into a table of thread- - specific data that is allocated per-thread for each library that uses - TLS. Because the normal behavior of a relocation is to add the symbol - value to an addend stored at the address being relocated, we end up - adding the short offset to itself, doubling it. - - Now we have an awkward situation. The libust.so library doesn't know - about the addend, so its TLS data for this element is correct. The - liburcu-bp.so library has a different offset for the element. When we - go to initialize the element for the first time in liburcu-bp.so, we - write the address of the result at the doubled (broken) offset. - Later, when we refer to the address from libust.so, we check the value - at the correct offset, but it's NULL, so we eat hot SIGSEGV. - -Upstream-Status: Pending - -Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com> ---- - .../libc/ports/sysdeps/arm/dl-machine.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -ndex 8d905e8..dcfa71e 100644 ---- libc.orig/ports/sysdeps/arm/dl-machine.h -+++ libc/ports/sysdeps/arm/dl-machine.h -@@ -503,7 +503,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, - - case R_ARM_TLS_DTPOFF32: - if (sym != NULL) -- *reloc_addr += sym->st_value; -+ *reloc_addr = sym->st_value; - break; - - case R_ARM_TLS_TPOFF32: --- - diff --git a/meta/recipes-core/eglibc/eglibc-2.19/0001-eglibc-menuconfig-support.patch b/meta/recipes-core/eglibc/eglibc-2.19/0001-eglibc-menuconfig-support.patch deleted file mode 100644 index 4559a110fb..0000000000 --- a/meta/recipes-core/eglibc/eglibc-2.19/0001-eglibc-menuconfig-support.patch +++ /dev/null @@ -1,912 +0,0 @@ -Pulled from -http://www.eglibc.org/archives/patches/msg01042.html - -Upstream-Status: Pending -Signed-off-by: Khem - -Hi, - -This patch adds 'make menuconfig' support to EGLIBC. - - -EGLIBC can re-use the Linux kernel kconfig host tools ('conf' and 'mconf') unmodified, by passing appropriate environment variables and with some pre- and post-processing on the input/output config files. - -There are three new make targets supported, which all are defined in the new libc/options-config/Makefile, which is included by the top-level libc/Makefile: - -- 'make defconfig'. This passes 'libc/option-groups.defaults' to 'conf' as a default config, and outputs 'option-groups.config' to the top-level build directory, which will be the same as the default config. - -- 'make config'. This is the same line-oriented interface as in the Linux kernel. Input and output is 'option-groups.config' in the top-level build directory. - -- 'make menuconfig'. This is the same menu-based interface as in the Linux kernel. Input and output is 'option-groups.config' in the top-level build directory. - - -Pre-Processing: - - -The Linux kernel kconfig tools expect a prefix of "CONFIG_" on all config option names, but EGLIBC expects a prefix of "OPTION_". The pre-processing script, libc/options-config/config-preproc.pl, simply replaces "CONFIG_ with "OPTION_" in the given config file. The libc/options-config/Makefile passes the script output to a temporary config file, which is then passed to 'conf' or 'mconf'. - -Post-Processing (libc/options-config/config-postproc.pl): - - -- Disabled options are output as a comment line of the form "# CONFIG_FOO is not set". This needs to be changed to an explicit "CONFIG_FOO=n" in order to be compatible with 'option-groups.awk' which generates the option-groups.h header. - -- "CONFIG_" prefix is changed back to "OPTION_". - - -- The kconfig tools will not output anything for options that depend on a parent option, when the parent option is disabled. This implicit disable must be converted to an explicit "CONFIG_FOO=n" in order to be compatible with the way EGLIBC overrides the default option settings in 'libc/option-groups.defaults' with those in 'option-groups.config'. - - -A new configure option, '--with-kconfig=<PATH>', tells EGLIBC where to find the pre-built 'conf' and 'mconf' host tools from Linux kernel builds. - -libc/EGLIBC.cross-building is updated to include instructions for using '--with-kconfig' for the final EGLIBC build, and shows how and when to run 'make *config'. - -libc/EGLIBC.option-groups is updated to include new information on the menuconfig support. - -Thanks, - -attached is the updated patch to address above issues. - -Steve - --- -Steve Longerbeam | Senior Embedded Engineer, ESD Services -Mentor Embedded(tm) | 46871 Bayside Parkway, Fremont, CA 94538 -P 510.354.5838 | M 408.410.2735 -Nucleus(r) | Linux(r) | Android(tm) | Services | UI | Multi-OS - - -Index: libc/EGLIBC.cross-building -=================================================================== ---- libc.orig/EGLIBC.cross-building -+++ libc/EGLIBC.cross-building -@@ -243,9 +243,29 @@ full EGLIBC build: - > $src/libc/configure \ - > --prefix=/usr \ - > --with-headers=$sysroot/usr/include \ -+ > --with-kconfig=$obj/linux/scripts/kconfig \ - > --build=$build \ - > --host=$target \ - > --disable-profile --without-gd --without-cvs --enable-add-ons -+ -+Note the additional '--with-kconfig' option. This tells EGLIBC where to -+find the host config tools used by the kernel 'make config' and 'make -+menuconfig'. These tools can be re-used by EGLIBC for its own 'make -+*config' support, which will create 'option-groups.config' for you. -+But first make sure those tools have been built by running some -+dummy 'make *config' calls in the kernel directory: -+ -+ $ cd $obj/linux -+ $ PATH=$tools/bin:$PATH make config \ -+ > ARCH=$linux_arch CROSS_COMPILE=$target- \ -+ $ PATH=$tools/bin:$PATH make menuconfig \ -+ > ARCH=$linux_arch CROSS_COMPILE=$target- \ -+ -+Now we can configure and build the full EGLIBC: -+ -+ $ cd $obj/eglibc -+ $ PATH=$tools/bin:$PATH make defconfig -+ $ PATH=$tools/bin:$PATH make menuconfig - $ PATH=$tools/bin:$PATH make - $ PATH=$tools/bin:$PATH make install install_root=$sysroot - -Index: libc/configure.ac -=================================================================== ---- libc.orig/configure.ac -+++ libc/configure.ac -@@ -127,6 +127,16 @@ AC_ARG_WITH([headers], - [sysheaders='']) - AC_SUBST(sysheaders) - -+AC_ARG_WITH([kconfig], -+ AC_HELP_STRING([--with-kconfig=PATH], -+ [location of kconfig tools to use (from Linux -+ kernel builds) to re-use for configuring EGLIBC -+ option groups]), -+ [KCONFIG_TOOLS=$withval], -+ [KCONFIG_TOOLS='']) -+AC_SUBST(KCONFIG_TOOLS) -+ -+ - AC_SUBST(use_default_link) - AC_ARG_WITH([default-link], - AC_HELP_STRING([--with-default-link], -Index: libc/config.make.in -=================================================================== ---- libc.orig/config.make.in -+++ libc/config.make.in -@@ -45,6 +45,8 @@ sysincludes = @SYSINCLUDES@ - c++-sysincludes = @CXX_SYSINCLUDES@ - all-warnings = @all_warnings@ - -+kconfig_tools = @KCONFIG_TOOLS@ -+ - have-z-combreloc = @libc_cv_z_combreloc@ - have-z-execstack = @libc_cv_z_execstack@ - have-Bgroup = @libc_cv_Bgroup@ -Index: libc/options-config/config-postproc.pl -=================================================================== ---- /dev/null -+++ libc/options-config/config-postproc.pl -@@ -0,0 +1,54 @@ -+#!/usr/bin/perl -+ -+$usage = "usage: $0 <default config file> <config file>\n"; -+ -+die "$usage" unless @ARGV; -+$defaults = shift @ARGV; -+die "$usage" unless @ARGV; -+die "Could not open $ARGV[0]" unless -T $ARGV[0]; -+ -+sub yank { -+ @option = grep($_ ne $_[0], @option); -+} -+ -+open(DEFAULTS, $defaults) || die "Could not open $defaults\n"; -+ -+# get the full list of available options using the default config file -+$i = 0; -+while (<DEFAULTS>) { -+ if (/^\s*OPTION_(\w+)\s*=/) { -+ $option[$i++] = $1; -+ } -+} -+ -+# now go through the config file, making the necessary changes -+while (<>) { -+ if (/Linux Kernel Configuration/) { -+ # change title -+ s/Linux Kernel/Option Groups/; -+ print; -+ } elsif (/^\s*CONFIG_(\w+)\s*=/) { -+ # this is an explicit option set line, change CONFIG_ to OPTION_ -+ # before printing and remove this option from option list -+ $opt = $1; -+ yank($opt); -+ s/CONFIG_/OPTION_/g; -+ print; -+ } elsif (/^\s*#\s+CONFIG_(\w+) is not set/) { -+ # this is a comment line, change CONFIG_ to OPTION_, remove this -+ # option from option list, and convert to explicit OPTION_FOO=n -+ $opt = $1; -+ yank($opt); -+ s/CONFIG_/OPTION_/g; -+ print "OPTION_$opt=n\n"; -+ } else { -+ print; -+ } -+} -+ -+# any options left in @options, are options that were not mentioned in -+# the config file, and implicitly that means the option must be set =n, -+# so do that here. -+foreach $opt (@option) { -+ print "OPTION_$opt=n\n"; -+} -Index: libc/options-config/config-preproc.pl -=================================================================== ---- /dev/null -+++ libc/options-config/config-preproc.pl -@@ -0,0 +1,8 @@ -+#!/usr/bin/perl -+ -+if (@ARGV) { -+ while (<>) { -+ s/OPTION_/CONFIG_/g; -+ print; -+ } -+} -Index: libc/options-config/Makefile -=================================================================== ---- /dev/null -+++ libc/options-config/Makefile -@@ -0,0 +1,55 @@ -+# =========================================================================== -+# EGLIBC option-groups configuration targets -+# These targets are included from top-level makefile -+ -+ifneq ($(kconfig_tools),) -+ifneq (no,$(PERL)) -+ -+ocdir := options-config -+ -+OconfigDefaults := option-groups.defaults -+OconfigDefaults_tmp := $(common-objpfx).tmp.defconfig -+OconfigDef := option-groups.def -+Oconfig := $(common-objpfx)option-groups.config -+Oconfig_tmp := $(common-objpfx).tmp.config -+ -+conf := $(kconfig_tools)/conf -+mconf := $(kconfig_tools)/mconf -+ -+preproc := $(PERL) $(ocdir)/config-preproc.pl -+postproc := $(PERL) $(ocdir)/config-postproc.pl -+ -+PHONY += defconfig config menuconfig -+ -+defconfig: $(conf) $(OconfigDefaults) $(OconfigDef) -+ rm -f $(OconfigDefaults_tmp) -+ rm -f $(Oconfig_tmp) -+ $(preproc) $(OconfigDefaults) > $(OconfigDefaults_tmp) -+ KCONFIG_CONFIG=$(Oconfig_tmp) $< --defconfig=$(OconfigDefaults_tmp) \ -+ $(OconfigDef) -+ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig) -+ rm $(Oconfig_tmp) -+ rm $(OconfigDefaults_tmp) -+ -+config: $(conf) $(OconfigDefaults) $(OconfigDef) -+ rm -f $(Oconfig_tmp) -+ $(preproc) $(wildcard $(Oconfig)) > $(Oconfig_tmp) -+ KCONFIG_CONFIG=$(Oconfig_tmp) $< --oldaskconfig $(OconfigDef) -+ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig) -+ rm $(Oconfig_tmp) -+ -+menuconfig: $(mconf) $(OconfigDefaults) $(OconfigDef) -+ rm -f $(Oconfig_tmp) -+ $(preproc) $(wildcard $(Oconfig)) > $(Oconfig_tmp) -+ KCONFIG_CONFIG=$(Oconfig_tmp) $< $(OconfigDef) -+ $(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig) -+ rm $(Oconfig_tmp) -+ -+# Help text used by make help -+help: -+ @echo ' defconfig - New config with default from default config' -+ @echo ' config - Update current config utilising a line-oriented program' -+ @echo ' menuconfig - Update current config utilising a menu based program' -+ -+endif -+endif -Index: libc/option-groups.def -=================================================================== ---- libc.orig/option-groups.def -+++ libc/option-groups.def -@@ -4,19 +4,19 @@ - # - # An entry of the form: - # --# config OPTION_GROUP_NAME -+# config GROUP_NAME - # bool "one-line explanation of what this option group controls" - # help - # Multi-line help explaining the option group's meaning in - # some detail, terminated by indentation level. - # --# defines an option group whose variable is OPTION_GROUP_NAME, with -+# defines an option group whose variable is GROUP_NAME, with - # meaningful values 'y' (enabled) and 'n' (disabled). The - # documentation is formatted to be consumed by some sort of - # interactive configuration interface, but EGLIBC doesn't have such an - # interface yet. - # --# An option may have a 'depends' line, indicating which other options -+# An option may have a 'depends on' line, indicating which other options - # must also be enabled if this option is. At present, EGLIBC doesn't - # check that these dependencies are satisfied. - # -@@ -41,9 +41,9 @@ - # although this simply reestablishes the value already set by - # 'option-groups.defaults'. - --config OPTION_EGLIBC_ADVANCED_INET6 -+config EGLIBC_ADVANCED_INET6 - bool "IPv6 Advanced Sockets API support (RFC3542)" -- depends OPTION_EGLIBC_INET -+ depends on EGLIBC_INET - help - This option group includes the functions specified by RFC 3542, - "Advanced Sockets Application Program Interface (API) for -@@ -71,7 +71,7 @@ config OPTION_EGLIBC_ADVANCED_INET6 - inet6_rth_segments - inet6_rth_space - --config OPTION_EGLIBC_BACKTRACE -+config EGLIBC_BACKTRACE - bool "Functions for producing backtraces" - help - This option group includes functions for producing a list of -@@ -85,7 +85,7 @@ config OPTION_EGLIBC_BACKTRACE - backtrace_symbols - backtrace_symbols_fd - --config OPTION_EGLIBC_BIG_MACROS -+config EGLIBC_BIG_MACROS - bool "Use extensive inline code" - help |
