From cc6b7fad46f5cb3d84cf87ae47c5f723803a67a3 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Wed, 5 Jan 2022 00:37:45 -0800 Subject: Retire obsoleted milestones ... and the code dependent on them, after the latest wave of obsolete package removals. This concludes the glorious history of the original uClibc (non-NG) with lots of kludges removed. There was a choice here, whether to call the resulting libc "uClibc" or "uClibc-ng". I opted in favor of giving uClibc-ng the recognition it deserves, although it had some ripple effect in the ct-ng code. Signed-off-by: Alexey Neyman diff --git a/config/cc/gcc.in b/config/cc/gcc.in index e068afd..742d563 100644 --- a/config/cc/gcc.in +++ b/config/cc/gcc.in @@ -7,19 +7,14 @@ ## select CC_SUPPORT_OBJC ## select CC_SUPPORT_OBJCXX ## select CC_SUPPORT_GOLANG +# ISL 0.15 is the oldest release present in CTNG. # GCC7 requires ISL 0.15+ -## select ISL_REQUIRE_0_15_or_later if ISL_NEEDED && GCC_7_or_later # GCC6 requires ISL 0.14+ (it says 0.14-0.16, but accepts newer ISL as well) -## select ISL_REQUIRE_0_14_or_later if ISL_NEEDED && GCC_6_or_later # GCC5 requires ISL 0.12+ (again, it says 0.12-0.16, but also accepts newer ISL up to 0.18; # fails to compile with 0.19+) -## select ISL_REQUIRE_0_12_or_later if ISL_NEEDED && GCC_5_or_later ## select ISL_REQUIRE_0_18_or_older if ISL_NEEDED && GCC_5_or_later && !GCC_6_or_later # GCC4.9 requires ISL 0.10..0.15 -# GCC4.8 requires ISL 0.10..0.14 -## select ISL_REQUIRE_0_10_or_later if ISL_NEEDED && GCC_4_8_or_later ## select ISL_REQUIRE_0_15_or_older if ISL_NEEDED && GCC_4_9_or_later && !GCC_5_or_later -## select ISL_REQUIRE_0_14_or_older if ISL_NEEDED && GCC_4_8_or_later && !GCC_4_9_or_later ## help gcc is the full-blown GNU compiler. This is what most people will choose. ## help @@ -265,7 +260,7 @@ config CC_GCC_LIBSANITIZER bool prompt "Compile libsanitizer" depends on THREADS_NATIVE - depends on !LIBC_UCLIBC && !LIBC_MUSL # Currently lacks required headers (like netrom.h) + depends on !LIBC_UCLIBC_NG && !LIBC_MUSL # Currently lacks required headers (like netrom.h) help libsanitizer is a library which provides run-time sanitising of either or both of: diff --git a/config/comp_libs/gmp.in b/config/comp_libs/gmp.in index 7270244..f49d1a7 100644 --- a/config/comp_libs/gmp.in +++ b/config/comp_libs/gmp.in @@ -1,5 +1 @@ # GMP options - -config GMP_HAS_MPBSD - bool - default y if !GMP_5_1_0_or_later diff --git a/config/comp_libs/isl.in b/config/comp_libs/isl.in index fe6fa8d..22b0cad 100644 --- a/config/comp_libs/isl.in +++ b/config/comp_libs/isl.in @@ -1,13 +1 @@ # ISL options -# CLooG 0.18.4 requires ISL 0.12 or newer -# CLooG 0.18.1 requires ISL 0.12 or older -## select CLOOG_REQUIRE_0_18_1_or_older if CLOOG_NEEDED && !ISL_0_12_or_later -## select CLOOG_REQUIRE_0_18_4_or_later if CLOOG_NEEDED && !ISL_0_14_or_older - -config ISL_NEEDS_WITH_GMP - bool - default y if !ISL_0_12_or_later - -config ISL_HAS_WITH_PIPLIB - bool - default y if !ISL_0_14_or_later diff --git a/config/comp_libs/mpc.in b/config/comp_libs/mpc.in index 2ea3c0c..422935f 100644 --- a/config/comp_libs/mpc.in +++ b/config/comp_libs/mpc.in @@ -1,6 +1,3 @@ # MPC options -# MPC 1.1.0 and later requires MPFR 3.0.0 or later and GMP 5.0.0 or later. # MPC 1.0.x and earlier break with MPFR 4.0.0. -## select MPFR_REQUIRE_3_0_0_or_later if MPFR_NEEDED && MPC_1_1_0_or_later -## select GMP_REQUIRE_5_0_0_or_later if GMP_NEEDED && MPC_1_1_0_or_later ## select MPFR_REQUIRE_older_than_4_0_0 if MPFR_NEEDED && !MPC_1_1_0_or_later diff --git a/config/comp_libs/newlib-nano.in b/config/comp_libs/newlib-nano.in index 5a81fde..e7ef6f7 100644 --- a/config/comp_libs/newlib-nano.in +++ b/config/comp_libs/newlib-nano.in @@ -1,6 +1,7 @@ # newlib-nano options ## depends on BARE_METAL +## select LIBC_PROVIDES_CXA_ATEXIT ## help Newlib-nano is a C library intended for use on embedded systems. It is a ## help conglomeration of several library parts, all under free software @@ -37,21 +38,6 @@ config NEWLIB_NANO_INSTALL_IN_TARGET Additionally the newlib-nano version of newlib.h will get copied to include/newlib-nano/newlib.h. -# maybe older versions of newlib will support it too, but this -# needs to be checked -config NEWLIB_NANO_CXA_ATEXIT - def_bool y - depends on NEWLIB_NANO_2_0_or_later - select LIBC_PROVIDES_CXA_ATEXIT - -config NEWLIB_NANO_HAS_NANO_MALLOC - def_bool y - depends on NEWLIB_NANO_2_1_or_later - -config NEWLIB_NANO_HAS_NANO_FORMATTED_IO - def_bool y - depends on NEWLIB_NANO_2_2_or_later - config LIBC_NEWLIB_NANO_TARGET_CFLAGS string prompt "Target CFLAGS for newlib" @@ -225,7 +211,6 @@ config LIBC_NEWLIB_NANO_NANO_MALLOC bool prompt "Enable Nano Malloc" default y - depends on NEWLIB_NANO_HAS_NANO_MALLOC help NEWLIB has two implementations of malloc family's functions, one in `mallocr.c' and the other one in `nano-mallocr.c'. This options @@ -237,7 +222,6 @@ config LIBC_NEWLIB_NANO_NANO_FORMATTED_IO bool prompt "Enable Nano Formatted I/O" default y - depends on NEWLIB_NANO_HAS_NANO_FORMATTED_IO help This builds NEWLIB with a special implementation of formatted I/O functions, designed to lower the size of application on small systems diff --git a/config/debug/gdb.in.native b/config/debug/gdb.in.native index 7ac8ec2..b4721c8 100644 --- a/config/debug/gdb.in.native +++ b/config/debug/gdb.in.native @@ -6,8 +6,8 @@ config GDB_NATIVE depends on ! BARE_METAL depends on ! LIBC_BIONIC depends on CC_LANG_CXX || !GDB_8_0_or_later - select LIBC_UCLIBC_WCHAR if LIBC_UCLIBC && GDB_8_0_or_later - select LIBC_UCLIBC_IPV6 if LIBC_UCLIBC && GDB_8_3_or_later + select LIBC_UCLIBC_WCHAR if LIBC_UCLIBC_NG && GDB_8_0_or_later + select LIBC_UCLIBC_IPV6 if LIBC_UCLIBC_NG && GDB_8_3_or_later select EXPAT_TARGET select NCURSES_TARGET select GMP_TARGET if GDB_11_1_or_later @@ -19,8 +19,8 @@ config GDB_GDBSERVER prompt "gdbserver" default y depends on ! BARE_METAL - select LIBC_UCLIBC_WCHAR if LIBC_UCLIBC && GDB_8_0_or_later - select LIBC_UCLIBC_IPV6 if LIBC_UCLIBC && GDB_8_3_or_later + select LIBC_UCLIBC_WCHAR if LIBC_UCLIBC_NG && GDB_8_0_or_later + select LIBC_UCLIBC_IPV6 if LIBC_UCLIBC_NG && GDB_8_3_or_later help Build and install a gdbserver for the target, to run on the target. diff --git a/config/debug/ltrace.in b/config/debug/ltrace.in index 1cdd157..75bdf4f 100644 --- a/config/debug/ltrace.in +++ b/config/debug/ltrace.in @@ -7,10 +7,3 @@ ## help It intercepts and records the dynamic library calls which are called by ## help the executed process and the signals which are received by that process. ## help It can also intercept and print the system calls executed by the program. - -# Ltrace 0.5.3 had a unique hand-crafted configure script that has to be -# run differently from any preceding or following releases. This serves -# as a reminder to remove that code once 0.5.3 support is dropped. -config LTRACE_0_5_3_CONFIGURE - bool - default y if LTRACE_V_0_5_3 diff --git a/config/libc/glibc.in b/config/libc/glibc.in index 63c31f6..39c2c20 100644 --- a/config/libc/glibc.in +++ b/config/libc/glibc.in @@ -66,7 +66,6 @@ config GLIBC_DEP_MAKE_4_0 def_bool y depends on GLIBC_2_28_or_later && !CONFIGURE_has_make_4_0_or_newer select COMP_TOOLS_MAKE - select MAKE_REQUIRE_4_0_or_later select MAKE_GNUMAKE_SYMLINK # Override old host make in .build/tools/bin # Glibc 2.31 removed support for pre-v8 SPARC in 32-bit mode (64-bit mode always diff --git a/config/libc/mingw-w64.in b/config/libc/mingw-w64.in index d176e47..1880f08 100644 --- a/config/libc/mingw-w64.in +++ b/config/libc/mingw-w64.in @@ -9,10 +9,6 @@ ## ## help The de-facto standard for Mingw distributions. -config MINGW_W64_REQUIRES_W64_VENDOR - bool - default y if MINGW_W64_V4_or_later - config THREADS default "win32" if THREADS_NATIVE default "posix" if THREADS_POSIX diff --git a/config/libc/newlib.in b/config/libc/newlib.in index ce426da..83ae4b1 100644 --- a/config/libc/newlib.in +++ b/config/libc/newlib.in @@ -1,6 +1,7 @@ # newlib options ## depends on BARE_METAL +## select LIBC_PROVIDES_CXA_ATEXIT ## select LIBC_SUPPORT_THREADS_NONE ## select CC_CORE_PASS_1_NEEDED @@ -11,21 +12,6 @@ ## help array of processors, and will usually work on any architecture with ## help the addition of a few low-level routines. -# maybe older versions of newlib will support it too, but this -# needs to be checked -config NEWLIB_CXA_ATEXIT - def_bool y - depends on NEWLIB_2_0_or_later - select LIBC_PROVIDES_CXA_ATEXIT - -config NEWLIB_HAS_NANO_MALLOC - def_bool y - depends on NEWLIB_2_1_or_later - -config NEWLIB_HAS_NANO_FORMATTED_IO - def_bool y - depends on NEWLIB_2_2_or_later - config LIBC_NEWLIB_TARGET_CFLAGS string prompt "Target CFLAGS for newlib" @@ -197,7 +183,6 @@ config LIBC_NEWLIB_LTO config LIBC_NEWLIB_NANO_MALLOC bool prompt "Enable Nano Malloc" - depends on NEWLIB_HAS_NANO_MALLOC help NEWLIB has two implementations of malloc family's functions, one in `mallocr.c' and the other one in `nano-mallocr.c'. This options @@ -208,7 +193,6 @@ config LIBC_NEWLIB_NANO_MALLOC config LIBC_NEWLIB_NANO_FORMATTED_IO bool prompt "Enable Nano Formatted I/O" - depends on NEWLIB_HAS_NANO_FORMATTED_IO help This builds NEWLIB with a special implementation of formatted I/O functions, designed to lower the size of application on small systems diff --git a/config/libc/uClibc-ng.in b/config/libc/uClibc-ng.in new file mode 100644 index 0000000..705c0d4 --- /dev/null +++ b/config/libc/uClibc-ng.in @@ -0,0 +1,170 @@ +# uClibc options + +## depends on ! WINDOWS && ! BARE_METAL +## +## select LIBC_SUPPORT_THREADS_LT +## select LIBC_SUPPORT_THREADS_NONE +## select LIBC_SUPPORT_THREADS_NATIVE +## select CC_CORE_PASS_1_NEEDED +## +## help The de-facto standard for embeded linux systems. +## help +## help Highly configurable, thus as feature-rich as you +## help need, without compromising for size. + +config THREADS + default "nptl" if THREADS_NATIVE + default "linuxthreads" if THREADS_LT + +if ARCH_FLOAT_SOFTFP +comment "'softfp' ABI and uClibc is not entirely tested in crosstool-NG" +comment "You may experience issues, although it should work just fine" +endif # ARCH_FLOAT_SOFTFP + +choice + bool + prompt "uClibc verbosity:" + default LIBC_UCLIBC_VERBOSITY_0 + +config LIBC_UCLIBC_VERBOSITY_0 + bool + prompt "Quiet build" + help + Print terse command indications. + +config LIBC_UCLIBC_VERBOSITY_1 + bool + prompt "Brief build (show defines, ld flags)" + help + Print simplified command lines. + +config LIBC_UCLIBC_VERBOSITY_2 + bool + prompt "Very verbose build" + help + Print full command lines. + +endchoice + +# uClibc-ng has reverted the meaning of V=1 and V=2 compared to its +# ancestor, uClibc, in order to match kernel's Kbuild settings. +# Hence, for uClibc-ng supply V=2 if "brief build" is selected, +# and so forth. +config LIBC_UCLIBC_VERBOSITY + string + default "" if LIBC_UCLIBC_VERBOSITY_0 + default "V=2" if LIBC_UCLIBC_VERBOSITY_1 + default "V=1" if LIBC_UCLIBC_VERBOSITY_2 + +choice + bool + prompt "Debug level" + default LIBC_UCLIBC_DEBUG_LEVEL_0 + +config LIBC_UCLIBC_DEBUG_LEVEL_0 + bool + prompt "none" + +config LIBC_UCLIBC_DEBUG_LEVEL_1 + bool + prompt "minimal" + +config LIBC_UCLIBC_DEBUG_LEVEL_2 + bool + prompt "normal" + +config LIBC_UCLIBC_DEBUG_LEVEL_3 + bool + prompt "all" + +endchoice + +config LIBC_UCLIBC_DEBUG_LEVEL + int + default 0 if LIBC_UCLIBC_DEBUG_LEVEL_0 + default 1 if LIBC_UCLIBC_DEBUG_LEVEL_1 + default 2 if LIBC_UCLIBC_DEBUG_LEVEL_2 + default 3 if LIBC_UCLIBC_DEBUG_LEVEL_3 + +config LIBC_UCLIBC_CONFIG_FILE + string + prompt "Configuration file" + default "" + help + Path to the configuration file. + + If the file is not provided, we fall back to a default config file. + +config LIBC_UCLIBC_LOCALES + bool + select LIBC_UCLIBC_WCHAR + # Before it became a separate option, libiconv depended on locales + prompt "Add support for locales" + help + Say y if you want uClibc to support localisation. + + Note that seems to be broken on recent uClibc releases. + +config LIBC_UCLIBC_LIBICONV + bool "Enable iconv" + help + Say y if you want to enable and the corresponding interfaces. + +config LIBC_UCLIBC_IPV6 + bool + prompt "Add support for IPv6" + help + Say y if you want uClibc to support IPv6. + +config LIBC_UCLIBC_WCHAR + bool + prompt "Add support for WCHAR" + help + Say y if you want uClibc to support WCHAR. + + Maybe this is needed, if you're building a C++-Compiler + +config LIBC_UCLIBC_FENV + bool + prompt "Add support for fenv.h" + default y if ARCH_X86 + help + fenv.h provides functions to control the floating point environment, + such as rounding mode, exceptions... + + For some architectures, fenv.h is incomplete, so is not installed + by default. x86 is known to have a rather complete fenv.h, so it is + installed by default only for x86. + + If you need fenv.h on other architectures, say 'y' here, but you may + encounter some issues. + +config LIBC_UCLIBC_HAS_SSP + bool + prompt "Support stack smashing protection (SSP)" + default y + help + Enable support for building programs with -fstack-protector family + of options. If this option is disabled, one can also use a standalone + libssp library from GCC. + +config LIBC_UCLIBC_BUILD_SSP + bool + prompt "Build uClibc with SSP" + depends on LIBC_UCLIBC_HAS_SSP + help + Build uClibc with -fstack-protector. This adds runtime overhead + to many function calls and is disabled by default. + +if ARCH_ARM +config LIBC_UCLIBC_USE_GNU_SUFFIX + bool + default y + prompt "Use -uclibcgnueabi suffix" + help + Depending on where the resulting toolchain will be used, you may need + to tweak the "system" part of the target tuple. Buildroot prefers + to have arm-*-linux-uclibcgnueabi; OpenEmbedded prefers + arm-*-linux-uclibceabi. Other tools seem to either accept both, or + don't care about the suffix. +endif diff --git a/config/libc/uClibc.in b/config/libc/uClibc.in deleted file mode 100644 index c88bbc8..0000000 --- a/config/libc/uClibc.in +++ /dev/null @@ -1,239 +0,0 @@ -# uClibc options - -## depends on ! WINDOWS && ! BARE_METAL -## -## select LIBC_SUPPORT_THREADS_LT -## select LIBC_SUPPORT_THREADS_NONE -## select LIBC_SUPPORT_THREADS_NATIVE if UCLIBC_0_9_33_2_or_later -## select CC_CORE_PASS_1_NEEDED -## -## help The de-facto standard for embeded linux systems. -## help -## help Highly configurable, thus as feature-rich as you -## help need, without compromising for size. - -config THREADS - default "nptl" if THREADS_NATIVE - default "linuxthreads" if THREADS_LT - -if ARCH_FLOAT_SOFTFP -comment "'softfp' ABI and uClibc is not entirely tested in crosstool-NG" -comment "You may experience issues, although it should work just fine" -endif # ARCH_FLOAT_SOFTFP - -config LIBC_UCLIBC_HAS_SUNRPC - bool - default y if !UCLIBC_1_0_23_or_later - -config LIBC_UCLIBC_HAS_LIBICONV - bool - default y if UCLIBC_1_0_21_or_later - -config LIBC_UCLIBC_PARALLEL - def_bool y - depends on UCLIBC_0_9_33_2_or_later - -config LIBC_UCLIBC_NG - def_bool y - depends on UCLIBC_1_0_0_or_later - -# uClibc-ng 1.0.15 did away with 2 implementations of linuxthreads -config UCLIBC_MERGED_LINUXTHREADS - def_bool y - depends on UCLIBC_1_0_15_or_later - -choice - bool - prompt "uClibc verbosity:" - default LIBC_UCLIBC_VERBOSITY_0 - -config LIBC_UCLIBC_VERBOSITY_0 - bool - prompt "Quiet build" - help - Print terse command indications. - -config LIBC_UCLIBC_VERBOSITY_1 - bool - prompt "Brief build (show defines, ld flags)" - help - Print simplified command lines. - -config LIBC_UCLIBC_VERBOSITY_2 - bool - prompt "Very verbose build" - help - Print full command lines. - -endchoice - -# uClibc-ng has reverted the meaning of V=1 and V=2 compared to its -# ancestor, uClibc, in order to match kernel's Kbuild settings. -# Hence, for uClibc-ng supply V=2 if "brief build" is selected, -# and so forth. -config LIBC_UCLIBC_VERBOSITY - string - default "" if LIBC_UCLIBC_VERBOSITY_0 - default "V=2" if LIBC_UCLIBC_VERBOSITY_1 && LIBC_UCLIBC_NG - default "V=1" if LIBC_UCLIBC_VERBOSITY_1 - default "V=1" if LIBC_UCLIBC_VERBOSITY_2 && LIBC_UCLIBC_NG - default "V=2" if LIBC_UCLIBC_VERBOSITY_2 - -choice - bool - prompt "Debug level" - default LIBC_UCLIBC_DEBUG_LEVEL_0 - -config LIBC_UCLIBC_DEBUG_LEVEL_0 - bool - prompt "none" - -config LIBC_UCLIBC_DEBUG_LEVEL_1 - bool - prompt "minimal" - -config LIBC_UCLIBC_DEBUG_LEVEL_2 - bool - prompt "normal" - -config LIBC_UCLIBC_DEBUG_LEVEL_3 - bool - prompt "all" - -endchoice - -config LIBC_UCLIBC_DEBUG_LEVEL - int - default 0 if LIBC_UCLIBC_DEBUG_LEVEL_0 - default 1 if LIBC_UCLIBC_DEBUG_LEVEL_1 - default 2 if LIBC_UCLIBC_DEBUG_LEVEL_2 - default 3 if LIBC_UCLIBC_DEBUG_LEVEL_3 - -config LIBC_UCLIBC_CONFIG_FILE - string - prompt "Configuration file" - default "" - help - Path to the configuration file. - - If the file is not provided, we fall back to a default config file. - -if THREADS_LT && !UCLIBC_MERGED_LINUXTHREADS - -choice - bool - prompt "Linuxthread implementation: " - default LIBC_UCLIBC_LNXTHRD_OLD - -config LIBC_UCLIBC_LNXTHRD_OLD - bool - prompt "old/stable" - help - From the uClibc config option help: - There are two versions of linuxthreads. The older (stable) version - has been in uClibc for quite a long time but hasn't seen too many - updates other than bugfixes. - -config LIBC_UCLIBC_LNXTHRD_NEW - bool - prompt "new" - help - From the uClibc config option help: - The new version has not been tested much, and lacks ports for arches - which glibc does not support (like frv, etc...), but is based on - the latest code from glibc, so it may be the only choice for the - newer ports (like alpha/amd64/64bit arches and hppa). - -endchoice - -endif # THREADS_LT - -config LIBC_UCLIBC_LNXTHRD - string - default "" if THREADS_NONE - default "" if THREADS_NATIVE - default "" if UCLIBC_MERGED_LINUXTHREADS - default "old" if LIBC_UCLIBC_LNXTHRD_OLD - default "new" if LIBC_UCLIBC_LNXTHRD_NEW - -config LIBC_UCLIBC_LOCALES - bool - select LIBC_UCLIBC_WCHAR - # Before it became a separate option, libiconv depended on locales - prompt "Add support for locales" - help - Say y if you want uClibc to support localisation. - - Note that seems to be broken on recent uClibc releases. - -config LIBC_UCLIBC_LIBICONV - bool "Enable iconv" - depends on LIBC_UCLIBC_HAS_LIBICONV - help - Say y if you want to enable and the corresponding interfaces. - -config LIBC_UCLIBC_IPV6 - bool - prompt "Add support for IPv6" - help - Say y if you want uClibc to support IPv6. - -config LIBC_UCLIBC_WCHAR - bool - prompt "Add support for WCHAR" - help - Say y if you want uClibc to support WCHAR. - - Maybe this is needed, if you're building a C++-Compiler - -config LIBC_UCLIBC_FENV - bool - prompt "Add support for fenv.h" - default y if ARCH_X86 - help - fenv.h provides functions to control the floating point environment, - such as rounding mode, exceptions... - - For some architectures, fenv.h is incomplete, so is not installed - by default. x86 is known to have a rather complete fenv.h, so it is - installed by default only for x86. - - If you need fenv.h on other architectures, say 'y' here, but you may - encounter some issues. - -config LIBC_UCLIBC_RPC - bool - prompt "Add support for RPC" - depends on LIBC_UCLIBC_HAS_SUNRPC - help - Enable support for remote procedure calls (RPC) in uClibc. - -config LIBC_UCLIBC_HAS_SSP - bool - prompt "Support stack smashing protection (SSP)" - default y - help - Enable support for building programs with -fstack-protector family - of options. If this option is disabled, one can also use a standalone - libssp library from GCC. - -config LIBC_UCLIBC_BUILD_SSP - bool - prompt "Build uClibc with SSP" - depends on LIBC_UCLIBC_HAS_SSP - help - Build uClibc with -fstack-protector. This adds runtime overhead - to many function calls and is disabled by default. - -if ARCH_ARM -config LIBC_UCLIBC_USE_GNU_SUFFIX - bool - default y - prompt "Use -uclibcgnueabi suffix" - help - Depending on where the resulting toolchain will be used, you may need - to tweak the "system" part of the target tuple. Buildroot prefers - to have arm-*-linux-uclibcgnueabi; OpenEmbedded prefers - arm-*-linux-uclibceabi. Other tools seem to either accept both, or - don't care about the suffix. -endif diff --git a/packages/cloog/package.desc b/packages/cloog/package.desc index f16f787..a06899f 100644 --- a/packages/cloog/package.desc +++ b/packages/cloog/package.desc @@ -1,5 +1,4 @@ pkg_label='CLooG' repository='git git://repo.or.cz/cloog.git' mirrors='http://www.bastoul.net/cloog/pages/download' -milestones='0.18.1 0.18.4' archive_formats='.tar.gz' diff --git a/packages/gcc/package.desc b/packages/gcc/package.desc index 186f1a3..3a66781 100644 --- a/packages/gcc/package.desc +++ b/packages/gcc/package.desc @@ -2,5 +2,5 @@ repository='svn svn://gcc.gnu.org/svn/gcc' mirrors='$(CT_Mirrors GNU gcc/gcc-${CT_GCC_VERSION}) $(CT_Mirrors sourceware gcc/releases/gcc-${CT_GCC_VERSION})' relevantpattern='4.*|. *|.' origin='GNU' -milestones='4.8 4.9 5 6 7 8 9 10 11' +milestones='4.9 5 6 7 8 9 10 11' archive_formats='.tar.xz .tar.gz' diff --git a/packages/gmp/package.desc b/packages/gmp/package.desc index 5936eea..c6ca8c5 100644 --- a/packages/gmp/package.desc +++ b/packages/gmp/package.desc @@ -2,6 +2,5 @@ repository='hg https://gmplib.org/repo/gmp/' bootstrap='./.bootstrap' mirrors='https://gmplib.org/download/gmp https://gmplib.org/download/gmp/archive $(CT_Mirrors GNU gmp)' relevantpattern='*.*|.' -milestones='5.0.0 5.1.0' archive_formats='.tar.xz .tar.lz .tar.bz2' signature_format='packed/.sig' diff --git a/packages/isl/package.desc b/packages/isl/package.desc index 20f7e02..7ad6ae2 100644 --- a/packages/isl/package.desc +++ b/packages/isl/package.desc @@ -2,5 +2,5 @@ repository='git git://repo.or.cz/isl.git' bootstrap='./autogen.sh' mirrors='https://libisl.sourceforge.io' relevantpattern='*.*|.' -milestones='0.12 0.13 0.14 0.15 0.18' +milestones='0.15 0.18' archive_formats='.tar.xz .tar.bz2 .tar.gz' diff --git a/packages/make/package.desc b/packages/make/package.desc index c82c516..bd789ad 100644 --- a/packages/make/package.desc +++ b/packages/make/package.desc @@ -4,4 +4,3 @@ mirrors='$(CT_Mirrors GNU make)' relevantpattern='*.*|.' archive_formats='.tar.lz .tar.gz' signature_format='packed/.sig' -milestones='4.0' diff --git a/packages/mingw-w64/package.desc b/packages/mingw-w64/package.desc index d2f7e6d..6e09f67 100644 --- a/packages/mingw-w64/package.desc +++ b/packages/mingw-w64/package.desc @@ -1,6 +1,5 @@ repository='git https://git.code.sf.net/p/mingw-w64/mingw-w64' mirrors='http://downloads.sourceforge.net/sourceforge/mingw-w64 https://downloads.sourceforge.net/project/mingw-w64/mingw-w64/mingw-w64-release/' relevantpattern='v*.*|.' -milestones='v4' archive_formats='.tar.bz2 .zip' signature_format='packed/.sig' diff --git a/packages/mpfr/package.desc b/packages/mpfr/package.desc index 43b8a36..15c54b5 100644 --- a/packages/mpfr/package.desc +++ b/packages/mpfr/package.desc @@ -5,4 +5,4 @@ mirrors='http://www.mpfr.org/mpfr-${CT_MPFR_VERSION} $(CT_Mirrors GNU mpfr)' relevantpattern='*.*|.' archive_formats='.tar.xz .tar.bz2 .tar.gz .zip' signature_format='packed/.asc' -milestones='3.0.0 4.0.0' +milestones='4.0.0' diff --git a/packages/newlib-nano/package.desc b/packages/newlib-nano/package.desc index 1529f3e..ba18016 100644 --- a/packages/newlib-nano/package.desc +++ b/packages/newlib-nano/package.desc @@ -3,7 +3,6 @@ repository='git git://sourceware.org/git/newlib-cygwin.git' # Do not use "$(CT_Mirrors sourceware newlib)" here: the mirrors (kernel.org # and gnu.org) only store some older releases of newlib (2.0.0 and before). mirrors='ftp://sourceware.org/pub/newlib' -milestones='2.0 2.1 2.2' relevantpattern='*.*|.*. *.*|.' archive_filename='newlib-@{version}' archive_dirname='newlib-@{version}' diff --git a/packages/newlib/package.desc b/packages/newlib/package.desc index d9ebb3d..27a5fa6 100644 --- a/packages/newlib/package.desc +++ b/packages/newlib/package.desc @@ -3,6 +3,5 @@ repository='git git://sourceware.org/git/newlib-cygwin.git' # Do not use "$(CT_Mirrors sourceware newlib)" here: the mirrors (kernel.org # and gnu.org) only store some older releases of newlib (2.0.0 and before). mirrors='ftp://sourceware.org/pub/newlib' -milestones='2.0 2.1 2.2' relevantpattern='*.*|.*. *.*|.' archive_formats='.tar.gz' diff --git a/packages/uClibc-ng/package.desc b/packages/uClibc-ng/package.desc index 5d8eb98..4257bd2 100644 --- a/packages/uClibc-ng/package.desc +++ b/packages/uClibc-ng/package.desc @@ -1,4 +1,3 @@ -master='uClibc' origin='uclibc-ng.org' repository='git git://uclibc-ng.org/git/uclibc-ng' mirrors='http://downloads.uclibc-ng.org/releases/${CT_UCLIBC_NG_VERSION}' diff --git a/packages/uClibc/config b/packages/uClibc/config deleted file mode 100644 index 104eb5c..0000000 --- a/packages/uClibc/config +++ /dev/null @@ -1,277 +0,0 @@ -# -# Automatically generated make config: don't edit -# Version: 0.9.32-git -# Fri Jul 9 22:31:59 2010 -# -# TARGET_alpha is not set -# TARGET_arm is not set -# TARGET_avr32 is not set -# TARGET_bfin is not set -# TARGET_cris is not set -# TARGET_e1 is not set -# TARGET_frv is not set -# TARGET_h8300 is not set -# TARGET_hppa is not set -# TARGET_i386 is not set -# TARGET_i960 is not set -# TARGET_ia64 is not set -# TARGET_m68k is not set -# TARGET_microblaze is not set -# TARGET_mips is not set -# TARGET_nios is not set -# TARGET_nios2 is not set -# TARGET_powerpc is not set -# TARGET_sh is not set -# TARGET_sh64 is not set -# TARGET_sparc is not set -# TARGET_v850 is not set -# TARGET_vax is not set -# TARGET_x86_64 is not set -# TARGET_xtensa is not set -# TARGET_c6x is not set - -# CONFIG_GENERIC_ARM is not set -# CONFIG_ARM610 is not set -# CONFIG_ARM710 is not set -# CONFIG_ARM7TDMI is not set -# CONFIG_ARM720T is not set -# CONFIG_ARM920T is not set -# CONFIG_ARM922T is not set -# CONFIG_ARM926T is not set -# CONFIG_ARM10T is not set -# CONFIG_ARM1136JF_S is not set -# CONFIG_ARM1176JZ_S is not set -# CONFIG_ARM1176JZF_S is not set -# CONFIG_ARM_CORTEX_M3 is not set -# CONFIG_ARM_CORTEX_M1 is not set -# CONFIG_ARM_SA110 is not set -# CONFIG_ARM_SA1100 is not set -# CONFIG_ARM_XSCALE is not set -# CONFIG_ARM_IWMMXT is not set - -# COMPILE_IN_THUMB_MODE is not set -USE_BX=y - -TARGET_SUBARCH="" -# -# Target Architecture Features and Options -# -TARGET_ARCH="none" -FORCE_OPTIONS_FOR_ARCH=y -# -# Using ELF file format -# -# ARCH_LITTLE_ENDIAN is not set -# ARCH_BIG_ENDIAN is not set -# ARCH_WANTS_LITTLE_ENDIAN is not set -# ARCH_WANTS_BIG_ENDIAN is not set -ARCH_HAS_MMU=y -ARCH_USE_MMU=y -UCLIBC_HAS_FLOATS=y -UCLIBC_HAS_FPU=y -DO_C99_MATH=y -# DO_XSI_MATH is not set -# UCLIBC_HAS_FENV is not set -UCLIBC_HAS_LONG_DOUBLE_MATH=y -KERNEL_HEADERS="/usr/src/linux/include" -HAVE_DOT_CONFIG=y - -# -# General Library Settings -# -# HAVE_NO_PIC is not set -DOPIC=y -# ARCH_HAS_NO_SHARED is not set -# ARCH_HAS_NO_LDSO is not set -# FORCE_SHAREABLE_TEXT_SEGMENTS is not set -LDSO_LDD_SUPPORT=y -# LDSO_CACHE_SUPPORT is not set -LDSO_PRELOAD_ENV_SUPPORT=y -# LDSO_PRELOAD_FILE_SUPPORT is not set -# LDSO_STANDALONE_SUPPORT is not set -# LDSO_PRELINK_SUPPORT is not set -# UCLIBC_STATIC_LDCONFIG is not set -LDSO_RUNPATH=y -LDSO_SEARCH_INTERP_PATH=y -LDSO_LD_LIBRARY_PATH=y -# LDSO_NO_CLEANUP is not set -UCLIBC_CTOR_DTOR=y -# LDSO_GNU_HASH_SUPPORT is not set -# HAS_NO_THREADS is not set -LINUXTHREADS_OLD=y -# LINUXTHREADS_NEW is not set -# UCLIBC_HAS_THREADS_NATIVE is not set -UCLIBC_HAS_THREADS=y -# PTHREADS_DEBUG_SUPPORT is not set -UCLIBC_HAS_SYSLOG=y -UCLIBC_HAS_LFS=y -# MALLOC is not set -# MALLOC_SIMPLE is not set -MALLOC_STANDARD=y -MALLOC_GLIBC_COMPAT=y -UCLIBC_DYNAMIC_ATEXIT=y -# COMPAT_ATEXIT is not set -UCLIBC_SUSV3_LEGACY=y -# UCLIBC_SUSV3_LEGACY_MACROS is not set -UCLIBC_SUSV4_LEGACY=y -# UCLIBC_STRICT_HEADERS is not set -# UCLIBC_HAS_STUBS is not set -UCLIBC_HAS_SHADOW=y -UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y -UCLIBC_HAS___PROGNAME=y -UCLIBC_HAS_PTY=y -ASSUME_DEVPTS=y -UNIX98PTY_ONLY=y -UCLIBC_HAS_GETPT=y -UCLIBC_HAS_LIBUTIL=y -UCLIBC_HAS_TM_EXTENSIONS=y -UCLIBC_HAS_TZ_CACHING=y -UCLIBC_HAS_TZ_FILE=y -UCLIBC_HAS_TZ_FILE_READ_MANY=y -UCLIBC_TZ_FILE_PATH="/etc/TZ" -UCLIBC_FALLBACK_TO_ETC_LOCALTIME=y - -# -# Advanced Library Settings -# -UCLIBC_PWD_BUFFER_SIZE=256 -UCLIBC_GRP_BUFFER_SIZE=256 - -# -# Support various families of functions -# -UCLIBC_LINUX_MODULE_26=y -# UCLIBC_LINUX_MODULE_24 is not set -UCLIBC_LINUX_SPECIFIC=y -UCLIBC_HAS_GNU_ERROR=y -UCLIBC_BSD_SPECIFIC=y -UCLIBC_HAS_BSD_ERR=y -# UCLIBC_HAS_OBSOLETE_BSD_SIGNAL is not set -# UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL is not set -# UCLIBC_NTP_LEGACY is not set -# UCLIBC_SV4_DEPRECATED is not set -UCLIBC_HAS_REALTIME=y -UCLIBC_HAS_ADVANCED_REALTIME=y -UCLIBC_HAS_EPOLL=y -UCLIBC_HAS_XATTR=y -UCLIBC_HAS_PROFILING=y -UCLIBC_HAS_CRYPT_IMPL=y -# UCLIBC_HAS_SHA256_CRYPT_IMPL is not set -# UCLIBC_HAS_SHA512_CRYPT_IMPL is not set -UCLIBC_HAS_CRYPT=y -UCLIBC_HAS_NETWORK_SUPPORT=y -UCLIBC_HAS_SOCKET=y -UCLIBC_HAS_IPV4=y -# UCLIBC_HAS_IPV6 is not set -# UCLIBC_HAS_RPC is not set -# UCLIBC_HAS_FULL_RPC is not set -# UCLIBC_HAS_REENTRANT_RPC is not set -UCLIBC_USE_NETLINK=y -UCLIBC_SUPPORT_AI_ADDRCONFIG=y -# UCLIBC_HAS_BSD_RES_CLOSE is not set -UCLIBC_HAS_COMPAT_RES_STATE=y -# UCLIBC_HAS_EXTRA_COMPAT_RES_STATE is not set -UCLIBC_HAS_RESOLVER_SUPPORT=y -UCLIBC_HAS_LIBRESOLV_STUB=y -UCLIBC_HAS_LIBNSL_STUB=y - -# -# String and Stdio Support -# -UCLIBC_HAS_STRING_GENERIC_OPT=y -UCLIBC_HAS_STRING_ARCH_OPT=y -UCLIBC_HAS_CTYPE_TABLES=y -UCLIBC_HAS_CTYPE_SIGNED=y -# UCLIBC_HAS_CTYPE_UNSAFE is not set -UCLIBC_HAS_CTYPE_CHECKED=y -# UCLIBC_HAS_CTYPE_ENFORCED is not set -# UCLIBC_HAS_WCHAR is not set -# UCLIBC_HAS_LOCALE is not set -UCLIBC_HAS_HEXADECIMAL_FLOATS=y -# UCLIBC_HAS_GLIBC_DIGIT_GROUPING is not set -UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y -# USE_OLD_VFPRINTF is not set -UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9 -UCLIBC_HAS_SCANF_GLIBC_A_FLAG=y -# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set -# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set -# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set -# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set -# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set -UCLIBC_HAS_STDIO_BUFSIZ_4096=y -# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set -UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y -# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set -# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set -# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set -UCLIBC_HAS_STDIO_GETC_MACRO=y -UCLIBC_HAS_STDIO_PUTC_MACRO=y -UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y -# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set -UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y -# UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE is not set -UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y -UCLIBC_HAS_PRINTF_M_SPEC=y -UCLIBC_HAS_ERRNO_MESSAGES=y -# UCLIBC_HAS_SYS_ERRLIST is not set -UCLIBC_HAS_SIGNUM_MESSAGES=y -# UCLIBC_HAS_SYS_SIGLIST is not set -UCLIBC_HAS_GNU_GETOPT=y -UCLIBC_HAS_GNU_GETSUBOPT=y - -# -# Big and Tall -# -UCLIBC_HAS_REGEX=y -# UCLIBC_HAS_REGEX_OLD is not set -UCLIBC_HAS_FNMATCH=y -# UCLIBC_HAS_FNMATCH_OLD is not set -# UCLIBC_HAS_WORDEXP is not set -UCLIBC_HAS_NFTW=y -UCLIBC_HAS_FTW=y -# UCLIBC_HAS_FTS is not set -UCLIBC_HAS_GLOB=y -UCLIBC_HAS_GNU_GLOB=y -UCLIBC_HAS_UTMPX=y - -# -# Library Installation Options -# -RUNTIME_PREFIX="/" -DEVEL_PREFIX="/usr/" -MULTILIB_DIR="lib" -HARDWIRED_ABSPATH=y - -# -# Security options -# -# UCLIBC_BUILD_PIE is not set -# UCLIBC_HAS_ARC4RANDOM is not set -# HAVE_NO_SSP is not set -UCLIBC_HAS_SSP=y -# UCLIBC_HAS_SSP_COMPAT is not set -# SSP_QUICK_CANARY is not set -PROPOLICE_BLOCK_ABRT=y -# PROPOLICE_BLOCK_SEGV is not set -# UCLIBC_BUILD_SSP is not set -UCLIBC_BUILD_RELRO=y -UCLIBC_BUILD_NOW=y -UCLIBC_BUILD_NOEXECSTACK=y - -# -# uClibc development/debugging options -# -CROSS_COMPILER_PREFIX="" -UCLIBC_EXTRA_CFLAGS="" -# DODEBUG is not set -# DODEBUG_PT is not set -# DOSTRIP is not set -# DOASSERTS is not set -# SUPPORT_LD_DEBUG is not set -# SUPPORT_LD_DEBUG_EARLY is not set -# UCLIBC_MALLOC_DEBUGGING is not set -# UCLIBC_HAS_BACKTRACE is not set -WARNINGS="-Wall" -# EXTRA_WARNINGS is not set -# DOMULTI is not set -# UCLIBC_MJN3_ONLY is not set diff --git a/packages/uClibc/package.desc b/packages/uClibc/package.desc deleted file mode 100644 index 7035b96..0000000 --- a/packages/uClibc/package.desc +++ /dev/null @@ -1,8 +0,0 @@ -# Even though this is the "master" package, we really want to steer the users -# towards uClibc-ng, as the original uClibc is no longer maintained. -preferred='uClibc-ng' -origin='uclibc.org' -repository='git git://git.busybox.net/uClibc' -mirrors='http://www.uclibc.org/downloads http://www.uclibc.org/downloads/old-releases' -milestones='0.9.33.2 1.0.0 1.0.15 1.0.21 1.0.23' -archive_formats='.tar.xz .tar.bz2' diff --git a/samples/sparc-leon-linux-uclibc/uClibc-ng.config b/samples/sparc-leon-linux-uclibc/uClibc-ng.config new file mode 100644 index 0000000..c81724c --- /dev/null +++ b/samples/sparc-leon-linux-uclibc/uClibc-ng.config @@ -0,0 +1,19 @@ +TARGET_sparc=y +# UCLIBC_HAS_FPU is not set +DO_C99_MATH=y +UCLIBC_HAS_THREADS_NATIVE=y +UCLIBC_HAS_UTMPX=y +UCLIBC_HAS_UTMP=y +UCLIBC_SUSV3_LEGACY=y +UCLIBC_SUSV4_LEGACY=y +# UNIX98PTY_ONLY is not set +UCLIBC_HAS_LIBUTIL=y +UCLIBC_HAS_SHA256_CRYPT_IMPL=y +UCLIBC_HAS_SHA512_CRYPT_IMPL=y +UCLIBC_HAS_IPV6=y +UCLIBC_USE_NETLINK=y +UCLIBC_HAS_RESOLVER_SUPPORT=y +UCLIBC_HAS_LIBRESOLV_STUB=y +UCLIBC_HAS_WCHAR=y +UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y +UCLIBC_HAS_PRINTF_M_SPEC=y diff --git a/samples/sparc-leon-linux-uclibc/uClibc.config b/samples/sparc-leon-linux-uclibc/uClibc.config deleted file mode 100644 index c81724c..0000000 --- a/samples/sparc-leon-linux-uclibc/uClibc.config +++ /dev/null @@ -1,19 +0,0 @@ -TARGET_sparc=y -# UCLIBC_HAS_FPU is not set -DO_C99_MATH=y -UCLIBC_HAS_THREADS_NATIVE=y -UCLIBC_HAS_UTMPX=y -UCLIBC_HAS_UTMP=y -UCLIBC_SUSV3_LEGACY=y -UCLIBC_SUSV4_LEGACY=y -# UNIX98PTY_ONLY is not set -UCLIBC_HAS_LIBUTIL=y -UCLIBC_HAS_SHA256_CRYPT_IMPL=y -UCLIBC_HAS_SHA512_CRYPT_IMPL=y -UCLIBC_HAS_IPV6=y -UCLIBC_USE_NETLINK=y -UCLIBC_HAS_RESOLVER_SUPPORT=y -UCLIBC_HAS_LIBRESOLV_STUB=y -UCLIBC_HAS_WCHAR=y -UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y -UCLIBC_HAS_PRINTF_M_SPEC=y diff --git a/scripts/build/arch/arm.sh b/scripts/build/arch/arm.sh index 9a53bc4..01a40bd 100644 --- a/scripts/build/arch/arm.sh +++ b/scripts/build/arch/arm.sh @@ -16,7 +16,7 @@ CT_DoArchTupleValues() { # The system part of the tuple: case "${CT_LIBC},${CT_ARCH_ARM_EABI}" in glibc,y) CT_TARGET_SYS=gnueabi;; - uClibc,y) CT_TARGET_SYS=uclibc${CT_LIBC_UCLIBC_USE_GNU_SUFFIX:+gnu}eabi;; + uClibc-ng,y)CT_TARGET_SYS=uclibc${CT_LIBC_UCLIBC_USE_GNU_SUFFIX:+gnu}eabi;; musl,y) CT_TARGET_SYS=musleabi;; bionic,y) CT_TARGET_SYS=androideabi;; *,y) CT_TARGET_SYS=eabi;; diff --git a/scripts/build/arch/powerpc.sh b/scripts/build/arch/powerpc.sh index 85c64d1..245adbe 100644 --- a/scripts/build/arch/powerpc.sh +++ b/scripts/build/arch/powerpc.sh @@ -14,7 +14,7 @@ CT_DoArchTupleValues () { case "${CT_LIBC}" in none|newlib|picolibc) CT_TARGET_SYS="elfspe";; *glibc) CT_TARGET_SYS="gnuspe";; - uClibc) CT_TARGET_SYS="uclibcgnuspe";; + uClibc-ng) CT_TARGET_SYS="uclibcgnuspe";; esac ;; esac diff --git a/scripts/build/companion_libs/100-gmp.sh b/scripts/build/companion_libs/100-gmp.sh index 3655787..a17eda9 100644 --- a/scripts/build/companion_libs/100-gmp.sh +++ b/scripts/build/companion_libs/100-gmp.sh @@ -109,12 +109,6 @@ do_gmp_backend() { CT_DoLog EXTRA "Configuring GMP" - # FIXME is it needed even for older versions? They seem to compile fine - # without it. - if [ "${CT_GMP_HAS_MPBSD}" = "y" ]; then - extra_config+=("--enable-mpbsd") - fi - # To avoind “illegal text-relocation” linking error against # the static library, see: # https://github.com/Homebrew/homebrew-core/pull/25470 diff --git a/scripts/build/companion_libs/121-isl.sh b/scripts/build/companion_libs/121-isl.sh index 8b1b720..3577b75 100644 --- a/scripts/build/companion_libs/121-isl.sh +++ b/scripts/build/companion_libs/121-isl.sh @@ -84,15 +84,6 @@ do_isl_backend() { CT_DoLog EXTRA "Configuring ISL" - if [ "${CT_ISL_NEEDS_WITH_GMP}" != "y" ]; then - extra_config+=("--with-libgmp-prefix=${prefix}") - extra_config+=("--with-libgmpxx-prefix=${prefix}") - fi - - if [ "${CT_ISL_HAS_WITH_PIPLIB}" != "y" ]; then - extra_config+=("--with-piplib=no") - fi - CT_DoExecLog CFG \ CFLAGS="${cflags}" \ CXXFLAGS="${cxxflags}" \ diff --git a/scripts/build/debug/400-ltrace.sh b/scripts/build/debug/400-ltrace.sh index 3f08226..9c9052a 100644 --- a/scripts/build/debug/400-ltrace.sh +++ b/scripts/build/debug/400-ltrace.sh @@ -19,32 +19,12 @@ do_debug_ltrace_build() { CT_Pushd "${CT_BUILD_DIR}/build-ltrace" CT_DoLog EXTRA "Configuring ltrace" - # ltrace-0.5.3 has a unique hand-crafted configure script. Releases - # 0.5.2 and earlier as well as 0.6.0 and later use GNU autotools. - if [ "${LTRACE_0_5_3_CONFIGURE}" = "y" ]; then - case "${CT_ARCH}:${CT_ARCH_BITNESS}" in - x86:32) ltrace_host="i386";; - x86:64) ltrace_host="x86_64";; - powerpc:*) ltrace_host="ppc";; - mips:*) ltrace_host="mipsel";; - *) ltrace_host="${CT_ARCH}";; - esac - CT_DoExecLog CFG \ - CC="${CT_TARGET}-${CT_CC}" \ - AR="${CT_TARGET}-ar" \ - HOST="${ltrace_host}" \ - HOST_OS="${CT_TARGET_KERNEL}" \ - CFLAGS="${CT_ALL_TARGET_CFLAGS}"\ - ${CONFIG_SHELL} \ - ./configure --prefix=/usr - else - CT_DoExecLog CFG \ - ${CONFIG_SHELL} \ - ./configure \ - --build=${CT_BUILD} \ - --host=${CT_TARGET} \ - --prefix=/usr - fi + CT_DoExecLog CFG \ + ${CONFIG_SHELL} \ + ./configure \ + --build=${CT_BUILD} \ + --host=${CT_TARGET} \ + --prefix=/usr CT_DoLog EXTRA "Building ltrace" CT_DoExecLog ALL make diff --git a/scripts/build/libc/mingw-w64.sh b/scripts/build/libc/mingw-w64.sh index 683f8be..60f514a 100644 --- a/scripts/build/libc/mingw-w64.sh +++ b/scripts/build/libc/mingw-w64.sh @@ -56,15 +56,13 @@ mingw_w64_start_files() { do_check_mingw_vendor_tuple() { - if [ "${CT_MINGW_W64_REQUIRES_W64_VENDOR}" = "y" ]; then - CT_DoStep INFO "Checking configured vendor tuple" - if [ ${CT_TARGET_VENDOR} = "w64" ]; then - CT_DoLog DEBUG "The tuple is set to '${CT_TARGET_VENDOR}', as recommended by mingw-64 developers." - else - CT_DoLog WARN "The tuple vendor is '${CT_TARGET_VENDOR}', not equal to 'w64' and might break the toolchain!" - fi - CT_EndStep - fi + CT_DoStep INFO "Checking configured vendor tuple" + if [ ${CT_TARGET_VENDOR} = "w64" ]; then + CT_DoLog DEBUG "The tuple is set to '${CT_TARGET_VENDOR}', as recommended by mingw-64 developers." + else + CT_DoLog WARN "The tuple vendor is '${CT_TARGET_VENDOR}', not equal to 'w64' and might break the toolchain!" + fi + CT_EndStep } do_mingw_tools() diff --git a/scripts/build/libc/uClibc-ng.sh b/scripts/build/libc/uClibc-ng.sh new file mode 100644 index 0000000..16ebc2c --- /dev/null +++ b/scripts/build/libc/uClibc-ng.sh @@ -0,0 +1,421 @@ +# This file declares functions to install the uClibc C library +# Copyright 2007 Yann E. MORIN +# Licensed under the GPL v2. See COPYING in the root of this package + +# Build and install headers and start files +uClibc_ng_start_files() +{ + # Start files and Headers should be configured the same way as the + # final libc, but built and installed differently. + uClibc_ng_backend libc_mode=startfiles +} + +# This function builds and install the full C library +uClibc_ng_main() +{ + uClibc_ng_backend libc_mode=final +} + +# Common backend for 1st and 2nd passes. +uClibc_ng_backend() +{ + local libc_mode + local arg + + for arg in "$@"; do + eval "${arg// /\\ }" + done + + case "${libc_mode}" in + startfiles) CT_DoStep INFO "Installing C library headers & start files";; + final) CT_DoStep INFO "Installing C library";; + *) CT_Abort "Unsupported (or unset) libc_mode='${libc_mode}'";; + esac + + CT_mkdir_pushd "${CT_BUILD_DIR}/build-libc-${libc_mode}" + CT_IterateMultilibs uClibc_ng_backend_once multilib libc_mode="${libc_mode}" + CT_Popd + CT_EndStep +} + +# Common backend for 1st and 2nd passes, once per multilib. +uClibc_ng_backend_once() +{ + local libc_mode + local multi_dir multi_os_dir multi_root multi_flags multi_index multi_count + local multilib_dir startfiles_dir + local jflag=${CT_JOBSFLAGS} + local -a make_args + local extra_cflags f cfg_cflags cf + local hdr_install_subdir + + for arg in "$@"; do + eval "${arg// /\\ }" + done + + CT_DoStep INFO "Building for multilib ${multi_index}/${multi_count}: '${multi_flags}'" + + multilib_dir="lib/${multi_os_dir}" + startfiles_dir="${multi_root}/usr/${multilib_dir}" + CT_SanitizeVarDir multilib_dir startfiles_dir + + # Construct make arguments: + # - uClibc uses the CROSS environment variable as a prefix to the compiler + # tools to use. Since it requires core pass-1, thusly named compiler is + # already available. + # - Note about CFLAGS: In uClibc, CFLAGS are generated by Rules.mak, + # depending on the configuration of the library. That is, they are tailored + # to best fit the target. So it is useless and seems to be a bad thing to + # use LIBC_EXTRA_CFLAGS here. + # - We do _not_ want to strip anything for now, in case we specifically + # asked for a debug toolchain, thus the STRIPTOOL= assignment. + make_args=( CROSS_COMPILE="${CT_TARGET}-" \ + HOSTCC="${CT_BUILD}-gcc" \ + PREFIX="${multi_root}/" \ + MULTILIB_DIR="${multilib_dir}" \ + STRIPTOOL=true \ + ${CT_LIBC_UCLIBC_VERBOSITY} \ + ) + + # Simply copy files until uClibc has the ability to build out-of-tree + CT_DoLog EXTRA "Copying sources to build dir" + CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/uClibc-ng/." . + + # Force the date of the pregen locale data, as the + # newer ones that are referenced are not available + CT_DoLog EXTRA "Applying configuration" + + # Use the default config if the user did not provide one. + if [ -z "${CT_LIBC_UCLIBC_CONFIG_FILE}" ]; then + CT_LIBC_UCLIBC_CONFIG_FILE="${CT_LIB_DIR}/packages/uClibc-ng/config" + fi + + manage_uClibc_config "${CT_LIBC_UCLIBC_CONFIG_FILE}" .config "${multi_flags}" + CT_DoExecLog ALL make "${make_args[@]}" olddefconfig + + # Now filter the multilib flags. manage_uClibc_config did the opposite of + # what Rules.mak in uClibc would do: by the multilib's CFLAGS, it determined + # the applicable configuration options. We don't want to pass the same options + # in the UCLIBC_EXTRA_CFLAGS again (on some targets, the options do not correctly + # override each other). On the other hand, we do not want to lose the options + # that are not reflected in the .config. + extra_cflags="-pipe" + { echo "include Rules.mak"; echo "show-cpu-flags:"; printf '\t@echo $(CPU_CFLAGS)\n'; } \ + > .show-cpu-cflags.mk + cfg_cflags=$( make "${make_args[@]}" \ + --no-print-directory -f .show-cpu-cflags.mk show-cpu-flags ) + CT_DoExecLog ALL rm -f .show-cpu-cflags.mk + CT_DoLog DEBUG "CPU_CFLAGS detected by uClibc: ${cfg_cflags[@]}" + for f in ${multi_flags}; do + for cf in ${cfg_cflags}; do + if [ "${f}" = "${cf}" ]; then + f= + break + fi + done + if [ -n "${f}" ]; then + extra_cflags+=" ${f}" + fi + done + CT_DoLog DEBUG "Filtered multilib CFLAGS: ${extra_cflags}" + make_args+=( UCLIBC_EXTRA_CFLAGS="${extra_cflags}" ) + + # uClibc does not have a way to select the installation subdirectory for headers, + # it is always $(DEVEL_PREFIX)/include. Also, we're reinstalling the headers + # at the final stage (see the note below), we may already have the subdirectory + # in /usr/include. + CT_DoArchUClibcHeaderDir hdr_install_subdir "${multi_flags}" + if [ -n "${hdr_install_subdir}" ]; then + CT_DoExecLog ALL cp -a "${multi_root}/usr/include" "${multi_root}/usr/include.saved" + fi + + if [ "${libc_mode}" = "startfiles" ]; then + CT_DoLog EXTRA "Building headers" + CT_DoExecLog ALL make "${make_args[@]}" headers + + # Ensure the directory for installing multilib-specific binaries exists. + CT_DoExecLog ALL mkdir -p "${startfiles_dir}" + + CT_DoLog EXTRA "Installing headers" + CT_DoExecLog ALL make "${make_args[@]}" install_headers + + # The check might look bogus, but it is the same condition as is used + # by GCC build script to enable/disable shared library support. + if [ "${CT_THREADS}" = "nptl" ]; then + CT_DoLog EXTRA "Building start files" + CT_DoExecLog ALL make ${jflag} "${make_args[@]}" \ + lib/crt1.o lib/crti.o lib/crtn.o + + if [ "${CT_SHARED_LIBS}" = "y" ]; then + # From: http://git.openembedded.org/cgit.cgi/openembedded/commit/?id=ad5668a7ac7e0436db92e55caaf3fdf782b6ba3b + # libm.so is needed for ppc, as libgcc is linked against libm.so + # No problem to create it for other archs. + CT_DoLog EXTRA "Building dummy shared libs" + CT_DoExecLog ALL "${CT_TARGET}-${CT_CC}" -nostdlib -nostartfiles \ + -shared ${multi_flags} -x c /dev/null -o libdummy.so + + CT_DoLog EXTRA "Installing start files" + CT_DoExecLog ALL install -m 0644 lib/crt1.o lib/crti.o lib/crtn.o \ + "${startfiles_dir}" + + CT_DoLog EXTRA "Installing dummy shared libs" + CT_DoExecLog ALL install -m 0755 libdummy.so "${startfiles_dir}/libc.so" + CT_DoExecLog ALL install -m 0755 libdummy.so "${startfiles_dir}/libm.so" + fi # CT_SHARED_LIBS == y + fi # CT_THREADS == nptl + fi # libc_mode == startfiles + + if [ "${libc_mode}" = "final" ]; then + CT_DoLog EXTRA "Cleaning up startfiles" + CT_DoExecLog ALL rm -f "${startfiles_dir}/crt1.o" \ + "${startfiles_dir}/crti.o" \ + "${startfiles_dir}/crtn.o" \ + "${startfiles_dir}/libc.so" \ + "${startfiles_dir}/libm.so" + + CT_DoLog EXTRA "Building C library" + CT_DoExecLog ALL make "${make_args[@]}" pregen + CT_DoExecLog ALL make ${jflag} "${make_args[@]}" all + + # YEM-FIXME: + # - we want to install 'runtime' files, eg. lib*.{a,so*}, crti.o and + # such files, except the headers as they already are installed + # - "make install_dev" installs the headers, the crti.o... and the + # static libs, but not the dynamic libs + # - "make install_runtime" installs the dynamic libs only + # - "make install" calls install_runtime and install_dev + # - so we're left with re-installing the headers... Sigh... + CT_DoLog EXTRA "Installing C library" + CT_DoExecLog ALL make "${make_args[@]}" install install_utils + fi # libc_mode == final + + # Now, if installing headers into a subdirectory, put everything in its place. + # Remove the header subdirectory if it existed already. + if [ -n "${hdr_install_subdir}" ]; then + CT_DoExecLog ALL mv "${multi_root}/usr/include" "${multi_root}/usr/include.new" + CT_DoExecLog ALL mv "${multi_root}/usr/include.saved" "${multi_root}/usr/include" + CT_DoExecLog ALL rm -rf "${multi_root}/usr/include/${hdr_install_subdir}" + CT_DoExecLog ALL mv "${multi_root}/usr/include.new" "${multi_root}/usr/include/${hdr_install_subdir}" + fi + + CT_EndStep +} + +# Initialises the .config file to sensible values +# $1: original file +# $2: modified file +manage_uClibc_config() +{ + src="$1" + dst="$2" + flags="$3" + + # Start with fresh files + CT_DoExecLog ALL cp "${src}" "${dst}" + + case "${CT_ARCH_ENDIAN}" in + big|big,little) + CT_KconfigDisableOption "ARCH_LITTLE_ENDIAN" "${dst}" + CT_KconfigDisableOption "ARCH_WANTS_LITTLE_ENDIAN" "${dst}" + CT_KconfigEnableOption "ARCH_BIG_ENDIAN" "${dst}" + CT_KconfigEnableOption "ARCH_WANTS_BIG_ENDIAN" "${dst}" + ;; + little|little,big) + CT_KconfigDisableOption "ARCH_BIG_ENDIAN" "${dst}" + CT_KconfigDisableOption "ARCH_WANTS_BIG_ENDIAN" "${dst}" + CT_KconfigEnableOption "ARCH_LITTLE_ENDIAN" "${dst}" + CT_KconfigEnableOption "ARCH_WANTS_LITTLE_ENDIAN" "${dst}" + ;; + esac + + if [ "${CT_ARCH_USE_MMU}" = "y" ]; then + CT_KconfigEnableOption "ARCH_USE_MMU" "${dst}" + else + CT_KconfigDisableOption "ARCH_USE_MMU" "${dst}" + CT_KconfigDisableOption "UCLIBC_FORMAT_FDPIC" "${dst}" + CT_KconfigDisableOption "UCLIBC_FORMAT_FLAT" "${dst}" + CT_KconfigDisableOption "UCLIBC_FORMAT_SHARED_FLAT" "${dst}" + case "${CT_ARCH_BINFMT_FLAT},${CT_ARCH_BINFMT_FDPIC},${CT_SHARED_LIBS}" in + y,,y) CT_KconfigEnableOption "UCLIBC_FORMAT_SHARED_FLAT" "${dst}";; + y,,) CT_KconfigEnableOption "UCLIBC_FORMAT_FLAT" "${dst}";; + ,y,*) CT_KconfigEnableOption "UCLIBC_FORMAT_FDPIC" "${dst}";; + *) CT_Abort "Unsupported binary format";; + esac + fi + + if [ "${CT_SHARED_LIBS}" = "y" ]; then + CT_KconfigEnableOption "HAVE_SHARED" "${dst}" + else + CT_KconfigDisableOption "HAVE_SHARED" "${dst}" + fi + + # Accomodate for old and new uClibc version, where the + # way to select between hard/soft float has changed + case "${CT_ARCH_FLOAT}" in + hard|softfp) + CT_KconfigEnableOption "UCLIBC_HAS_FPU" "${dst}" + CT_KconfigEnableOption "UCLIBC_HAS_FLOATS" "${dst}" + ;; + soft) + CT_KconfigDisableOption "UCLIBC_HAS_FPU" "${dst}" + CT_KconfigEnableOption "UCLIBC_HAS_FLOATS" "${dst}" + CT_KconfigEnableOption "DO_C99_MATH" "${dst}" + ;; + esac + if [ "${CT_LIBC_UCLIBC_FENV}" = "y" ]; then + CT_KconfigEnableOption "UCLIBC_HAS_FENV" "${dst}" + else + CT_KconfigDisableOption "UCLIBC_HAS_FENV" "${dst}" + fi + if [ "${CT_LIBC_UCLIBC_RPC}" = "y" ]; then + CT_KconfigEnableOption "UCLIBC_HAS_RPC" "${dst}" + else + CT_KconfigDisableOption "UCLIBC_HAS_RPC" "${dst}" + fi + + # We always want ctor/dtor + CT_KconfigEnableOption "UCLIBC_CTOR_DTOR" "${dst}" + + # Change paths to work with crosstool-NG + # + # DEVEL_PREFIX is left as '/usr/' because it is post-pended to $PREFIX, + # which is the correct value of ${PREFIX}/${TARGET}. + CT_KconfigSetOption "DEVEL_PREFIX" "\"/usr/\"" "${dst}" + CT_KconfigSetOption "RUNTIME_PREFIX" "\"/\"" "${dst}" + CT_KconfigSetOption "KERNEL_HEADERS" "\"${CT_HEADERS_DIR}\"" "${dst}" + + # Locales support + # Note that the two PREGEN_LOCALE and the XLOCALE lines may be missing + # entirely if LOCALE is not set. If LOCALE was already set, we'll + # assume the user has already made all the appropriate generation + # arrangements. Note that having the uClibc Makefile download the + # pregenerated locales is not compatible with crosstool. + if [ -z "${CT_LIBC_UCLIBC_LOCALES}" ]; then + CT_KconfigDisableOption "UCLIBC_HAS_LOCALE" "${dst}" + else + CT_KconfigEnableOption "UCLIBC_HAS_LOCALE" "${dst}" + CT_KconfigDeleteOption "UCLIBC_PREGENERATED_LOCALE_DATA" "${dst}" + CT_KconfigDeleteOption "UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA" "${dst}" + fi + + # WCHAR support + if [ "${CT_LIBC_UCLIBC_WCHAR}" = "y" ]; then + CT_KconfigEnableOption "UCLIBC_HAS_WCHAR" "${dst}" + else + CT_KconfigDisableOption "UCLIBC_HAS_WCHAR" "${dst}" + fi + + # IPv6 support + if [ "${CT_LIBC_UCLIBC_IPV6}" = "y" ]; then + CT_KconfigEnableOption "UCLIBC_HAS_IPV6" "${dst}" + else + CT_KconfigDisableOption "UCLIBC_HAS_IPV6" "${dst}" + fi + + # Iconv support + if [ "${CT_LIBC_UCLIBC_LIBICONV}" = "y" ]; then + CT_KconfigEnableOption "UCLIBC_HAS_LIBICONV" "${dst}" + else + CT_KconfigDisableOption "UCLIBC_HAS_LIBICONV" "${dst}" + fi + + # Force on options needed for C++ if we'll be making a C++ compiler. + # I'm not sure locales are a requirement for doing C++... Are they? + if [ "${CT_CC_LANG_CXX}" = "y" ]; then + CT_KconfigEnableOption "DO_C99_MATH" "${dst}" + CT_KconfigEnableOption "UCLIBC_HAS_GNU_GETOPT" "${dst}" + fi + + # Stack Smash Protection (SSP) + if [ "${CT_LIBC_UCLIBC_HAS_SSP}" = "y" ]; then + CT_KconfigEnableOption "UCLIBC_HAS_SSP" "${dst}" + else + CT_KconfigDisableOption "UCLIBC_HAS_SSP" "${dst}" + fi + if [ "${CT_LIBC_UCLIBC_BUILD_SSP}" = "y" ]; then + CT_KconfigEnableOption "UCLIBC_BUILD_SSP" "${dst}" + else + CT_KconfigDisableOption "UCLIBC_BUILD_SSP" "${dst}" + fi + + # Push the threading model + CT_KconfigDisableOption "UCLIBC_HAS_THREADS" "${dst}" + CT_KconfigDisableOption "LINUXTHREADS_OLD" "${dst}" + CT_KconfigDisableOption "LINUXTHREADS_NEW" "${dst}" + CT_KconfigDisableOption "UCLIBC_HAS_THREADS_NATIVE" "${dst}" + case "${CT_THREADS}" in + none) + ;; + linuxthreads) + CT_KconfigEnableOption "UCLIBC_HAS_THREADS" "${dst}" + CT_KconfigEnableOption "UCLIBC_HAS_LINUXTHREADS" "${dst}" + ;; + nptl) + CT_KconfigEnableOption "UCLIBC_HAS_THREADS" "${dst}" + CT_KconfigEnableOption "UCLIBC_HAS_THREADS_NATIVE" "${dst}" + ;; + *) + CT_Abort "Incorrect thread settings: CT_THREADS='${CT_THREADS}'" + ;; + esac + + # Always build the libpthread_db + CT_KconfigEnableOption "PTHREADS_DEBUG_SUPPORT" "${dst}" + + # Force on debug options if asked for + CT_KconfigDisableOption "DODEBUG" "${dst}" + CT_KconfigDisableOption "DODEBUG_PT" "${dst}" + CT_KconfigDisableOption "DOASSERTS" "${dst}" + CT_KconfigDisableOption "SUPPORT_LD_DEBUG" "${dst}" + CT_KconfigDisableOption "SUPPORT_LD_DEBUG_EARLY" "${dst}" + CT_KconfigDisableOption "UCLIBC_MALLOC_DEBUGGING" "${dst}" + case "${CT_LIBC_UCLIBC_DEBUG_LEVEL}" in + 0) + ;; + 1) + CT_KconfigEnableOption "DODEBUG" "${dst}" + ;; + 2) + CT_KconfigEnableOption "DODEBUG" "${dst}" + CT_KconfigEnableOption "DOASSERTS" "${dst}" + CT_KconfigEnableOption "SUPPORT_LD_DEBUG" "${dst}" + CT_KconfigEnableOption "UCLIBC_MALLOC_DEBUGGING" "${dst}" + ;; + 3) + CT_KconfigEnableOption "DODEBUG" "${dst}" + CT_KconfigEnableOption "DODEBUG_PT" "${dst}" + CT_KconfigEnableOption "DOASSERTS" "${dst}" + CT_KconfigEnableOption "SUPPORT_LD_DEBUG" "${dst}" + CT_KconfigEnableOption "SUPPORT_LD_DEBUG_EARLY" "${dst}" + CT_KconfigEnableOption "UCLIBC_MALLOC_DEBUGGING" "${dst}" + ;; + esac + + # Remove stripping: its the responsibility of the + # firmware builder to strip or not. + CT_KconfigDisableOption "DOSTRIP" "${dst}" + + # Now allow architecture to tweak as it wants + CT_DoArchUClibcConfig "${dst}" + CT_DoArchUClibcCflags "${dst}" "${flags}" + + # Preserve the config we created (before uclibc's `make olddefconfig` + # overrides anything). + CT_DoExecLog ALL cp "${dst}" "${dst}.created-by-ct-ng" +} + +uClibc_ng_post_cc() +{ + # uClibc and GCC disagree where the dynamic linker lives. uClibc always + # places it in the MULTILIB_DIR, while gcc does that for *some* variants + # and expects it in /lib for the other. So, create a symlink from lib + # to the actual location, but only if that will not override the actual + # file in /lib. Thus, need to do this after all the variants are built. + # Moreover, need to do this after the final compiler is built: on targets + # that use elf2flt, the core compilers cannot find ld when running elf2flt. + CT_MultilibFixupLDSO + + if [ -n "${CT_LIBC_UCLIBC_CONFIG_FILE}" ]; then + CT_InstallConfigurationFile "${CT_LIBC_UCLIBC_CONFIG_FILE}" libc + fi +} diff --git a/scripts/build/libc/uClibc.sh b/scripts/build/libc/uClibc.sh deleted file mode 100644 index 4328542..0000000 --- a/scripts/build/libc/uClibc.sh +++ /dev/null @@ -1,437 +0,0 @@ -# This file declares functions to install the uClibc C library -# Copyright 2007 Yann E. MORIN -# Licensed under the GPL v2. See COPYING in the root of this package - -# Build and install headers and start files -uClibc_start_files() -{ - # Start files and Headers should be configured the same way as the - # final libc, but built and installed differently. - uClibc_backend libc_mode=startfiles -} - -# This function builds and install the full C library -uClibc_main() -{ - uClibc_backend libc_mode=final -} - -# Common backend for 1st and 2nd passes. -uClibc_backend() -{ - local libc_mode - local arg - - for arg in "$@"; do - eval "${arg// /\\ }" - done - - case "${libc_mode}" in - startfiles) CT_DoStep INFO "Installing C library headers & start files";; - final) CT_DoStep INFO "Installing C library";; - *) CT_Abort "Unsupported (or unset) libc_mode='${libc_mode}'";; - esac - - CT_mkdir_pushd "${CT_BUILD_DIR}/build-libc-${libc_mode}" - CT_IterateMultilibs uClibc_backend_once multilib libc_mode="${libc_mode}" - CT_Popd - CT_EndStep -} - -# Common backend for 1st and 2nd passes, once per multilib. -uClibc_backend_once() -{ - local libc_mode - local multi_dir multi_os_dir multi_root multi_flags multi_index multi_count - local multilib_dir startfiles_dir - local jflag=${CT_LIBC_UCLIBC_PARALLEL:+${CT_JOBSFLAGS}} - local -a make_args - local extra_cflags f cfg_cflags cf - local hdr_install_subdir - local uClibc_name - - for arg in "$@"; do - eval "${arg// /\\ }" - done - - if [ "${CT_UCLIBC_USE_UCLIBC_NG_ORG}" = "y" ]; then - uClibc_name="uClibc-ng" - elif [ "${CT_UCLIBC_USE_UCLIBC_ORG}" = "y" ]; then - uClibc_name="uClibc" - fi - - CT_DoStep INFO "Building for multilib ${multi_index}/${multi_count}: '${multi_flags}'" - - multilib_dir="lib/${multi_os_dir}" - startfiles_dir="${multi_root}/usr/${multilib_dir}" - CT_SanitizeVarDir multilib_dir startfiles_dir - - # Construct make arguments: - # - uClibc uses the CROSS environment variable as a prefix to the compiler - # tools to use. Since it requires core pass-1, thusly named compiler is - # already available. - # - Note about CFLAGS: In uClibc, CFLAGS are generated by Rules.mak, - # depending on the configuration of the library. That is, they are tailored - # to best fit the target. So it is useless and seems to be a bad thing to - # use LIBC_EXTRA_CFLAGS here. - # - We do _not_ want to strip anything for now, in case we specifically - # asked for a debug toolchain, thus the STRIPTOOL= assignment. - make_args=( CROSS_COMPILE="${CT_TARGET}-" \ - HOSTCC="${CT_BUILD}-gcc" \ - PREFIX="${multi_root}/" \ - MULTILIB_DIR="${multilib_dir}" \ - STRIPTOOL=true \ - ${CT_LIBC_UCLIBC_VERBOSITY} \ - ) - - # Simply copy files until uClibc has the ability to build out-of-tree - CT_DoLog EXTRA "Copying sources to build dir" - CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/uClibc/." . - - # Force the date of the pregen locale data, as the - # newer ones that are referenced are not available - CT_DoLog EXTRA "Applying configuration" - - # Use the default config if the user did not provide one. - if [ -z "${CT_LIBC_UCLIBC_CONFIG_FILE}" ]; then - CT_LIBC_UCLIBC_CONFIG_FILE="${CT_LIB_DIR}/packages/${uClibc_name}/config" - fi - - manage_uClibc_config "${CT_LIBC_UCLIBC_CONFIG_FILE}" .config "${multi_flags}" - CT_DoExecLog ALL make "${make_args[@]}" olddefconfig - - # Now filter the multilib flags. manage_uClibc_config did the opposite of - # what Rules.mak in uClibc would do: by the multilib's CFLAGS, it determined - # the applicable configuration options. We don't want to pass the same options - # in the UCLIBC_EXTRA_CFLAGS again (on some targets, the options do not correctly - # override each other). On the other hand, we do not want to lose the options - # that are not reflected in the .config. - extra_cflags="-pipe" - { echo "include Rules.mak"; echo "show-cpu-flags:"; printf '\t@echo $(CPU_CFLAGS)\n'; } \ - > .show-cpu-cflags.mk - cfg_cflags=$( make "${make_args[@]}" \ - --no-print-directory -f .show-cpu-cflags.mk show-cpu-flags ) - CT_DoExecLog ALL rm -f .show-cpu-cflags.mk - CT_DoLog DEBUG "CPU_CFLAGS detected by uClibc: ${cfg_cflags[@]}" - for f in ${multi_flags}; do - for cf in ${cfg_cflags}; do - if [ "${f}" = "${cf}" ]; then - f= - break - fi - done - if [ -n "${f}" ]; then - extra_cflags+=" ${f}" - fi - done - CT_DoLog DEBUG "Filtered multilib CFLAGS: ${extra_cflags}" - make_args+=( UCLIBC_EXTRA_CFLAGS="${extra_cflags}" ) - - # uClibc does not have a way to select the installation subdirectory for headers, - # it is always $(DEVEL_PREFIX)/include. Also, we're reinstalling the headers - # at the final stage (see the note below), we may already have the subdirectory - # in /usr/include. - CT_DoArchUClibcHeaderDir hdr_install_subdir "${multi_flags}" - if [ -n "${hdr_install_subdir}" ]; then - CT_DoExecLog ALL cp -a "${multi_root}/usr/include" "${multi_root}/usr/include.saved" - fi - - if [ "${libc_mode}" = "startfiles" ]; then - CT_DoLog EXTRA "Building headers" - CT_DoExecLog ALL make "${make_args[@]}" headers - - # Ensure the directory for installing multilib-specific binaries exists. - CT_DoExecLog ALL mkdir -p "${startfiles_dir}" - - CT_DoLog EXTRA "Installing headers" - CT_DoExecLog ALL make "${make_args[@]}" install_headers - - # The check might look bogus, but it is the same condition as is used - # by GCC build script to enable/disable shared library support. - if [ "${CT_THREADS}" = "nptl" ]; then - CT_DoLog EXTRA "Building start files" - CT_DoExecLog ALL make ${jflag} "${make_args[@]}" \ - lib/crt1.o lib/crti.o lib/crtn.o - - if [ "${CT_SHARED_LIBS}" = "y" ]; then - # From: http://git.openembedded.org/cgit.cgi/openembedded/commit/?id=ad5668a7ac7e0436db92e55caaf3fdf782b6ba3b - # libm.so is needed for ppc, as libgcc is linked against libm.so - # No problem to create it for other archs. - CT_DoLog EXTRA "Building dummy shared libs" - CT_DoExecLog ALL "${CT_TARGET}-${CT_CC}" -nostdlib -nostartfiles \ - -shared ${multi_flags} -x c /dev/null -o libdummy.so - - CT_DoLog EXTRA "Installing start files" - CT_DoExecLog ALL install -m 0644 lib/crt1.o lib/crti.o lib/crtn.o \ - "${startfiles_dir}" - - CT_DoLog EXTRA "Installing dummy shared libs" - CT_DoExecLog ALL install -m 0755 libdummy.so "${startfiles_dir}/libc.so" - CT_DoExecLog ALL install -m 0755 libdummy.so "${startfiles_dir}/libm.so" - fi # CT_SHARED_LIBS == y - fi # CT_THREADS == nptl - fi # libc_mode == startfiles - - if [ "${libc_mode}" = "final" ]; then - CT_DoLog EXTRA "Cleaning up startfiles" - CT_DoExecLog ALL rm -f "${startfiles_dir}/crt1.o" \ - "${startfiles_dir}/crti.o" \ - "${startfiles_dir}/crtn.o" \ - "${startfiles_dir}/libc.so" \ - "${startfiles_dir}/libm.so" - - CT_DoLog EXTRA "Building C library" - CT_DoExecLog ALL make "${make_args[@]}" pregen - CT_DoExecLog ALL make ${jflag} "${make_args[@]}" all - - # YEM-FIXME: - # - we want to install 'runtime' files, eg. lib*.{a,so*}, crti.o and - # such files, except the headers as they already are installed - # - "make install_dev" installs the headers, the crti.o... and the - # static libs, but not the dynamic libs - # - "make install_runtime" installs the dynamic libs only - # - "make install" calls install_runtime and install_dev - # - so we're left with re-installing the headers... Sigh... - CT_DoLog EXTRA "Installing C library" - CT_DoExecLog ALL make "${make_args[@]}" install install_utils - fi # libc_mode == final - - # Now, if installing headers into a subdirectory, put everything in its place. - # Remove the header subdirectory if it existed already. - if [ -n "${hdr_install_subdir}" ]; then - CT_DoExecLog ALL mv "${multi_root}/usr/include" "${multi_root}/usr/include.new" - CT_DoExecLog ALL mv "${multi_root}/usr/include.saved" "${multi_root}/usr/include" - CT_DoExecLog ALL rm -rf "${multi_root}/usr/include/${hdr_install_subdir}" - CT_DoExecLog ALL mv "${multi_root}/usr/include.new" "${multi_root}/usr/include/${hdr_install_subdir}" - fi - - CT_EndStep -} - -# Initialises the .config file to sensible values -# $1: original file -# $2: modified file -manage_uClibc_config() -{ - src="$1" - dst="$2" - flags="$3" - - # Start with fresh files - CT_DoExecLog ALL cp "${src}" "${dst}" - - case "${CT_ARCH_ENDIAN}" in - big|big,little) - CT_KconfigDisableOption "ARCH_LITTLE_ENDIAN" "${dst}" - CT_KconfigDisableOption "ARCH_WANTS_LITTLE_ENDIAN" "${dst}" - CT_KconfigEnableOption "ARCH_BIG_ENDIAN" "${dst}" - CT_KconfigEnableOption "ARCH_WANTS_BIG_ENDIAN" "${dst}" - ;; - little|little,big) - CT_KconfigDisableOption "ARCH_BIG_ENDIAN" "${dst}" - CT_KconfigDisableOption "ARCH_WANTS_BIG_ENDIAN" "${dst}" - CT_KconfigEnableOption "ARCH_LITTLE_ENDIAN" "${dst}" - CT_KconfigEnableOption "ARCH_WANTS_LITTLE_ENDIAN" "${dst}" - ;; - esac - - if [ "${CT_ARCH_USE_MMU}" = "y" ]; then - CT_KconfigEnableOption "ARCH_USE_MMU" "${dst}" - else - CT_KconfigDisableOption "ARCH_USE_MMU" "${dst}" - CT_KconfigDisableOption "UCLIBC_FORMAT_FDPIC" "${dst}" - CT_KconfigDisableOption "UCLIBC_FORMAT_FLAT" "${dst}" - CT_KconfigDisableOption "UCLIBC_FORMAT_SHARED_FLAT" "${dst}" - case "${CT_ARCH_BINFMT_FLAT},${CT_ARCH_BINFMT_FDPIC},${CT_SHARED_LIBS}" in - y,,y) CT_KconfigEnableOption "UCLIBC_FORMAT_SHARED_FLAT" "${dst}";; - y,,) CT_KconfigEnableOption "UCLIBC_FORMAT_FLAT" "${dst}";; - ,y,*) CT_KconfigEnableOption "UCLIBC_FORMAT_FDPIC" "${dst}";; - *) CT_Abort "Unsupported binary format";; - esac - fi - - if [ "${CT_SHARED_LIBS}" = "y" ]; then - CT_KconfigEnableOption "HAVE_SHARED" "${dst}" - else - CT_KconfigDisableOption "HAVE_SHARED" "${dst}" - fi - - # Accomodate for old and new uClibc version, where the - # way to select between hard/soft float has changed - case "${CT_ARCH_FLOAT}" in - hard|softfp) - CT_KconfigEnableOption "UCLIBC_HAS_FPU" "${dst}" - CT_KconfigEnableOption "UCLIBC_HAS_FLOATS" "${dst}" - ;; - soft) - CT_KconfigDisableOption "UCLIBC_HAS_FPU" "${dst}" - CT_KconfigEnableOption "UCLIBC_HAS_FLOATS" "${dst}" - CT_KconfigEnableOption "DO_C99_MATH" "${dst}" - ;; - esac - if [ "${CT_LIBC_UCLIBC_FENV}" = "y" ]; then - CT_KconfigEnableOption "UCLIBC_HAS_FENV" "${dst}" - else - CT_KconfigDisableOption "UCLIBC_HAS_FENV" "${dst}" - fi - if [ "${CT_LIBC_UCLIBC_RPC}" = "y" ]; then - CT_KconfigEnableOption "UCLIBC_HAS_RPC" "${dst}" - else - CT_KconfigDisableOption "UCLIBC_HAS_RPC" "${dst}" - fi - - # We always want ctor/dtor - CT_KconfigEnableOption "UCLIBC_CTOR_DTOR" "${dst}" - - # Change paths to work with crosstool-NG - # - # DEVEL_PREFIX is left as '/usr/' because it is post-pended to $PREFIX, - # which is the correct value of ${PREFIX}/${TARGET}. - CT_KconfigSetOption "DEVEL_PREFIX" "\"/usr/\"" "${dst}" - CT_KconfigSetOption "RUNTIME_PREFIX" "\"/\"" "${dst}" - CT_KconfigSetOption "KERNEL_HEADERS" "\"${CT_HEADERS_DIR}\"" "${dst}" - - # Locales support - # Note that the two PREGEN_LOCALE and the XLOCALE lines may be missing - # entirely if LOCALE is not set. If LOCALE was already set, we'll - # assume the user has already made all the appropriate generation - # arrangements. Note that having the uClibc Makefile download the - # pregenerated locales is not compatible with crosstool. - if [ -z "${CT_LIBC_UCLIBC_LOCALES}" ]; then - CT_KconfigDisableOption "UCLIBC_HAS_LOCALE" "${dst}" - else - CT_KconfigEnableOption "UCLIBC_HAS_LOCALE" "${dst}" - CT_KconfigDeleteOption "UCLIBC_PREGENERATED_LOCALE_DATA" "${dst}" - CT_KconfigDeleteOption "UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA" "${dst}" - fi - - # WCHAR support - if [ "${CT_LIBC_UCLIBC_WCHAR}" = "y" ]; then - CT_KconfigEnableOption "UCLIBC_HAS_WCHAR" "${dst}" - else - CT_KconfigDisableOption "UCLIBC_HAS_WCHAR" "${dst}" - fi - - # IPv6 support - if [ "${CT_LIBC_UCLIBC_IPV6}" = "y" ]; then - CT_KconfigEnableOption "UCLIBC_HAS_IPV6" "${dst}" - else - CT_KconfigDisableOption "UCLIBC_HAS_IPV6" "${dst}" - fi - - # Iconv support - if [ "${CT_LIBC_UCLIBC_LIBICONV}" = "y" ]; then - CT_KconfigEnableOption "UCLIBC_HAS_LIBICONV" "${dst}" - else - CT_KconfigDisableOption "UCLIBC_HAS_LIBICONV" "${dst}" - fi - - # Force on options needed for C++ if we'll be making a C++ compiler. - # I'm not sure locales are a requirement for doing C++... Are they? - if [ "${CT_CC_LANG_CXX}" = "y" ]; then - CT_KconfigEnableOption "DO_C99_MATH" "${dst}" - CT_KconfigEnableOption "UCLIBC_HAS_GNU_GETOPT" "${dst}" - fi - - # Stack Smash Protection (SSP) - if [ "${CT_LIBC_UCLIBC_HAS_SSP}" = "y" ]; then - CT_KconfigEnableOption "UCLIBC_HAS_SSP" "${dst}" - else - CT_KconfigDisableOption "UCLIBC_HAS_SSP" "${dst}" - fi - if [ "${CT_LIBC_UCLIBC_BUILD_SSP}" = "y" ]; then - CT_KconfigEnableOption "UCLIBC_BUILD_SSP" "${dst}" - else - CT_KconfigDisableOption "UCLIBC_BUILD_SSP" "${dst}" - fi - - # Push the threading model - CT_KconfigDisableOption "UCLIBC_HAS_THREADS" "${dst}" - CT_KconfigDisableOption "LINUXTHREADS_OLD" "${dst}" - CT_KconfigDisableOption "LINUXTHREADS_NEW" "${dst}" - CT_KconfigDisableOption "UCLIBC_HAS_THREADS_NATIVE" "${dst}" - case "${CT_THREADS}:${CT_LIBC_UCLIBC_LNXTHRD}" in - none:) - ;; - linuxthreads:) - # Newer version of uClibc-ng, no old/new dichotomy - CT_KconfigEnableOption "UCLIBC_HAS_THREADS" "${dst}" - CT_KconfigEnableOption "UCLIBC_HAS_LINUXTHREADS" "${dst}" - ;; - linuxthreads:old) - CT_KconfigEnableOption "UCLIBC_HAS_THREADS" "${dst}" - CT_KconfigEnableOption "LINUXTHREADS_OLD" "${dst}" - ;; - linuxthreads:new) - CT_KconfigEnableOption "UCLIBC_HAS_THREADS" "${dst}" - CT_KconfigEnableOption "LINUXTHREADS_NEW" "${dst}" - ;; - nptl:) - CT_KconfigEnableOption "UCLIBC_HAS_THREADS" "${dst}" - CT_KconfigEnableOption "UCLIBC_HAS_THREADS_NATIVE" "${dst}" - ;; - *) - CT_Abort "Incorrect thread settings: CT_THREADS='${CT_THREAD}' CT_LIBC_UCLIBC_LNXTHRD='${CT_LIBC_UCLIBC_LNXTHRD}'" - ;; - esac - - # Always build the libpthread_db - CT_KconfigEnableOption "PTHREADS_DEBUG_SUPPORT" "${dst}" - - # Force on debug options if asked for - CT_KconfigDisableOption "DODEBUG" "${dst}" - CT_KconfigDisableOption "DODEBUG_PT" "${dst}" - CT_KconfigDisableOption "DOASSERTS" "${dst}" - CT_KconfigDisableOption "SUPPORT_LD_DEBUG" "${dst}" - CT_KconfigDisableOption "SUPPORT_LD_DEBUG_EARLY" "${dst}" - CT_KconfigDisableOption "UCLIBC_MALLOC_DEBUGGING" "${dst}" - case "${CT_LIBC_UCLIBC_DEBUG_LEVEL}" in - 0) - ;; - 1) - CT_KconfigEnableOption "DODEBUG" "${dst}" - ;; - 2) - CT_KconfigEnableOption "DODEBUG" "${dst}" - CT_KconfigEnableOption "DOASSERTS" "${dst}" - CT_KconfigEnableOption "SUPPORT_LD_DEBUG" "${dst}" - CT_KconfigEnableOption "UCLIBC_MALLOC_DEBUGGING" "${dst}" - ;; - 3) - CT_KconfigEnableOption "DODEBUG" "${dst}" - CT_KconfigEnableOption "DODEBUG_PT" "${dst}" - CT_KconfigEnableOption "DOASSERTS" "${dst}" - CT_KconfigEnableOption "SUPPORT_LD_DEBUG" "${dst}" - CT_KconfigEnableOption "SUPPORT_LD_DEBUG_EARLY" "${dst}" - CT_KconfigEnableOption "UCLIBC_MALLOC_DEBUGGING" "${dst}" - ;; - esac - - # Remove stripping: its the responsibility of the - # firmware builder to strip or not. - CT_KconfigDisableOption "DOSTRIP" "${dst}" - - # Now allow architecture to tweak as it wants - CT_DoArchUClibcConfig "${dst}" - CT_DoArchUClibcCflags "${dst}" "${flags}" - - # Preserve the config we created (before uclibc's `make olddefconfig` - # overrides anything). - CT_DoExecLog ALL cp "${dst}" "${dst}.created-by-ct-ng" -} - -uClibc_post_cc() -{ - # uClibc and GCC disagree where the dynamic linker lives. uClibc always - # places it in the MULTILIB_DIR, while gcc does that for *some* variants - # and expects it in /lib for the other. So, create a symlink from lib - # to the actual location, but only if that will not override the actual - # file in /lib. Thus, need to do this after all the variants are built. - # Moreover, need to do this after the final compiler is built: on targets - # that use elf2flt, the core compilers cannot find ld when running elf2flt. - CT_MultilibFixupLDSO - - if [ -n "${CT_LIBC_UCLIBC_CONFIG_FILE}" ]; then - CT_InstallConfigurationFile "${CT_LIBC_UCLIBC_CONFIG_FILE}" libc - fi -} diff --git a/scripts/functions b/scripts/functions index da90980..2446342 100644 --- a/scripts/functions +++ b/scripts/functions @@ -1132,7 +1132,7 @@ CT_DoBuildTargetTuple() # values. case "${CT_LIBC}" in glibc) CT_TARGET_SYS=gnu;; - uClibc) CT_TARGET_SYS=uclibc;; + uClibc-ng) CT_TARGET_SYS=uclibc;; musl) CT_TARGET_SYS=musl;; bionic) CT_TARGET_SYS=android;; none|newlib|picolibc) CT_TARGET_SYS=elf;; -- cgit v0.10.2-6-g49f6