GCC defaults with ARM EABI to the ARM10TDMI core, i.e. armv5t. Thus the code generated with this cross GCC with CTARGET=armv4tl-softfloat-linux-uclibceabi will contain non armv4t instructions too (clz for example). Reproducible: Always Steps to Reproduce: 1. Generate the cross toolchain by the following command: USE="-iconv -nls -fortran" UCLIBC_CPU=ARM920T crossdev -S --libc 0.9.30_rc3 --target armv4tl-softfloat-linux-uclibceabi 2. Check C library libc.so.0 for the clz instructions: armv4tl-softfloat-linux-uclibceabi-objdump --disassemble libc.so.0 | grep clz Actual Results: The C library libc.so.0 has armv5t instructions. Expected Results: The generated code should have only armv4t instructions.
Created attachment 170568 [details, diff] Patch for the GCC ebuild which checks the CTARGET Possible solution is to check whether the CTARGET is armv4t with EABI, and then change GCC's default TARGET_CPU_arm10tdmi to TARGET_CPU_arm9tdmi. This patch should be applied to all GCC version >=4.1.2
This sed line exists in toolchain.eclass v1.374, see unbreak_arm() there. But it doesn't help me, crossdev -t armv4t-softfloat-linux-gnueabi fails on stage2.
i just reverted said change to toolchain.eclass ... it needs to be a patch in the gcc patchset tarball, not a random sed in the eclass
Vapier, your change broke the working armv4 toolchain! Please use the attached patch and fix the toolchain again!!! This patch possibly also applies for other versions of gcc, so we have to fix them all...
Created attachment 177508 [details, diff] Patch replacement for the sed line
un-reverted his revert. if the function is removed again with zero notification and zero attempts to fix the problem then that is tree abuse and will likely result in him losing commit privs to the tree. If he wants to use patches that fine. But he needs to patch *all* gcc with the same logic used in the function.
you have control over infra so you certainly have the power to remove my access. doesnt matter to me. added patch to gcc-4.3.2-r3 http://sources.gentoo.org/gentoo/src/patchsets/gcc/4.3.2/gentoo/47_all_arm-unbreak-armv4t.patch?rev=1.1