mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@db180c0
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
# Locally calculated (fetched from Github)
|
||||
sha256 703877c0df77fce00719fe55cc62b07bb8d5f44fdb704bbb1b0bf2cf38afe10a glibc-06983fe52cfe8e4779035c27e8cc5d2caab31531.tar.gz
|
||||
|
||||
# Hashes for license files
|
||||
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
|
||||
sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING.LIB
|
||||
sha256 61abdd6930c9c599062d89e916b3e7968783879b6be0ee1c6229dd6169def431 LICENSES
|
||||
@@ -0,0 +1,7 @@
|
||||
# Locally calculated (fetched from Github)
|
||||
sha256 bd9fa9932c374b5256a976b543992c20de23338d08879df70a0a2502d17e671d glibc-2.29-30-g2d3fefd7ce64ac1015701c96916fffacc073a877.tar.gz
|
||||
|
||||
# Hashes for license files
|
||||
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
|
||||
sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING.LIB
|
||||
sha256 35bdb41dc0bcb10702ddacbd51ec4c0fe6fb3129f734e8c85fc02e4d3eb0ce3f LICENSES
|
||||
@@ -0,0 +1,2 @@
|
||||
# Locally calculated (fetched from https://github.com/c-sky/glibc)
|
||||
sha512 9deb2deceefe347d72de13510a5baa3de00f94c684f3b25e136ca3660f61e65a69f2115abb488c2ab0fa93cda8535853ce1e13e186efcc8434ecc4049efd82b5 glibc-7630ed2fa60caea98f500e4a7a51b88f9bf1e176.tar.gz
|
||||
10
package/glibc/Config.in
Normal file
10
package/glibc/Config.in
Normal file
@@ -0,0 +1,10 @@
|
||||
if BR2_TOOLCHAIN_BUILDROOT_GLIBC
|
||||
|
||||
config BR2_PACKAGE_GLIBC
|
||||
bool
|
||||
default y
|
||||
select BR2_PACKAGE_LINUX_HEADERS
|
||||
select BR2_TOOLCHAIN_HAS_SSP if BR2_PACKAGE_HOST_BINUTILS_SUPPORTS_CFI
|
||||
help
|
||||
https://www.gnu.org/software/libc/
|
||||
endif
|
||||
7
package/glibc/arc-2019.03-release/glibc.hash
Normal file
7
package/glibc/arc-2019.03-release/glibc.hash
Normal file
@@ -0,0 +1,7 @@
|
||||
# Locally calculated (fetched from Github)
|
||||
sha256 d8fd15462475f7e268147903cd7811705707b9bd9b29cd9dfe9a941ba48c7ea2 glibc-arc-2019.03-release.tar.gz
|
||||
|
||||
# Hashes for license files
|
||||
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
|
||||
sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING.LIB
|
||||
sha256 35bdb41dc0bcb10702ddacbd51ec4c0fe6fb3129f734e8c85fc02e4d3eb0ce3f LICENSES
|
||||
2
package/glibc/glibc.hash
Normal file
2
package/glibc/glibc.hash
Normal file
@@ -0,0 +1,2 @@
|
||||
# This hash file is not used; instead, update the
|
||||
# hash files in the per-version sub-directories.
|
||||
152
package/glibc/glibc.mk
Normal file
152
package/glibc/glibc.mk
Normal file
@@ -0,0 +1,152 @@
|
||||
################################################################################
|
||||
#
|
||||
# glibc
|
||||
#
|
||||
################################################################################
|
||||
|
||||
ifeq ($(BR2_arc),y)
|
||||
GLIBC_VERSION = arc-2019.03-release
|
||||
GLIBC_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,glibc,$(GLIBC_VERSION))
|
||||
else ifeq ($(BR2_RISCV_32),y)
|
||||
GLIBC_VERSION = 06983fe52cfe8e4779035c27e8cc5d2caab31531
|
||||
GLIBC_SITE = $(call github,riscv,riscv-glibc,$(GLIBC_VERSION))
|
||||
else ifeq ($(BR2_csky),y)
|
||||
GLIBC_VERSION = 7630ed2fa60caea98f500e4a7a51b88f9bf1e176
|
||||
GLIBC_SITE = $(call github,c-sky,glibc,$(GLIBC_VERSION))
|
||||
else
|
||||
# Generate version string using:
|
||||
# git describe --match 'glibc-*' --abbrev=40 origin/release/MAJOR.MINOR/master | cut -d '-' -f 2-
|
||||
GLIBC_VERSION = 2.29-30-g2d3fefd7ce64ac1015701c96916fffacc073a877
|
||||
# Upstream doesn't officially provide an https download link.
|
||||
# There is one (https://sourceware.org/git/glibc.git) but it's not reliable,
|
||||
# sometimes the connection times out. So use an unofficial github mirror.
|
||||
# When updating the version, check it on the official repository;
|
||||
# *NEVER* decide on a version string by looking at the mirror.
|
||||
# Then check that the mirror has been synced already (happens once a day.)
|
||||
GLIBC_SITE = $(call github,bminor,glibc,$(GLIBC_VERSION))
|
||||
endif
|
||||
|
||||
GLIBC_LICENSE = GPL-2.0+ (programs), LGPL-2.1+, BSD-3-Clause, MIT (library)
|
||||
GLIBC_LICENSE_FILES = COPYING COPYING.LIB LICENSES
|
||||
|
||||
# glibc is part of the toolchain so disable the toolchain dependency
|
||||
GLIBC_ADD_TOOLCHAIN_DEPENDENCY = NO
|
||||
|
||||
# Before glibc is configured, we must have the first stage
|
||||
# cross-compiler and the kernel headers
|
||||
GLIBC_DEPENDENCIES = host-gcc-initial linux-headers host-bison host-gawk \
|
||||
$(BR2_MAKE_HOST_DEPENDENCY) $(BR2_PYTHON3_HOST_DEPENDENCY)
|
||||
|
||||
GLIBC_SUBDIR = build
|
||||
|
||||
GLIBC_INSTALL_STAGING = YES
|
||||
|
||||
GLIBC_INSTALL_STAGING_OPTS = install_root=$(STAGING_DIR) install
|
||||
|
||||
# Thumb build is broken, build in ARM mode
|
||||
ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y)
|
||||
GLIBC_EXTRA_CFLAGS += -marm
|
||||
endif
|
||||
|
||||
# MIPS64 defaults to n32 so pass the correct -mabi if
|
||||
# we are using a different ABI. OABI32 is also used
|
||||
# in MIPS so we pass -mabi=32 in this case as well
|
||||
# even though it's not strictly necessary.
|
||||
ifeq ($(BR2_MIPS_NABI64),y)
|
||||
GLIBC_EXTRA_CFLAGS += -mabi=64
|
||||
else ifeq ($(BR2_MIPS_OABI32),y)
|
||||
GLIBC_EXTRA_CFLAGS += -mabi=32
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_ENABLE_DEBUG),y)
|
||||
GLIBC_EXTRA_CFLAGS += -g
|
||||
endif
|
||||
|
||||
# The stubs.h header is not installed by install-headers, but is
|
||||
# needed for the gcc build. An empty stubs.h will work, as explained
|
||||
# in http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html. The same trick
|
||||
# is used by Crosstool-NG.
|
||||
ifeq ($(BR2_TOOLCHAIN_BUILDROOT_GLIBC),y)
|
||||
define GLIBC_ADD_MISSING_STUB_H
|
||||
mkdir -p $(STAGING_DIR)/usr/include/gnu
|
||||
touch $(STAGING_DIR)/usr/include/gnu/stubs.h
|
||||
endef
|
||||
endif
|
||||
|
||||
GLIBC_CONF_ENV = \
|
||||
ac_cv_path_BASH_SHELL=/bin/bash \
|
||||
libc_cv_forced_unwind=yes \
|
||||
libc_cv_ssp=no
|
||||
|
||||
# Override the default library locations of /lib64/<abi> and
|
||||
# /usr/lib64/<abi>/ for RISC-V.
|
||||
ifeq ($(BR2_riscv),y)
|
||||
ifeq ($(BR2_RISCV_64),y)
|
||||
GLIBC_CONF_ENV += libc_cv_slibdir=/lib64 libc_cv_rtlddir=/lib
|
||||
else
|
||||
GLIBC_CONF_ENV += libc_cv_slibdir=/lib32 libc_cv_rtlddir=/lib
|
||||
endif
|
||||
endif
|
||||
|
||||
# glibc requires make >= 4.0 since 2.28 release.
|
||||
# https://www.sourceware.org/ml/libc-alpha/2018-08/msg00003.html
|
||||
GLIBC_MAKE = $(BR2_MAKE)
|
||||
GLIBC_CONF_ENV += ac_cv_prog_MAKE="$(BR2_MAKE)"
|
||||
|
||||
# Even though we use the autotools-package infrastructure, we have to
|
||||
# override the default configure commands for several reasons:
|
||||
#
|
||||
# 1. We have to build out-of-tree, but we can't use the same
|
||||
# 'symbolic link to configure' used with the gcc packages.
|
||||
#
|
||||
# 2. We have to execute the configure script with bash and not sh.
|
||||
#
|
||||
# Note that as mentionned in
|
||||
# http://patches.openembedded.org/patch/38849/, glibc must be
|
||||
# built with -O2, so we pass our own CFLAGS and CXXFLAGS below.
|
||||
define GLIBC_CONFIGURE_CMDS
|
||||
mkdir -p $(@D)/build
|
||||
# Do the configuration
|
||||
(cd $(@D)/build; \
|
||||
$(TARGET_CONFIGURE_OPTS) \
|
||||
CFLAGS="-O2 $(GLIBC_EXTRA_CFLAGS)" CPPFLAGS="" \
|
||||
CXXFLAGS="-O2 $(GLIBC_EXTRA_CFLAGS)" \
|
||||
$(GLIBC_CONF_ENV) \
|
||||
$(SHELL) $(@D)/configure \
|
||||
--target=$(GNU_TARGET_NAME) \
|
||||
--host=$(GNU_TARGET_NAME) \
|
||||
--build=$(GNU_HOST_NAME) \
|
||||
--prefix=/usr \
|
||||
--enable-shared \
|
||||
$(if $(BR2_x86_64),--enable-lock-elision) \
|
||||
--with-pkgversion="Buildroot" \
|
||||
--without-cvs \
|
||||
--disable-profile \
|
||||
--without-gd \
|
||||
--enable-obsolete-rpc \
|
||||
--enable-kernel=$(call qstrip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST)) \
|
||||
--with-headers=$(STAGING_DIR)/usr/include)
|
||||
$(GLIBC_ADD_MISSING_STUB_H)
|
||||
endef
|
||||
|
||||
#
|
||||
# We also override the install to target commands since we only want
|
||||
# to install the libraries, and nothing more.
|
||||
#
|
||||
|
||||
GLIBC_LIBS_LIB = \
|
||||
ld*.so.* libanl.so.* libc.so.* libcrypt.so.* libdl.so.* libgcc_s.so.* \
|
||||
libm.so.* libpthread.so.* libresolv.so.* librt.so.* \
|
||||
libutil.so.* libnss_files.so.* libnss_dns.so.* libmvec.so.*
|
||||
|
||||
ifeq ($(BR2_PACKAGE_GDB),y)
|
||||
GLIBC_LIBS_LIB += libthread_db.so.*
|
||||
endif
|
||||
|
||||
define GLIBC_INSTALL_TARGET_CMDS
|
||||
for libpattern in $(GLIBC_LIBS_LIB); do \
|
||||
$(call copy_toolchain_lib_root,$$libpattern) ; \
|
||||
done
|
||||
endef
|
||||
|
||||
$(eval $(autotools-package))
|
||||
13
package/glibc/nsswitch.conf
Normal file
13
package/glibc/nsswitch.conf
Normal file
@@ -0,0 +1,13 @@
|
||||
# /etc/nsswitch.conf
|
||||
|
||||
passwd: files
|
||||
group: files
|
||||
shadow: files
|
||||
|
||||
hosts: files dns
|
||||
networks: files dns
|
||||
|
||||
protocols: files
|
||||
services: files
|
||||
ethers: files
|
||||
rpc: files
|
||||
Reference in New Issue
Block a user