Commit 3e2f5783 authored by John Crispin's avatar John Crispin
Browse files

toolchain: The glorious return of glibc, ver 2.21



It's the eglibc packaging with a bit of spit-polishing. And testing. :-)

[blogic: merged glibc and eglibc into 1 and made eglibc a glibc variant]
Signed-off-by: default avatarJeff Waugh <jdub@bethesignal.org>
Signed-off-by: default avatarJohn Crispin <blogic@openwrt.org>

SVN-Revision: 44701
parent eff1859f
......@@ -135,7 +135,7 @@ menu "Global build settings"
choice
prompt "Binary stripping method"
default USE_STRIP if EXTERNAL_TOOLCHAIN
default USE_STRIP if USE_GLIBC || USE_EGLIBC || USE_MUSL
default USE_STRIP if USE_GLIBC || USE_MUSL
default USE_SSTRIP
help
Select the binary stripping method you wish to use.
......@@ -156,7 +156,6 @@ menu "Global build settings"
bool "sstrip"
depends on !DEBUG
depends on !USE_GLIBC
depends on !USE_EGLIBC
help
This will install binaries stripped using sstrip.
endchoice
......@@ -187,7 +186,7 @@ menu "Global build settings"
choice
prompt "Preferred standard C++ library"
default USE_LIBSTDCXX if USE_EGLIBC
default USE_LIBSTDCXX if USE_GLIBC
default USE_UCLIBCXX
help
Select the preferred standard C++ library for all packages that support this.
......
......@@ -5,7 +5,7 @@
# See /LICENSE for more information.
#
PKG_DEFAULT_DEPENDS = +libc +USE_EGLIBC:librt +USE_EGLIBC:libpthread
PKG_DEFAULT_DEPENDS = +libc +USE_GLIBC:librt +USE_GLIBC:libpthread
ifneq ($(PKG_NAME),toolchain)
PKG_FIXUP_DEPENDS = $(if $(filter kmod-%,$(1)),$(2),$(PKG_DEFAULT_DEPENDS) $(filter-out $(PKG_DEFAULT_DEPENDS),$(2)))
......
......@@ -55,7 +55,7 @@ endef
VERSION_TAINT_SPECS := \
-ALL:no-all \
-IPV6:no-ipv6 \
+USE_EGLIBC:eglibc \
+USE_GLIBC:glibc \
+USE_MKLIBS:mklibs \
+BUSYBOX_CUSTOM:busybox \
+OVERRIDE_PKGS:override \
......
......@@ -420,12 +420,12 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
$(CP) $(TOOLCHAIN_DIR)/lib/libstdc++.so.* $(1)/usr/lib/
endef
use_libutil=$(if $(CONFIG_EGLIBC_OPTION_EGLIBC_UTMP),libutil)
use_libnsl=$(if $(CONFIG_EGLIBC_OPTION_EGLIBC_NIS),libnsl)
use_nsswitch=$(if $(CONFIG_EGLIBC_OPTION_EGLIBC_NSSWITCH),libnss_dns libnss_files)
use_libutil=$(if $(CONFIG_GLIBC_USE_VERSION_2_21)$(CONFIG_EGLIBC_OPTION_EGLIBC_UTMP),libutil)
use_libnsl=$(if $(CONFIG_GLIBC_USE_VERSION_2_21)$(CONFIG_EGLIBC_OPTION_EGLIBC_NIS),libnsl)
use_nsswitch=$(if $(CONFIG_GLIBC_USE_VERSION_2_21)$(CONFIG_EGLIBC_OPTION_EGLIBC_NSSWITCH),libnss_dns libnss_files)
define Package/eglibc/install
$(CP) ./eglibc-files/* $(1)/
define Package/glibc/install
$(CP) ./glibc-files/* $(1)/
rm -f $(1)/etc/localtime
$(LN) /tmp/localtime $(1)/etc/localtime
$(INSTALL_DIR) $(1)/lib
......
passwd:files
shadow:files
group:files
hosts:dns files
bootparams:files
ethers:files
netmasks:files
networks:files
protocols:files
rpc:files
services:files
automount:files
aliases:files
......@@ -211,14 +211,13 @@ comment "C Library"
choice
prompt "C Library implementation" if TOOLCHAINOPTS
default LIBC_USE_EGLIBC if (aarch64 || aarch64_be)
default LIBC_USE_UCLIBC
default LIBC_USE_GLIBC if (aarch64 || aarch64_be)
help
Select the C library implementation.
config LIBC_USE_EGLIBC
bool "Use eglibc"
select USE_EGLIBC
config LIBC_USE_GLIBC
bool "Use glibc"
select USE_GLIBC
depends on !avr32
config LIBC_USE_UCLIBC
......@@ -233,7 +232,7 @@ choice
endchoice
source "toolchain/eglibc/Config.in"
source "toolchain/glibc/Config.in"
source "toolchain/uClibc/Config.in"
source "toolchain/musl/Config.in"
......@@ -256,7 +255,7 @@ config INSIGHT
help
Enable if you want to build insight-gdb.
config USE_EGLIBC
config USE_GLIBC
bool
default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && (aarch64 || aarch64_be || octeon)
......@@ -273,26 +272,26 @@ config USE_EXTERNAL_LIBC
source "toolchain/gcc/Config.version"
source "toolchain/eglibc/Config.version"
source "toolchain/glibc/Config.version"
source "toolchain/uClibc/Config.version"
source "toolchain/musl/Config.version"
config LIBC
string
default "eglibc" if USE_EGLIBC
default "glibc" if USE_GLIBC
default "uClibc" if USE_UCLIBC
default "musl" if USE_MUSL
config LIBC_VERSION
string
default EGLIBC_VERSION if USE_EGLIBC
default GLIBC_VERSION if USE_GLIBC
default UCLIBC_VERSION if USE_UCLIBC
default MUSL_VERSION if USE_MUSL
config TARGET_SUFFIX
string
default "gnueabi" if USE_EGLIBC && (arm || armeb)
default "gnu" if USE_EGLIBC && !(arm || armeb)
default "gnueabi" if USE_GLIBC && (arm || armeb)
default "gnu" if USE_GLIBC && !(arm || armeb)
default "uclibcgnueabi" if USE_UCLIBC && (arm || armeb)
default "uclibc" if USE_UCLIBC && !(arm || armeb)
default "muslgnueabi" if USE_MUSL && (arm || armeb)
......
choice
prompt "eglibc version"
depends on TOOLCHAINOPTS && USE_EGLIBC
prompt "(e)glibc version"
depends on TOOLCHAINOPTS && USE_GLIBC
default EGLIBC_USE_VERSION_2_19
help
Select the version of eglibc you wish to use.
Select the version of glibc you wish to use.
config EGLIBC_USE_VERSION_2_15
bool "eglibc 2.15"
......@@ -14,9 +14,13 @@ choice
bool "eglibc 2.19"
select EGLIBC_VERSION_2_19
config GLIBC_USE_VERSION_2_21
bool "glibc 2.21"
select GLIBC_VERSION_2_21
endchoice
menu "eglibc configuration"
depends on TOOLCHAINOPTS && USE_EGLIBC
source toolchain/eglibc/config/Config.in
depends on TOOLCHAINOPTS && USE_GLIBC && (EGLIBC_USE_VERSION_2_15 || EGLIBC_USE_VERSION_2_19)
source toolchain/glibc/config/Config.in
endmenu
if USE_EGLIBC
if USE_GLIBC
config EGLIBC_VERSION
config GLIBC_VERSION
string
default "2.15" if EGLIBC_VERSION_2_15
default "2.19" if EGLIBC_VERSION_2_19
default "2.21" if GLIBC_VERSION_2_21
config EGLIBC_VERSION_2_15
bool
......@@ -12,15 +13,15 @@ config EGLIBC_VERSION_2_19
default y if !TOOLCHAINOPTS
bool
config EGLIBC_REVISION
config GLIBC_VERSION_2_21
default y if !TOOLCHAINOPTS
bool
config GLIBC_REVISION
string
default "18909" if EGLIBC_VERSION_2_15
default "25243" if EGLIBC_VERSION_2_19
default "4e42b5b8f8" if GLIBC_VERSION_2_21
default ""
endif
menu "eglibc configuration"
depends on !TOOLCHAINOPTS && USE_EGLIBC
source toolchain/eglibc/config/Config.in
endmenu
......@@ -6,19 +6,27 @@
#
include $(TOPDIR)/rules.mk
PKG_NAME:=eglibc
PKG_VERSION:=$(call qstrip,$(CONFIG_EGLIBC_VERSION))
PKG_REVISION:=$(call qstrip,$(CONFIG_EGLIBC_REVISION))
PKG_NAME:=glibc
PKG_VERSION:=$(call qstrip,$(CONFIG_GLIBC_VERSION))
PKG_REVISION:=$(call qstrip,$(CONFIG_GLIBC_REVISION))
PKG_SOURCE_PROTO:=svn
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git://sourceware.org/git/glibc.git
PKG_SOURCE_VERSION:=$(PKG_REVISION)
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-r$(PKG_REVISION)
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.bz2
GLIBC_PATH:=
ifneq ($(CONFIG_EGLIBC_VERSION_2_15),)
GLIBC_PATH:=libc/
PKG_SOURCE_PROTO:=svn
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.bz2
PKG_SOURCE_URL:=svn://svn.eglibc.org/branches/eglibc-2_15
endif
ifneq ($(CONFIG_EGLIBC_VERSION_2_19),)
GLIBC_PATH:=libc/
PKG_SOURCE_PROTO:=svn
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.bz2
PKG_SOURCE_URL:=svn://svn.eglibc.org/branches/eglibc-2_19
endif
......@@ -32,7 +40,7 @@ include $(INCLUDE_DIR)/toolchain-build.mk
HOST_STAMP_PREPARED:=$(HOST_BUILD_DIR)/.prepared
HOST_STAMP_CONFIGURED:=$(CUR_BUILD_DIR)/.configured
HOST_STAMP_BUILT:=$(CUR_BUILD_DIR)/.built
HOST_STAMP_INSTALLED:=$(TOOLCHAIN_DIR)/stamp/.eglibc_$(VARIANT)_installed
HOST_STAMP_INSTALLED:=$(TOOLCHAIN_DIR)/stamp/.glibc_$(VARIANT)_installed
ifeq ($(ARCH),mips64)
ifdef CONFIG_MIPS64_ABI_N64
......@@ -46,18 +54,19 @@ ifeq ($(ARCH),mips64)
endif
endif
EGLIBC_CONFIGURE:= \
GLIBC_CONFIGURE:= \
BUILD_CC="$(HOSTCC)" \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
libc_cv_slibdir="/lib" \
use_ldconfig=no \
$(HOST_BUILD_DIR)/libc/configure \
$(HOST_BUILD_DIR)/$(GLIBC_PATH)configure \
--prefix= \
--build=$(GNU_HOST_NAME) \
--host=$(REAL_GNU_TARGET_NAME) \
--with-headers=$(TOOLCHAIN_DIR)/include \
--disable-profile \
--disable-werror \
--without-gd \
--without-cvs \
--enable-add-ons \
......@@ -69,31 +78,37 @@ export HOST_CFLAGS := $(HOST_CFLAGS) -idirafter $(CURDIR)/$(PATH_PREFIX)/include
define Host/SetToolchainInfo
$(SED) 's,^\(LIBC_TYPE\)=.*,\1=$(PKG_NAME),' $(TOOLCHAIN_DIR)/info.mk
ifneq ($(CONFIG_GLIBC_VERSION_2_21),)
$(SED) 's,^\(LIBC_URL\)=.*,\1=http://www.gnu.org/software/libc/,' $(TOOLCHAIN_DIR)/info.mk
else
$(SED) 's,^\(LIBC_URL\)=.*,\1=http://www.eglibc.org/,' $(TOOLCHAIN_DIR)/info.mk
endif
$(SED) 's,^\(LIBC_VERSION\)=.*,\1=$(PKG_VERSION),' $(TOOLCHAIN_DIR)/info.mk
$(SED) 's,^\(LIBC_SO_VERSION\)=.*,\1=$(PKG_VERSION),' $(TOOLCHAIN_DIR)/info.mk
endef
define Host/Configure
[ -f $(HOST_BUILD_DIR)/.autoconf ] || { \
cd $(HOST_BUILD_DIR)/libc; \
cd $(HOST_BUILD_DIR)/$(GLIBC_PATH); \
autoconf --force && \
touch $(HOST_BUILD_DIR)/.autoconf; \
}
mkdir -p $(CUR_BUILD_DIR)
grep 'CONFIG_EGLIBC_OPTION_' $(TOPDIR)/.config | sed -e "s,\\(# \)\\?CONFIG_EGLIBC_\\(.*\\),\\1\\2,g" > $(CUR_BUILD_DIR)/option-groups.config
( cd $(CUR_BUILD_DIR); rm -f config.cache; \
$(EGLIBC_CONFIGURE) \
$(GLIBC_CONFIGURE) \
);
endef
define Host/Prepare
$(call Host/Prepare/Default)
ln -snf $(PKG_SOURCE_SUBDIR) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
ifeq ($(CONFIG_GLIBC_VERSION_2_21),)
$(SED) 's,y,n,' $(HOST_BUILD_DIR)/libc/option-groups.defaults
ifneq ($(CONFIG_EGLIBC_VERSION_2_15),)
ln -sf ../ports $(HOST_BUILD_DIR)/libc/
endif
endif
endef
define Host/Clean
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment