diff options
author | Bryan Hundven <bryanhundven@gmail.com> | 2015-11-14 17:40:08 -0800 |
---|---|---|
committer | Bryan Hundven <bryanhundven@gmail.com> | 2015-11-14 17:40:08 -0800 |
commit | 38f5ad90054c835da8119a4a765c5a7834114e37 (patch) | |
tree | 2df2aec57876e1bd06f2909f88be3047e882a282 | |
parent | 0a1a1ce51c704bb1c06e0a9dd19af53910113003 (diff) | |
parent | 2541bd0b118f8fee6d200910e9c9211dd732f207 (diff) | |
download | crosstool-ng-38f5ad90054c835da8119a4a765c5a7834114e37.tar.gz crosstool-ng-38f5ad90054c835da8119a4a765c5a7834114e37.tar.bz2 crosstool-ng-38f5ad90054c835da8119a4a765c5a7834114e37.zip |
Merge pull request #258 from stilor/check-samples
Update samples
-rw-r--r-- | config/arch/arm.in | 1 | ||||
-rw-r--r-- | config/target.in | 7 | ||||
-rw-r--r-- | samples/alphaev67-unknown-linux-gnu/crosstool.config | 2 | ||||
-rw-r--r-- | samples/arm-cortex_a15-linux-gnueabi/crosstool.config | 2 | ||||
-rw-r--r-- | samples/powerpc-860-linux-gnu/crosstool.config | 1 | ||||
-rw-r--r-- | samples/samples.mk | 42 | ||||
-rw-r--r-- | samples/x86_64-unknown-linux-uclibc/crosstool.config | 1 |
7 files changed, 34 insertions, 22 deletions
diff --git a/config/arch/arm.in b/config/arch/arm.in index 5d40e372..5dbc717d 100644 --- a/config/arch/arm.in +++ b/config/arch/arm.in @@ -9,6 +9,7 @@ ## select ARCH_DEFAULT_LE ## select ARCH_SUPPORTS_WITH_ARCH ## select ARCH_SUPPORTS_WITH_CPU +## select ARCH_EXCLUSIVE_WITH_CPU ## select ARCH_SUPPORTS_WITH_TUNE ## select ARCH_SUPPORTS_WITH_FLOAT if ARCH_32 ## select ARCH_SUPPORTS_WITH_FPU if ARCH_32 diff --git a/config/target.in b/config/target.in index 31d2dc1b..8cbaabc0 100644 --- a/config/target.in +++ b/config/target.in @@ -210,11 +210,14 @@ config ARCH_SUPPORTS_WITH_FPU config ARCH_SUPPORTS_SOFTFP bool +config ARCH_EXCLUSIVE_WITH_CPU + bool + config ARCH_ARCH string prompt "Architecture level" depends on ARCH_SUPPORTS_WITH_ARCH - depends on ARCH_CPU = "" + depends on !ARCH_EXCLUSIVE_WITH_CPU || ARCH_CPU = "" default "" help GCC uses this name to determine what kind of instructions it can emit @@ -271,7 +274,7 @@ config ARCH_TUNE string prompt "Tune for CPU" depends on ARCH_SUPPORTS_WITH_TUNE - depends on ARCH_CPU = "" + depends on !ARCH_EXCLUSIVE_WITH_CPU || ARCH_CPU = "" default "" help This option is very similar to the ARCH_CPU option (above), except diff --git a/samples/alphaev67-unknown-linux-gnu/crosstool.config b/samples/alphaev67-unknown-linux-gnu/crosstool.config index 53b038aa..f6d51240 100644 --- a/samples/alphaev67-unknown-linux-gnu/crosstool.config +++ b/samples/alphaev67-unknown-linux-gnu/crosstool.config @@ -1,7 +1,7 @@ CT_LOCAL_TARBALLS_DIR="${HOME}/src" CT_SAVE_TARBALLS=y CT_LOG_EXTRA=y -CT_ARCH_CPU="ev56" +CT_ARCH_CPU="ev67" CT_ARCH_ALPHA_EV67=y CT_KERNEL_linux=y CT_BINUTILS_PLUGINS=y diff --git a/samples/arm-cortex_a15-linux-gnueabi/crosstool.config b/samples/arm-cortex_a15-linux-gnueabi/crosstool.config index 782d5986..b625116f 100644 --- a/samples/arm-cortex_a15-linux-gnueabi/crosstool.config +++ b/samples/arm-cortex_a15-linux-gnueabi/crosstool.config @@ -2,7 +2,6 @@ CT_LOCAL_TARBALLS_DIR="${HOME}/src" CT_SAVE_TARBALLS=y CT_LOG_EXTRA=y CT_ARCH_CPU="cortex-a15" -CT_ARCH_TUNE="cortex-a15" CT_ARCH_FPU="neon-vfpv4" CT_ARCH_FLOAT_HW=y CT_ARCH_arm=y @@ -12,7 +11,6 @@ CT_BINUTILS_LINKER_LD_GOLD=y CT_BINUTILS_GOLD_THREADS=y CT_BINUTILS_LD_WRAPPER=y CT_BINUTILS_PLUGINS=y -CT_LIBC_glibc=y CT_CC_GCC_SHOW_LINARO=y CT_CC_LANG_CXX=y CT_DEBUG_dmalloc=y diff --git a/samples/powerpc-860-linux-gnu/crosstool.config b/samples/powerpc-860-linux-gnu/crosstool.config index 9475f5ac..aa1625eb 100644 --- a/samples/powerpc-860-linux-gnu/crosstool.config +++ b/samples/powerpc-860-linux-gnu/crosstool.config @@ -8,7 +8,6 @@ CT_TARGET_VENDOR="860" CT_KERNEL_linux=y CT_BINUTILS_PLUGINS=y CT_LIBC_GLIBC_EXTRA_CONFIG_ARRAY="--without-fp" -CT_CC_GCC_EXTRA_CONFIG_ARRAY="--with-cpu=860 --enable-cxx-flags=-mcpu=860 --with-float=soft --enable-cxx-flags=-msoft-float" CT_CC_LANG_CXX=y CT_DEBUG_gdb=y # CT_GDB_CROSS_PYTHON is not set diff --git a/samples/samples.mk b/samples/samples.mk index c87e5fce..d76a93fb 100644 --- a/samples/samples.mk +++ b/samples/samples.mk @@ -11,6 +11,10 @@ CT_SAMPLES := $(shell echo $(sort $(CT_TOP_SAMPLES) $(CT_LIB_SAMPLES)) \ |$(sed) -r -e 's/(.*),(.*)/\2,\1/;' \ ) +# If set to yes on command line, updates the sample configuration +# instead of just dumping the diff. +CT_UPDATE_SAMPLES := no + # ---------------------------------------------------------- # This part deals with the samples help entries @@ -42,11 +46,11 @@ show-config: .config # Prints the details of a sample PHONY += $(patsubst %,show-%,$(CT_SAMPLES)) -$(patsubst %,show-%,$(CT_SAMPLES)): config_files +$(patsubst %,show-%,$(CT_SAMPLES)): show-%: config_files @KCONFIG_CONFIG=$$(pwd)/.config.sample \ - $(CONF) --defconfig=$(call sample_dir,$(patsubst show-%,%,$(@)))/crosstool.config \ + $(CONF) --defconfig=$(call sample_dir,$*)/crosstool.config \ $(KCONFIG_TOP) >/dev/null - @$(CT_LIB_DIR)/scripts/showSamples.sh -v $(patsubst show-%,%,$(@)) + @$(CT_LIB_DIR)/scripts/showSamples.sh -v $* @rm -f .config.sample # Prints the details of all samples @@ -66,11 +70,11 @@ list-samples-pre: FORCE @echo 'Status Sample name' PHONY += $(patsubst %,list-%,$(CT_SAMPLES)) -$(patsubst %,list-%,$(CT_SAMPLES)): config_files +$(patsubst %,list-%,$(CT_SAMPLES)): list-%: config_files @KCONFIG_CONFIG=$$(pwd)/.config.sample \ - $(CONF) --defconfig=$(call sample_dir,$(patsubst list-%,%,$(@)))/crosstool.config \ + $(CONF) --defconfig=$(call sample_dir,$*)/crosstool.config \ $(KCONFIG_TOP) >/dev/null - @$(CT_LIB_DIR)/scripts/showSamples.sh $(patsubst list-%,%,$(@)) + @$(CT_LIB_DIR)/scripts/showSamples.sh $* @rm -f .config.sample PHONY += list-samples-short @@ -81,21 +85,29 @@ list-samples-short: FORCE # Check one sample PHONY += $(patsubst %,check-%,$(CT_SAMPLES)) -$(patsubst %,check-%,$(CT_SAMPLES)): config_files +$(patsubst %,check-%,$(CT_SAMPLES)): check-%: config_files @export KCONFIG_CONFIG=$$(pwd)/.config.sample; \ - CT_NG_SAMPLE=$(call sample_dir,$(patsubst check-%,%,$(@)))/crosstool.config; \ - $(CONF) --defconfig=$${CT_NG_SAMPLE} $(KCONFIG_TOP) >/dev/null; \ - $(CONF) --savedefconfig=$$(pwd)/.defconfig $(KCONFIG_TOP) >/dev/null; \ + CT_NG_SAMPLE=$(call sample_dir,$*)/crosstool.config; \ + $(CONF) -s --defconfig=$${CT_NG_SAMPLE} $(KCONFIG_TOP) &>/dev/null; \ + $(CONF) -s --savedefconfig=$$(pwd)/.defconfig $(KCONFIG_TOP) &>/dev/null; \ old_sha1=$$( sha1sum "$${CT_NG_SAMPLE}" |cut -d ' ' -f 1 ); \ new_sha1=$$( sha1sum .defconfig |cut -d ' ' -f 1 ); \ if [ $${old_sha1} != $${new_sha1} ]; then \ - echo "$(patsubst check-%,%,$(@)) needs update:"; \ - diff -du0 "$${CT_NG_SAMPLE}" .defconfig |tail -n +4; \ + if [ $(CT_UPDATE_SAMPLES) = yes ]; then \ + echo "Updating $*"; \ + mv .defconfig "$${CT_NG_SAMPLE}"; \ + else \ + echo "$* needs update:"; \ + diff -du0 "$${CT_NG_SAMPLE}" .defconfig |tail -n +4; \ + fi; \ fi @rm -f .config.sample* .defconfig check-samples: $(patsubst %,check-%,$(CT_SAMPLES)) +update-samples: + $(SILENT)$(MAKE) -rf $(CT_NG) check-samples CT_UPDATE_SAMPLES=yes + PHONY += wiki-samples wiki-samples: wiki-samples-pre $(patsubst %,wiki-%,$(CT_SAMPLES)) wiki-samples-post @@ -105,11 +117,11 @@ wiki-samples-pre: FORCE wiki-samples-post: FORCE $(SILENT)$(CT_LIB_DIR)/scripts/showSamples.sh -W $(CT_SAMPLES) -$(patsubst %,wiki-%,$(CT_SAMPLES)): config_files +$(patsubst %,wiki-%,$(CT_SAMPLES)): wiki-%: config_files $(SILENT)KCONFIG_CONFIG=$$(pwd)/.config.sample \ - $(CONF) --defconfig=$(call sample_dir,$(patsubst wiki-%,%,$(@)))/crosstool.config \ + $(CONF) --defconfig=$(call sample_dir,$*)/crosstool.config \ $(KCONFIG_TOP) >/dev/null - $(SILENT)$(CT_LIB_DIR)/scripts/showSamples.sh -w $(patsubst wiki-%,%,$(@)) + $(SILENT)$(CT_LIB_DIR)/scripts/showSamples.sh -w $* $(SILENT)rm -f .config.sample # ---------------------------------------------------------- diff --git a/samples/x86_64-unknown-linux-uclibc/crosstool.config b/samples/x86_64-unknown-linux-uclibc/crosstool.config index f20362d0..6f724e6f 100644 --- a/samples/x86_64-unknown-linux-uclibc/crosstool.config +++ b/samples/x86_64-unknown-linux-uclibc/crosstool.config @@ -11,7 +11,6 @@ CT_BINUTILS_LD_WRAPPER=y CT_BINUTILS_PLUGINS=y CT_LIBC_uClibc=y CT_LIBC_UCLIBC_WCHAR=y -CT_CC_GCC_EXTRA_CONFIG_ARRAY="--disable-libsanitizer" CT_CC_LANG_CXX=y CT_DEBUG_dmalloc=y CT_DEBUG_duma=y |