Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Why does arm64 toolchain not support multilib
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
ccgoo
n00b
n00b


Joined: 19 Jul 2007
Posts: 47

PostPosted: Wed Jul 15, 2015 2:23 am    Post subject: [SOLVED] Why does arm64 toolchain not support multilib Reply with quote

(When I say arm64, I actually mean aarch64)
I want to use crossdev to make arm64 cross-toolchain, but I noticed that it does not support multilib.
In /usr/portage/eclass/multilib.eclass, in function multilib_env(), for case 'aarch64' , there is a comment sayinig "# Not possible to do multilib with aarch64 and a single toolchain", and variable MULTILIB_ABIS is set to "arm64" only, which means no multilib because there is only one ABI. See code below
Code:

        aarch64*)
            # Not possible to do multilib with aarch64 and a single toolchain.
            export CFLAGS_arm=${CFLAGS_arm-}
            case ${cpu} in
            aarch64*be) export CHOST_arm="armv8b-${CTARGET#*-}";;
            *)          export CHOST_arm="armv8l-${CTARGET#*-}";;
            esac
            CHOST_arm=${CHOST_arm/%-gnu/-gnueabi}
            export CTARGET_arm=${CHOST_arm}
            export LIBDIR_arm="lib"

            export CFLAGS_arm64=${CFLAGS_arm64-}
            export CHOST_arm64=${CTARGET}
            export CTARGET_arm64=${CHOST_arm64}
            export LIBDIR_arm64="lib64"

            : ${MULTILIB_ABIS=arm64}
            : ${DEFAULT_ABI=arm64}
        ;;


Why I ask this question is because we all know amd64 gcc can output 32bit binary by option -m32, therefor amd64 toolchain can support multilib. So I want to know however arm64 gcc also can output 32bit binary by option -mabi=ilp32, why gentoo still doesn't think arm64 toolchain can support multilib (crossdev can not build cross toolchain for arm64 with multilib enabled).


Last edited by ccgoo on Wed Jul 22, 2015 8:25 pm; edited 1 time in total
Back to top
View user's profile Send private message
ccgoo
n00b
n00b


Joined: 19 Jul 2007
Posts: 47

PostPosted: Wed Jul 22, 2015 8:25 pm    Post subject: Reply with quote

I got the answer. It is not Gentoo that the one doesn't think arm64(aarch64) is able to support multilib, The one is GCC itself. In GCC code, it disables the multilib support explicitly in gcc/config/aarch64/t-aarch64-linux.
Code:
# Disable the multilib for linux-gnu targets for the time being; focus
# on the baremetal targets.
MULTILIB_OPTIONS    =
MULTILIB_DIRNAMES   =


So if you can not build an arm64(aarch64) gcc to support multilib from the beginning, how can you blame Gentoo doesn't support multilib toolchain for arm64(aarch64) .
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum