diff options
author | Alexey Neyman <stilor@att.net> | 2018-12-02 23:28:02 -0800 |
---|---|---|
committer | Alexey Neyman <stilor@att.net> | 2018-12-03 16:17:25 -0800 |
commit | d9afcd80fc3feb83684c530adc7413e5ed17cf98 (patch) | |
tree | 6c6d934e26095d8a23df53c8ff16a00da8a04fec | |
parent | 03b29ba5b00a617ff7c53ca1f0910a03a4929239 (diff) | |
download | crosstool-ng-d9afcd80fc3feb83684c530adc7413e5ed17cf98.tar.gz crosstool-ng-d9afcd80fc3feb83684c530adc7413e5ed17cf98.tar.bz2 crosstool-ng-d9afcd80fc3feb83684c530adc7413e5ed17cf98.zip |
Warn if architecture is empty on x86/32bit
as that defaults to i386, which will fail with glibc (and likely other
libcs).
Fixes #617.
Signed-off-by: Alexey Neyman <stilor@att.net>
-rw-r--r-- | config/target.in | 4 | ||||
-rw-r--r-- | scripts/build/arch/x86.sh | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/config/target.in b/config/target.in index 03ecb6b1..34d93695 100644 --- a/config/target.in +++ b/config/target.in @@ -268,7 +268,9 @@ config ARCH_ARCH target CPU. Leave blank if you don't know, or if your target architecture does not - offer this option. + offer this option. Must be specified for 32-bit x86 that uses some + C library (glibc, uClibc-ng, ...) - the default, "i386" is not supported + by these libraries. config ARCH_ABI string diff --git a/scripts/build/arch/x86.sh b/scripts/build/arch/x86.sh index 471d377a..0538d66c 100644 --- a/scripts/build/arch/x86.sh +++ b/scripts/build/arch/x86.sh @@ -10,7 +10,11 @@ CT_DoArchTupleValues() { arch="${CT_ARCH_ARCH}" [ -z "${arch}" ] && arch="${CT_ARCH_TUNE}" case "${arch}" in - "") CT_TARGET_ARCH=i386;; + "") + CT_DoLog WARN "Architecture level is not specified for 32-bit x86; defaulting to i386." + CT_DoLog WARN "This may not be supported by the C library." + CT_TARGET_ARCH=i386 + ;; i386|i486|i586|i686) CT_TARGET_ARCH="${arch}";; winchip*) CT_TARGET_ARCH=i486;; pentium|pentium-mmx|c3*) CT_TARGET_ARCH=i586;; |