From 196f62e18ca16a1d6408d8e80989870e4ea93ef9 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Thu, 6 Jan 2022 13:10:07 -0800 Subject: Upgrade script for uClibc retirement Run samples through upgrade and fix accumulated breakages: *-centos6-*: After 2.12.2 retirement, the samples selected most recent glibc (2.34) which also forced kernels 3.2+. Revert to 2.12.1 and 2.6.32.71, respectively. Interestingly, 2.12.1 was marked as being used in CentOS6, but the samples selected 2.12.2. Anyway, CentOS6 is EOL now and glibc 2.12 is going to be marked obsolete, and retired soon. arc-*: Make TARGET_VENDOR match the sample's name; otherwise `ct-ng saveconfig` places the config file into a different location. Fix 'savedefconfig' which was not saving the configuration file version (CT_VCHECK was set to 'load' after CT_LoadConfig call). Signed-off-by: Alexey Neyman diff --git a/ct-ng.in b/ct-ng.in index 0be52ad..05ca29d 100644 --- a/ct-ng.in +++ b/ct-ng.in @@ -41,7 +41,7 @@ export CT_VCHECK= # need to pass it to the upgrade script - which may receive an input that # was not preprocessed by kconfig, and hence have no string for "up-to-date" # version. -export CT_CONFIG_VERSION_CURRENT=3 +export CT_CONFIG_VERSION_CURRENT=4 # Download agents used by scripts.mk CT_WGET := @wget@ diff --git a/samples/arc-arc700-linux-uclibc/crosstool.config b/samples/arc-arc700-linux-uclibc/crosstool.config index caa0cf1..93305e5 100644 --- a/samples/arc-arc700-linux-uclibc/crosstool.config +++ b/samples/arc-arc700-linux-uclibc/crosstool.config @@ -1,8 +1,8 @@ -CT_CONFIG_VERSION="3" +CT_CONFIG_VERSION="4" CT_ARCH_ARC=y CT_ARCH_CPU="arc700" CT_TARGET_CFLAGS="-mno-atomic" -CT_TARGET_VENDOR="snps" +CT_TARGET_VENDOR="arc700" CT_TARGET_ALIAS="arc-linux" CT_KERNEL_LINUX=y -CT_LIBC_UCLIBC=y +CT_LIBC_UCLIBC_NG=y diff --git a/samples/arc-archs-linux-gnu/crosstool.config b/samples/arc-archs-linux-gnu/crosstool.config index ad39f70..dfeb1ed 100644 --- a/samples/arc-archs-linux-gnu/crosstool.config +++ b/samples/arc-archs-linux-gnu/crosstool.config @@ -1,6 +1,6 @@ -CT_CONFIG_VERSION="3" +CT_CONFIG_VERSION="4" CT_ARCH_ARC=y CT_ARCH_CPU="archs" -CT_TARGET_VENDOR="snps" +CT_TARGET_VENDOR="archs" CT_TARGET_ALIAS="arc-linux" CT_KERNEL_LINUX=y diff --git a/samples/arc-multilib-elf32/crosstool.config b/samples/arc-multilib-elf32/crosstool.config index 0cc3cdd..e2bce98 100644 --- a/samples/arc-multilib-elf32/crosstool.config +++ b/samples/arc-multilib-elf32/crosstool.config @@ -1,4 +1,4 @@ -CT_CONFIG_VERSION="3" +CT_CONFIG_VERSION="4" CT_ARCH_ARC=y CT_MULTILIB=y CT_TARGET_VENDOR="multilib" diff --git a/samples/arc-multilib-linux-gnu/crosstool.config b/samples/arc-multilib-linux-gnu/crosstool.config index 3dc7802..b32c92e 100644 --- a/samples/arc-multilib-linux-gnu/crosstool.config +++ b/samples/arc-multilib-linux-gnu/crosstool.config @@ -1,4 +1,4 @@ -CT_CONFIG_VERSION="3" +CT_CONFIG_VERSION="4" CT_ARCH_ARC=y CT_MULTILIB=y CT_TARGET_CFLAGS="-matomic" diff --git a/samples/arc-multilib-linux-uclibc/crosstool.config b/samples/arc-multilib-linux-uclibc/crosstool.config index b1862a5..16b7569 100644 --- a/samples/arc-multilib-linux-uclibc/crosstool.config +++ b/samples/arc-multilib-linux-uclibc/crosstool.config @@ -1,8 +1,8 @@ -CT_CONFIG_VERSION="3" +CT_CONFIG_VERSION="4" CT_ARCH_ARC=y CT_MULTILIB=y CT_TARGET_CFLAGS="-matomic" CT_TARGET_VENDOR="multilib" CT_TARGET_ALIAS="arc-linux" CT_KERNEL_LINUX=y -CT_LIBC_UCLIBC=y +CT_LIBC_UCLIBC_NG=y diff --git a/samples/i686-centos6-linux-gnu/crosstool.config b/samples/i686-centos6-linux-gnu/crosstool.config index cb7f713..ffdb905 100644 --- a/samples/i686-centos6-linux-gnu/crosstool.config +++ b/samples/i686-centos6-linux-gnu/crosstool.config @@ -4,7 +4,5 @@ CT_ARCH_X86=y CT_ARCH_ARCH="i686" CT_TARGET_VENDOR="centos6" CT_KERNEL_LINUX=y -CT_LINUX_V_2_6_32=y # CT_KERNEL_LINUX_INSTALL_CHECK is not set -CT_GLIBC_V_2_12_2=y CT_CC_LANG_CXX=y diff --git a/samples/samples.mk b/samples/samples.mk index 48bbbb9..51e9619 100644 --- a/samples/samples.mk +++ b/samples/samples.mk @@ -128,7 +128,7 @@ samples: # Save a sample saveconfig: .config samples - $(SILENT)CT_VCHECK=save CONF=$(CONF) $(bash) $(CT_LIB_DIR)/scripts/saveSample.sh + $(SILENT)CONF=$(CONF) $(bash) $(CT_LIB_DIR)/scripts/saveSample.sh # The 'sample_dir' function prints the directory in which the sample is, # searching first in local samples, then in global samples diff --git a/samples/x86_64-centos6-linux-gnu/crosstool.config b/samples/x86_64-centos6-linux-gnu/crosstool.config index 24e8a11..e9747cd 100644 --- a/samples/x86_64-centos6-linux-gnu/crosstool.config +++ b/samples/x86_64-centos6-linux-gnu/crosstool.config @@ -1,4 +1,4 @@ -CT_CONFIG_VERSION="3" +CT_CONFIG_VERSION="4" CT_OBSOLETE=y CT_ARCH_X86=y CT_ARCH_64=y @@ -6,5 +6,7 @@ CT_TARGET_VENDOR="centos6" CT_KERNEL_LINUX=y CT_LINUX_V_2_6_32=y # CT_KERNEL_LINUX_INSTALL_CHECK is not set -CT_GLIBC_V_2_12_2=y +CT_GLIBC_V_2_12_1=y +CT_GLIBC_EXTRA_CFLAGS="" +# CT_GLIBC_ENABLE_COMMON_FLAG is not set CT_CC_LANG_CXX=y diff --git a/scripts/saveSample.sh b/scripts/saveSample.sh index 2f4a10b..e367e6e 100644 --- a/scripts/saveSample.sh +++ b/scripts/saveSample.sh @@ -11,6 +11,10 @@ CT_LoadConfig +# Override CT_VCHECK: we're going to be saving it so need to force saving of +# the config version. +export CT_VCHECK=save + # We can not reliably save a sample which either uses local patches # and/or custom Linux kernel headers. Warn the user about this issue # and continue if he/she confirms sving the sample. diff --git a/scripts/upgrade/v3 b/scripts/upgrade/v3 new file mode 100644 index 0000000..1b8fce8 --- /dev/null +++ b/scripts/upgrade/v3 @@ -0,0 +1,12 @@ +# vim: set filetype=sh : + +# Upgrade v3 -> v4: +# - uClibc retired, leaving only uClibc-ng +upgrade() +{ + case "${opt}" in + CT_LIBC_UCLIBC) + replace CT_LIBC_UCLIBC_NG + ;; + esac +} -- cgit v0.10.2-6-g49f6