I've built a toolchain using crossdev --target arm-elf. There are thumb libraries, but there doesn't seem to be any interwork support. Is there a way to enable it? If not, I would like to request a feature. Reproducible: Always Steps to Reproduce: crossdev --stage4 --without-headers --target arm-elf \ --stable --libc "[latest]" Actual Results: There are: /usr/arm-elf/lib/libc.a /usr/arm-elf/lib/thumb/libc.a /usr/lib/gcc/arm-elf/4.3.2/libgcc.a /usr/lib/gcc/arm-elf/4.3.2/thumb/libgcc.a But these are missing: /usr/arm-elf/lib/interwork/libc.a /usr/lib/gcc/arm-elf/4.3.2/interwork/libgcc.a
crossdev supports whatever gcc does. if gcc doesnt support it, then there's nothing we can do about it. you should ask on the gcc-help mailing list if interwork multilib even makes sense. i dont think it does since interwork isnt an ABI. it's merely a method for moving between ARM and thumb on the fly.
gcc _does_ support interwork as well as newlib. I know that, because I'm compiling an almost vanilla gcc like this: MULTILIB_CONFIG=$SRCDIR/$GCC_DIR/gcc/config/arm/t-arm-elf echo " MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork MULTILIB_DIRNAMES += normal interwork " >> $MULTILIB_CONFIG mkdir -p $BUILDDIR/$GCC_DIR cd $BUILDDIR/$GCC_DIR $SRCDIR/$GCC_DIR/configure --target=arm-elf --prefix=$PREFIX \ --enable-interwork --enable-multilib --with-float=soft \ --enable-languages="c" --with-newlib \ --with-headers=$SRCDIR/$NEWLIB_DIR/newlib/libc/include \ && make all-gcc install-gcc newlib also supports interwork: simply pass --enable-interwork to it. Also note: interwork is an ABI. It's an ABI that allows mixing of thumb and non-thumb code which isn't possible with the default ABI.
Note, that the lines MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork MULTILIB_DIRNAMES += normal interwork are already present in the original vanilla t-arm-elf file. They are just commented out for some reason that the author doesn't tell. It seems, that they are there for being enabled on demand.
again, has nothing to do with crossdev. you can simply emerge gcc with EXTRA_ECONF=--enable-interwork.
(In reply to comment #4) > again, has nothing to do with crossdev. you can simply emerge gcc with > EXTRA_ECONF=--enable-interwork. That doesn't work unless the t-arm-elf is patched. (just tried it)
Is there a way of including custom patches in the build? Something like EXTRA_ECONF, but for patches? I guess, then this bug could be considered fixed.
we cant support things that arent available in gcc. you can file a bug with gcc.gnu.org to get them to fix things. gcc supports arbitrary patches in /etc/portage/patches/$CATEGORY/$PN/
Created attachment 187769 [details, diff] arm-elf.patch I've put the patch attached to /etc/portage/patches/cross-arm-elf/gcc/arm-elf.patch and I have used EXTRA_ECONF="--enable-interwork --enable-multilib". Now I have a interwork enabled gcc.