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 --- config/libc/glibc.in | 1 - config/libc/mingw-w64.in | 4 - config/libc/newlib.in | 18 +--- config/libc/uClibc-ng.in | 170 +++++++++++++++++++++++++++++++++ config/libc/uClibc.in | 239 ----------------------------------------------- 5 files changed, 171 insertions(+), 261 deletions(-) create mode 100644 config/libc/uClibc-ng.in delete mode 100644 config/libc/uClibc.in (limited to 'config/libc') diff --git a/config/libc/glibc.in b/config/libc/glibc.in index 63c31f6c..39c2c20b 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 d176e477..1880f082 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 ce426dae..83ae4b15 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 00000000..705c0d46 --- /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 c88bbc8a..00000000 --- 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 -- cgit v1.2.3 From 58da27c96589f502744a77b1288172ab75df052c Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Sat, 5 Feb 2022 13:26:29 -0800 Subject: Restrict bionic's GCC/GDB selections Refer to the comments in the code for the reason. Signed-off-by: Alexey Neyman --- config/libc/bionic.in | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'config/libc') diff --git a/config/libc/bionic.in b/config/libc/bionic.in index 558c2b47..a5b150ea 100644 --- a/config/libc/bionic.in +++ b/config/libc/bionic.in @@ -1,11 +1,20 @@ # bionic options + ## package android-ndk ## depends on ! WINDOWS && ! BARE_METAL ## depends on ARCH_ARM || ARCH_MIPS || ARCH_X86 ## depends on EXPERIMENTAL +# +# Patches to support bionic were not ported to GCC11 (or to GCC5 and below). ## select GCC_REQUIRE_6_or_later -## +## select GCC_REQUIRE_older_than_11 +# +# GDB10 imported a new drop from gnulib, which fails to build against bionic. +# Patch to support bionic was ported to 7.12 and newer. +## select GDB_REQUIRE_7_12_or_later +## select GDB_REQUIRE_older_than_10 + ## select LIBC_SUPPORT_THREADS_POSIX ## ## help Bionic is the Android C library. It is prebuilt, extracted from the Android NDK. -- cgit v1.2.3 From 5a0be8b4ec0f1b7ff4fe30c8caaa5285b4f11ae4 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Tue, 8 Feb 2022 17:25:12 -0800 Subject: Unify core passes With libc_headers step before pass-1, there is no need to distinguish pass-1 and pass-2; they are configured identically (note that with the current configuration, core pass-2 is only used for win32 - hence, uses build_libgcc=yes and mode=static). Signed-off-by: Alexey Neyman --- TODO | 2 +- config/cc.in | 5 +-- config/cc/gcc.in | 2 +- config/libc/glibc.in | 2 +- config/libc/mingw-w64.in | 2 +- config/libc/moxiebox.in | 2 +- config/libc/musl.in | 2 +- config/libc/newlib.in | 2 +- config/libc/uClibc-ng.in | 2 +- ct-ng.in | 4 +- scripts/build/cc/gcc.sh | 85 ++++++++--------------------------------- scripts/build/libc/uClibc-ng.sh | 2 +- 12 files changed, 26 insertions(+), 86 deletions(-) (limited to 'config/libc') diff --git a/TODO b/TODO index 52d0637e..d030a9c3 100644 --- a/TODO +++ b/TODO @@ -75,7 +75,7 @@ A (slightly) ordered set of tasks for crosstool-NG. Written in a cryptic languag [ ] add passthrough to configure, for host/target [ ] Read/spellcheck configs & scripts [ ] 'ct-ng olddefconfig' -[ ] Install a "trap" C++ compiler as ${CT_TARGET}-g++ during pass-1/pass-2 to trap attempts to compile target code with g++ (currently glibc detects host g++ and warns that it uses g++ w/o target triplet) +[ ] Install a "trap" C++ compiler as ${CT_TARGET}-g++ during core compiler build to trap attempts to compile target code with g++ (currently glibc detects host g++ and warns that it uses g++ w/o target triplet) [ ] Somehow it needs to be functional during the configure step - export env var while running in CT_DoExecLog with CFG level, and forward it to host compiler? [ ] elf2flt not compatible with multiple linkers enabled in binutils (ld.bfd + ld.gold) - fix upstream? [ ] Companion libs diff --git a/config/cc.in b/config/cc.in index 0890cc20..3a168055 100644 --- a/config/cc.in +++ b/config/cc.in @@ -2,10 +2,7 @@ menu "C compiler" -config CC_CORE_PASS_1_NEEDED - bool - -config CC_CORE_PASS_2_NEEDED +config CC_CORE_NEEDED bool config CC_SUPPORT_CXX diff --git a/config/cc/gcc.in b/config/cc/gcc.in index 742d563f..a708bb82 100644 --- a/config/cc/gcc.in +++ b/config/cc/gcc.in @@ -55,7 +55,7 @@ config CC_GCC_ENABLE_CXX_FLAGS config CC_GCC_CORE_EXTRA_CONFIG_ARRAY string "Core gcc extra config" default "" - depends on CC_CORE_PASS_1_NEEDED || CC_CORE_PASS_2_NEEDED + depends on CC_CORE_NEEDED help Extra flags to pass onto ./configure when configuring the core gcc. diff --git a/config/libc/glibc.in b/config/libc/glibc.in index 39c2c20b..3da38bdb 100644 --- a/config/libc/glibc.in +++ b/config/libc/glibc.in @@ -3,7 +3,7 @@ ## depends on ! WINDOWS && ! BARE_METAL && ARCH_USE_MMU ## select LIBC_SUPPORT_THREADS_NATIVE -## select CC_CORE_PASS_1_NEEDED +## select CC_CORE_NEEDED # TBD: select GETTEXT for build only, not for host ## select GETTEXT_NEEDED ## select BINUTILS_FORCE_LD_BFD_DEFAULT diff --git a/config/libc/mingw-w64.in b/config/libc/mingw-w64.in index 1880f082..2531fef7 100644 --- a/config/libc/mingw-w64.in +++ b/config/libc/mingw-w64.in @@ -4,7 +4,7 @@ ## ## select LIBC_SUPPORT_THREADS_NATIVE ## select LIBC_SUPPORT_THREADS_POSIX -## select CC_CORE_PASS_2_NEEDED +## select CC_CORE_NEEDED ## select BINUTILS_FORCE_LD_BFD_DEFAULT ## ## help The de-facto standard for Mingw distributions. diff --git a/config/libc/moxiebox.in b/config/libc/moxiebox.in index aa6ff534..07fc3335 100644 --- a/config/libc/moxiebox.in +++ b/config/libc/moxiebox.in @@ -10,7 +10,7 @@ ## select LIBC_SUPPORT_THREADS_NONE ## select COMP_TOOLS_AUTOCONF if !CONFIGURE_has_autoconf_2_65_or_newer || !CONFIGURE_has_autoreconf_2_64_or_newer ## select COMP_TOOLS_AUTOMAKE if !CONFIGURE_has_automake_1_15_or_newer -## select CC_CORE_PASS_1_NEEDED +## select CC_CORE_NEEDED ## select LIBELF_NEEDED ## ## help Secure execution runtime for Moxie architecture. diff --git a/config/libc/musl.in b/config/libc/musl.in index 0ea388e4..db7abb7a 100644 --- a/config/libc/musl.in +++ b/config/libc/musl.in @@ -3,7 +3,7 @@ ## depends on ! WINDOWS && ! BARE_METAL ## depends on EXPERIMENTAL ## select LIBC_SUPPORT_THREADS_NATIVE -## select CC_CORE_PASS_1_NEEDED +## select CC_CORE_NEEDED ## help Musl is a new standard library to power a new generation of Linux-based ## help devices. musl is lightweight, fast, simple, free, and strives to be diff --git a/config/libc/newlib.in b/config/libc/newlib.in index 83ae4b15..f1cb29be 100644 --- a/config/libc/newlib.in +++ b/config/libc/newlib.in @@ -3,7 +3,7 @@ ## depends on BARE_METAL ## select LIBC_PROVIDES_CXA_ATEXIT ## select LIBC_SUPPORT_THREADS_NONE -## select CC_CORE_PASS_1_NEEDED +## select CC_CORE_NEEDED ## help Newlib is a C library intended for use on embedded systems. It is a ## help conglomeration of several library parts, all under free software diff --git a/config/libc/uClibc-ng.in b/config/libc/uClibc-ng.in index 705c0d46..dc83ca7e 100644 --- a/config/libc/uClibc-ng.in +++ b/config/libc/uClibc-ng.in @@ -5,7 +5,7 @@ ## select LIBC_SUPPORT_THREADS_LT ## select LIBC_SUPPORT_THREADS_NONE ## select LIBC_SUPPORT_THREADS_NATIVE -## select CC_CORE_PASS_1_NEEDED +## select CC_CORE_NEEDED ## ## help The de-facto standard for embeded linux systems. ## help diff --git a/ct-ng.in b/ct-ng.in index e0ec0f86..75e09ac5 100644 --- a/ct-ng.in +++ b/ct-ng.in @@ -268,7 +268,6 @@ build.%: # but are actual steps for canadian and cross-native. # Please keep the last line with a '\' and keep the following empty line: # it helps when diffing and merging. -# TBD move kernel headers and unify pass_1/pass_2? CT_STEPS := \ companion_tools_for_build \ companion_libs_for_build \ @@ -277,9 +276,8 @@ CT_STEPS := \ companion_libs_for_host \ binutils_for_host \ libc_headers \ - cc_core_pass_1 \ kernel_headers \ - cc_core_pass_2 \ + cc_core \ libc_main \ cc_for_build \ cc_for_host \ diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index ab66f413..9623d6ca 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/gcc.sh @@ -134,7 +134,7 @@ evaluate_multilib_cflags() # 1. On MIPS target, gcc (or rather, ld, which it invokes under the hood) chokes # if supplied with two -mabi=* options. I.e., 'gcc -mabi=n32' and 'gcc -mabi=32' both # work, but 'gcc -mabi=32 -mabi=n32' produces an internal error in ld. Thus we do -# not supply target's CFLAGS in multilib builds - and after compiling pass-1 gcc, +# not supply target's CFLAGS in multilib builds - and after compiling core gcc, # attempt to determine which CFLAGS need to be filtered out. # # 2. If "demultilibing" is in effect, create top-level directories for any @@ -186,11 +186,10 @@ cc_gcc_multilib_housekeeping() { } #------------------------------------------------------------------------------ -# Core gcc pass 1 -do_cc_core_pass_1() { +do_cc_core() { local -a core_opts - if [ "${CT_CC_CORE_PASS_1_NEEDED}" != "y" ]; then + if [ "${CT_CC_CORE_NEEDED}" != "y" ]; then return 0 fi @@ -201,62 +200,12 @@ do_cc_core_pass_1() { core_opts+=( "cflags=${CT_CFLAGS_FOR_BUILD}" ) core_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" ) core_opts+=( "lang_list=c" ) - core_opts+=( "build_step=core1" ) + core_opts+=( "build_step=core" ) core_opts+=( "mode=static" ) core_opts+=( "build_libgcc=yes" ) - CT_DoStep INFO "Installing pass-1 core C gcc compiler" - CT_mkdir_pushd "${CT_BUILD_DIR}/build-cc-gcc-core-pass-1" - - do_gcc_core_backend "${core_opts[@]}" - - CT_Popd - CT_EndStep -} - -# Core gcc pass 2 -do_cc_core_pass_2() { - local -a core_opts - - if [ "${CT_CC_CORE_PASS_2_NEEDED}" != "y" ]; then - return 0 - fi - - # Common options: - core_opts+=( "host=${CT_BUILD}" ) - core_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" ) - core_opts+=( "complibs=${CT_BUILDTOOLS_PREFIX_DIR}" ) - core_opts+=( "cflags=${CT_CFLAGS_FOR_BUILD}" ) - core_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" ) - core_opts+=( "lang_list=c" ) - core_opts+=( "build_step=core2" ) - - # Different conditions are at stake here: - # - In case the threading model is NPTL, we need a shared-capable core - # gcc; in all other cases, we need a static-only core gcc. - # - In case the threading model is NPTL or win32, or gcc is 4.3 or - # later, we need to build libgcc - case "${CT_THREADS}" in - nptl) - if [ "${CT_SHARED_LIBS}" = "y" ]; then - core_opts+=( "mode=shared" ) - else - core_opts+=( "mode=static" ) - fi - core_opts+=( "build_libgcc=yes" ) - ;; - win32) - core_opts+=( "mode=static" ) - core_opts+=( "build_libgcc=yes" ) - ;; - *) - core_opts+=( "mode=static" ) - core_opts+=( "build_libgcc=yes" ) - ;; - esac - - CT_DoStep INFO "Installing pass-2 core C gcc compiler" - CT_mkdir_pushd "${CT_BUILD_DIR}/build-cc-gcc-core-pass-2" + CT_DoStep INFO "Installing core C gcc compiler" + CT_mkdir_pushd "${CT_BUILD_DIR}/build-cc-gcc-core" do_gcc_core_backend "${core_opts[@]}" @@ -281,9 +230,8 @@ do_cc_core_pass_2() { # build_manuals : whether to build manuals or not : bool : no # cflags : cflags to use : string : (empty) # ldflags : ldflags to use : string : (empty) -# build_step : build step 'core1', 'core2', 'gcc_build', -# 'libstdcxx' -# or 'gcc_host' : string : (none) +# build_step : build step 'core', 'gcc_build', +# 'libstdcxx' or 'gcc_host' : string : (none) # Usage: do_gcc_core_backend mode=[static|shared|baremetal] build_libgcc=[yes|no] build_staticlinked=[yes|no] do_gcc_core_backend() { local mode @@ -321,7 +269,7 @@ do_gcc_core_backend() { # This function gets called in case of a bare metal compiler for the final gcc, too. case "${build_step}" in - core1|core2) + core) CT_DoLog EXTRA "Configuring core C gcc compiler" log_txt="gcc" extra_config+=( "${CT_CC_CORE_SYSROOT_ARG[@]}" ) @@ -351,7 +299,7 @@ do_gcc_core_backend() { build_libgcc=no ;; *) - CT_Abort "Internal Error: 'build_step' must be one of: 'core1', 'core2', 'gcc_build', 'gcc_host' or 'libstdcxx', not '${build_step:-(empty)}'" + CT_Abort "Internal Error: 'build_step' must be one of: 'core', 'gcc_build', 'gcc_host' or 'libstdcxx', not '${build_step:-(empty)}'" ;; esac @@ -501,8 +449,6 @@ do_gcc_core_backend() { if [ "${CT_LIBC_GLIBC}" = "y" ]; then # Report GLIBC's version to GCC, it affects the defaults on other options. - # Pass-2 should be able to get it from the headers, but for some options - # (such as --with-long-double-128) we need to get it right even in pass-1. # GCC expects just two numbers separated by a dot. local glibc_version @@ -571,11 +517,10 @@ do_gcc_core_backend() { # Some versions of gcc have a defective --enable-multilib. # Since that's the default, only pass --disable-multilib. For multilib, - # also enable multiarch. Without explicit --enable-multiarch, pass-1 - # compiler is configured as multilib/no-multiarch and pass-2/final - # are multilib/multiarch (because gcc autodetects multiarch based on - # multiple instances of crt*.o in the install directory - which do - # not exist in pass-1). + # also enable multiarch. Without explicit --enable-multiarch, core + # compiler is configured as multilib/no-multiarch (because gcc autodetects + # multiarch based on multiple instances of crt*.o in the install directory + # which do not exist in the core pass). if [ "${CT_MULTILIB}" != "y" ]; then extra_config+=("--disable-multilib") else @@ -609,7 +554,7 @@ do_gcc_core_backend() { fi # For non-sysrooted toolchain, GCC doesn't search except at the installation - # prefix; in core-1/2 stage we use a temporary installation prefix - but + # prefix; in core stage we use a temporary installation prefix - but # we may have installed something into the final prefix. This is less than ideal: # in the installation prefix GCC also handles subdirectories for multilibs # (e.g. first trying ${prefix}/include/${arch-triplet}) but diff --git a/scripts/build/libc/uClibc-ng.sh b/scripts/build/libc/uClibc-ng.sh index 5b260495..7b81d92c 100644 --- a/scripts/build/libc/uClibc-ng.sh +++ b/scripts/build/libc/uClibc-ng.sh @@ -34,7 +34,7 @@ uClibc_ng_backend_once() # 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 + # tools to use. Since it requires core compiler, 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 -- cgit v1.2.3