Initial Commit
- initial default booting image
This commit is contained in:
37
package/icu/0001-dont-build-static-dynamic-twice.patch
Normal file
37
package/icu/0001-dont-build-static-dynamic-twice.patch
Normal file
@@ -0,0 +1,37 @@
|
||||
Don't build object files twice
|
||||
|
||||
When passed --enable-static and --enable-shared, icu will generate
|
||||
both a shared and a static version of its libraries.
|
||||
|
||||
However, in order to do so, it builds each and every object file
|
||||
twice: once with -fPIC (for the shared library), and once without
|
||||
-fPIC (for the static library). While admittedly building -fPIC for a
|
||||
static library generates a slightly suboptimal code, this is what all
|
||||
the autotools-based project are doing. They build each object file
|
||||
once, and they use it for both the static and shared libraries.
|
||||
|
||||
icu builds the object files for the shared library as .o files, and
|
||||
the object files for static library as .ao files. By simply changing
|
||||
the suffix of object files used for static libraries to ".o", we tell
|
||||
icu to use the ones built for the shared library (i.e, with -fPIC),
|
||||
and avoid the double build of icu.
|
||||
|
||||
On a fast build server, this brings the target icu build from
|
||||
3m41.302s down to 1m43.926s (approximate numbers: some other builds
|
||||
are running on the system at the same time).
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
|
||||
Index: b/source/config/mh-linux
|
||||
===================================================================
|
||||
--- a/source/config/mh-linux
|
||||
+++ b/source/config/mh-linux
|
||||
@@ -35,7 +35,7 @@
|
||||
## Shared object suffix
|
||||
SO = so
|
||||
## Non-shared intermediate object suffix
|
||||
-STATIC_O = ao
|
||||
+STATIC_O = o
|
||||
|
||||
## Compilation rules
|
||||
%.$(STATIC_O): $(srcdir)/%.c
|
||||
35
package/icu/0002-link-icudata-as-data-only.patch
Normal file
35
package/icu/0002-link-icudata-as-data-only.patch
Normal file
@@ -0,0 +1,35 @@
|
||||
From d5d0c4bb7cc9aa4a132ec0bea13255aee50c1cf9 Mon Sep 17 00:00:00 2001
|
||||
From: Maxime Hadjinlian <maxime.hadjinlian@devialet.com>
|
||||
Date: Fri, 6 Jun 2014 14:55:58 +0200
|
||||
Subject: [PATCH] Don't link icudata as a data only library
|
||||
|
||||
This patch cames straight from Debian. It fixes an issue when
|
||||
libicudata would not have some flags indicating it's EABIhf, causing
|
||||
applications linked against libicudata to not start on EABIhf
|
||||
systems. Getting rid of the -nodefaultlibs -nostdlib flags solves the
|
||||
problem, and is the solution that is used by Debian, see
|
||||
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=653457.
|
||||
|
||||
Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@devialet.com>
|
||||
---
|
||||
source/config/mh-linux | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/source/config/mh-linux b/source/config/mh-linux
|
||||
index 531a3b2..5a2a7c4 100644
|
||||
--- a/source/config/mh-linux
|
||||
+++ b/source/config/mh-linux
|
||||
@@ -21,7 +21,9 @@ LD_RPATH= -Wl,-zorigin,-rpath,'$$'ORIGIN
|
||||
LD_RPATH_PRE = -Wl,-rpath,
|
||||
|
||||
## These are the library specific LDFLAGS
|
||||
-LDFLAGSICUDT=-nodefaultlibs -nostdlib
|
||||
+#LDFLAGSICUDT=-nodefaultlibs -nostdlib
|
||||
+# Debian change: linking icudata as data only causes too many problems.
|
||||
+LDFLAGSICUDT=
|
||||
|
||||
## Compiler switch to embed a library name
|
||||
# The initial tab in the next line is to prevent icu-config from reading it.
|
||||
--
|
||||
2.0.0.rc2
|
||||
|
||||
30
package/icu/0003-fix-static-linking-with-icu-uc.patch
Normal file
30
package/icu/0003-fix-static-linking-with-icu-uc.patch
Normal file
@@ -0,0 +1,30 @@
|
||||
From ffff12fd321c7a056e796e74cc508726b0626ae0 Mon Sep 17 00:00:00 2001
|
||||
From: Romain Naour <romain.naour@openwide.fr>
|
||||
Date: Wed, 22 Jul 2015 22:43:25 +0200
|
||||
Subject: [PATCH] fix static linking with icu-uc
|
||||
|
||||
During static linking with a C application and libicuuc.a,
|
||||
-lstdc++ is required.
|
||||
|
||||
Add -lstdc++ in Libs.private of icu-uc.pc.
|
||||
|
||||
Fixes:
|
||||
http://autobuild.buildroot.net/results/210/2107f9dfb39eeb6559fb4271c7af8b39aef521ca/
|
||||
|
||||
Signed-off-by: Romain Naour <romain.naour@openwide.fr>
|
||||
---
|
||||
source/Makefile.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff -git icu.orig/source/Makefile.in icu/source/Makefile.in
|
||||
--- icu.orig/source/Makefile.in 2025-03-13 19:31:23.000000000 +0100
|
||||
+++ icu/source/Makefile.in 2025-09-22 08:56:36.791792784 +0200
|
||||
@@ -279,7 +279,7 @@
|
||||
@echo "Libs:" '-L$${libdir}' "${ICULIBS_UC}" "${ICULIBS_DT}" '$${baselibs}' >> $@
|
||||
else
|
||||
@echo "Libs:" '-L$${libdir}' "${ICULIBS_UC}" >> $@
|
||||
- @echo "Libs.private:" "${ICULIBS_DT}" '$${baselibs}' >> $@
|
||||
+ @echo "Libs.private:" "${ICULIBS_DT}" '$${baselibs}' -lstdc++ >> $@
|
||||
endif
|
||||
@echo $@ updated.
|
||||
|
||||
35
package/icu/Config.in
Normal file
35
package/icu/Config.in
Normal file
@@ -0,0 +1,35 @@
|
||||
config BR2_PACKAGE_ICU
|
||||
bool "icu"
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on BR2_USE_WCHAR
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++17
|
||||
depends on BR2_HOST_GCC_AT_LEAST_7 # host-icu
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
# icu does some funky things by generating by itself an ELF
|
||||
# file, and it cannot easily be changed to generate FLAT
|
||||
# format.
|
||||
depends on !BR2_BINFMT_FLAT
|
||||
help
|
||||
International Components for Unicode.
|
||||
|
||||
https://icu.unicode.org/
|
||||
|
||||
if BR2_PACKAGE_ICU
|
||||
|
||||
config BR2_PACKAGE_ICU_CUSTOM_DATA_PATH
|
||||
string "Path to custom data library file"
|
||||
help
|
||||
This option allows to define the path to a custom data
|
||||
library generated with http://apps.icu-project.org/datacustom/
|
||||
Make sure you select the appropriate version to match the one
|
||||
provided by buildroot.
|
||||
Leave empty to not use this functionality.
|
||||
|
||||
endif
|
||||
|
||||
comment "icu needs a toolchain w/ C++, wchar, threads, gcc >= 7, host gcc >= 7"
|
||||
depends on !BR2_BINFMT_FLAT
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
|
||||
!BR2_TOOLCHAIN_HAS_THREADS || \
|
||||
!BR2_TOOLCHAIN_GCC_AT_LEAST_7 || \
|
||||
!BR2_HOST_GCC_AT_LEAST_7
|
||||
4
package/icu/icu.hash
Normal file
4
package/icu/icu.hash
Normal file
@@ -0,0 +1,4 @@
|
||||
# From https://github.com/unicode-org/icu/releases/tag/release-78.2
|
||||
sha256 3e99687b5c435d4b209630e2d2ebb79906c984685e78635078b672e03c89df35 icu4c-78.2-sources.tgz
|
||||
# Locally computed
|
||||
sha256 e55522d81edc687a341a4411e0776e54ca654e90147f354a90458aaced4116af LICENSE
|
||||
80
package/icu/icu.mk
Normal file
80
package/icu/icu.mk
Normal file
@@ -0,0 +1,80 @@
|
||||
################################################################################
|
||||
#
|
||||
# icu
|
||||
#
|
||||
################################################################################
|
||||
|
||||
ICU_VERSION = 78.2
|
||||
ICU_SOURCE = icu4c-$(ICU_VERSION)-sources.tgz
|
||||
ICU_SITE = \
|
||||
https://github.com/unicode-org/icu/releases/download/release-$(ICU_VERSION)
|
||||
ICU_LICENSE = ICU License
|
||||
ICU_LICENSE_FILES = LICENSE
|
||||
ICU_CPE_ID_VENDOR = unicode
|
||||
ICU_CPE_ID_PRODUCT = international_components_for_unicode
|
||||
|
||||
ICU_DEPENDENCIES = host-icu
|
||||
ICU_INSTALL_STAGING = YES
|
||||
ICU_CONFIG_SCRIPTS = icu-config
|
||||
ICU_CONF_OPTS = \
|
||||
--with-cross-build=$(HOST_ICU_DIR)/source \
|
||||
--disable-samples \
|
||||
--disable-tests
|
||||
|
||||
# the icu build process breaks if the TARGET environment variable is
|
||||
# non-empty
|
||||
ICU_CONF_ENV += TARGET=""
|
||||
ICU_MAKE_ENV += TARGET=""
|
||||
HOST_ICU_CONF_ENV += TARGET=""
|
||||
HOST_ICU_MAKE_ENV += TARGET=""
|
||||
|
||||
# When available, icu prefers to use C++11 atomics, which rely on the
|
||||
# __atomic builtins. On certain architectures, this requires linking
|
||||
# with libatomic starting from gcc 4.8.
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
|
||||
ICU_CONF_ENV += LIBS="-latomic"
|
||||
endif
|
||||
|
||||
# strtod_l() is not supported by musl; also xlocale.h is missing
|
||||
ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
|
||||
ICU_CONF_ENV += ac_cv_func_strtod_l=no
|
||||
endif
|
||||
|
||||
HOST_ICU_CONF_OPTS = \
|
||||
--disable-samples \
|
||||
--disable-tests \
|
||||
--disable-extras \
|
||||
--disable-icuio \
|
||||
--disable-layout
|
||||
ICU_SUBDIR = source
|
||||
HOST_ICU_SUBDIR = source
|
||||
|
||||
# ICU build scripting adds paths to LD_LIBRARY_PATH using
|
||||
# LD_LIBRARY_PATH="custom-path:${LD_LIBRARY_PATH}"
|
||||
# which, if LD_LIBRARY_PATH was empty, causes the last search directory
|
||||
# to be the working directory, causing the build to try to load target
|
||||
# libraries, possibly crashing the build due to ABI mismatches.
|
||||
# Workaround by ensuring LD_LIBRARY_PATH is never empty.
|
||||
# https://unicode-org.atlassian.net/browse/ICU-21417
|
||||
ifeq ($(LD_LIBRARY_PATH),)
|
||||
ICU_MAKE_ENV += LD_LIBRARY_PATH=/dev/null
|
||||
endif
|
||||
|
||||
ICU_CUSTOM_DATA_PATH = $(call qstrip,$(BR2_PACKAGE_ICU_CUSTOM_DATA_PATH))
|
||||
|
||||
ifneq ($(ICU_CUSTOM_DATA_PATH),)
|
||||
define ICU_COPY_CUSTOM_DATA
|
||||
cp $(ICU_CUSTOM_DATA_PATH) $(@D)/source/data/in/
|
||||
endef
|
||||
ICU_POST_PATCH_HOOKS += ICU_COPY_CUSTOM_DATA
|
||||
endif
|
||||
|
||||
define ICU_REMOVE_DEV_FILES
|
||||
rm -f $(addprefix $(TARGET_DIR)/usr/bin/,derb genbrk gencfu gencnval gendict genrb icuinfo makeconv uconv)
|
||||
rm -f $(addprefix $(TARGET_DIR)/usr/sbin/,genccode gencmn gennorm2 gensprep icupkg)
|
||||
rm -rf $(TARGET_DIR)/usr/share/icu
|
||||
endef
|
||||
ICU_POST_INSTALL_TARGET_HOOKS += ICU_REMOVE_DEV_FILES
|
||||
|
||||
$(eval $(autotools-package))
|
||||
$(eval $(host-autotools-package))
|
||||
Reference in New Issue
Block a user