On 11/01/17 07:22, Warlich, Christof wrote: > Hi, > > I have a conceptual question w.r.t. an arm miltilib build (e.g. using --with-multilib-list=aprofile): > > Comparing the arm multilib build with an x86_64 multilib build, I see that for x86_64, dedicated binaries (e.g. libgcc.a) are built for each subarch, i.e. I get: > > $toolchain_root/lib/gcc/x86_64-linux-gnu/6.3.0/libgcc.a > $toolchain_root/lib/gcc/x86_64-linux-gnu/6.3.0/32/libgcc.a > $toolchain_root/lib/gcc/x86_64-linux-gnu/6.3.0/x32/libgcc.a > > when passing --with-multilib-list=m64,m32,mx32 to GCC's configure script. > > On the other hand, the ARM multilib build always only generates one libgcc.a, i,e,: > > $toolchain_root/lib/gcc/arm-linux-gnueabi/6.3.0/libgcc.a > That's not what I see on a arm-none-eabi cross build. In the install directory I get the following in the lib subtree: ./lib ./lib/v8-a ./lib/v8-a/simdv8 ./lib/v8-a/simdv8/hard ./lib/v8-a/simdv8/hard/cpu-init ./lib/v8-a/simdv8/softfp ./lib/v8-a/simdv8/softfp/cpu-init ./lib/v8-a/cpu-init ./lib/thumb ./lib/thumb/v8-a ./lib/thumb/v8-a/simdv8 ./lib/thumb/v8-a/simdv8/hard ./lib/thumb/v8-a/simdv8/hard/cpu-init ./lib/thumb/v8-a/simdv8/softfp ./lib/thumb/v8-a/simdv8/softfp/cpu-init ./lib/thumb/v8-a/cpu-init ./lib/thumb/cpu-init ./lib/thumb/v7-a ./lib/thumb/v7-a/fpv3 ./lib/thumb/v7-a/fpv3/hard ./lib/thumb/v7-a/fpv3/hard/cpu-init ./lib/thumb/v7-a/fpv3/softfp ./lib/thumb/v7-a/fpv3/softfp/cpu-init ./lib/thumb/v7-a/simdv1 ./lib/thumb/v7-a/simdv1/hard ./lib/thumb/v7-a/simdv1/hard/cpu-init ./lib/thumb/v7-a/simdv1/softfp ./lib/thumb/v7-a/simdv1/softfp/cpu-init ./lib/thumb/v7-a/cpu-init ./lib/thumb/v7ve ./lib/thumb/v7ve/fpv4 ./lib/thumb/v7ve/fpv4/hard ./lib/thumb/v7ve/fpv4/hard/cpu-init ./lib/thumb/v7ve/fpv4/softfp ./lib/thumb/v7ve/fpv4/softfp/cpu-init ./lib/thumb/v7ve/cpu-init ./lib/thumb/v7ve/simdvfpv4 ./lib/thumb/v7ve/simdvfpv4/hard ./lib/thumb/v7ve/simdvfpv4/hard/cpu-init ./lib/thumb/v7ve/simdvfpv4/softfp ./lib/thumb/v7ve/simdvfpv4/softfp/cpu-init ./lib/cpu-init ./lib/ldscripts ./lib/v7-a ./lib/v7-a/fpv3 ./lib/v7-a/fpv3/hard ./lib/v7-a/fpv3/hard/cpu-init ./lib/v7-a/fpv3/softfp ./lib/v7-a/fpv3/softfp/cpu-init ./lib/v7-a/simdv1 ./lib/v7-a/simdv1/hard ./lib/v7-a/simdv1/hard/cpu-init ./lib/v7-a/simdv1/softfp ./lib/v7-a/simdv1/softfp/cpu-init ./lib/v7-a/cpu-init ./lib/v7ve ./lib/v7ve/fpv4 ./lib/v7ve/fpv4/hard ./lib/v7ve/fpv4/hard/cpu-init ./lib/v7ve/fpv4/softfp ./lib/v7ve/fpv4/softfp/cpu-init ./lib/v7ve/cpu-init ./lib/v7ve/simdvfpv4 ./lib/v7ve/simdvfpv4/hard ./lib/v7ve/simdvfpv4/hard/cpu-init ./lib/v7ve/simdvfpv4/softfp ./lib/v7ve/simdvfpv4/softfp/cpu-init with, for example: $ lsl ./lib/v7ve/simdvfpv4/softfp total 42228 drwxr-xr-x 3 rearnsha rearnsha 4096 Jan 13 15:01 . drwxr-xr-x 4 rearnsha rearnsha 4096 Jan 13 14:57 .. -rw-r--r-- 1 rearnsha rearnsha 509 Jan 13 14:59 aprofile-validation.specs -rw-r--r-- 1 rearnsha rearnsha 493 Jan 13 14:59 aprofile-ve.specs drwxr-xr-x 2 rearnsha rearnsha 4096 Jan 13 14:59 cpu-init -rw-r--r-- 1 rearnsha rearnsha 2920 Jan 13 14:59 crt0.o -rw-r--r-- 1 rearnsha rearnsha 195 Jan 13 14:59 iq80310.specs -rw-r--r-- 2 rearnsha rearnsha 6002740 Jan 13 14:59 libc.a -rw-r--r-- 2 rearnsha rearnsha 6002740 Jan 13 14:59 libg.a -rw-r--r-- 1 rearnsha rearnsha 8335630 Jan 13 15:00 libgfortran.a -rwxr-xr-x 1 rearnsha rearnsha 1120 Jan 13 15:00 libgfortran.la -rw-r--r-- 1 rearnsha rearnsha 188 Jan 13 15:00 libgfortran.spec -rw-r--r-- 1 rearnsha rearnsha 17044 Jan 13 14:59 libgloss-linux.a -rw-r--r-- 1 rearnsha rearnsha 2873304 Jan 13 14:59 libm.a -rw-r--r-- 1 rearnsha rearnsha 167258 Jan 13 14:59 libnosys.a -rw-r--r-- 1 rearnsha rearnsha 703972 Jan 13 15:00 libobjc.a -rwxr-xr-x 1 rearnsha rearnsha 1104 Jan 13 15:00 libobjc.la -rw-r--r-- 1 rearnsha rearnsha 63412 Jan 13 14:59 librdimon.a -rw-r--r-- 1 rearnsha rearnsha 57790 Jan 13 14:59 librdpmon.a -rw-r--r-- 1 rearnsha rearnsha 121194 Jan 13 14:59 libssp.a -rwxr-xr-x 1 rearnsha rearnsha 1123 Jan 13 14:59 libssp.la -rw-r--r-- 1 rearnsha rearnsha 2654 Jan 13 14:59 libssp_nonshared.a -rwxr-xr-x 1 rearnsha rearnsha 1153 Jan 13 14:59 libssp_nonshared.la -rw-r--r-- 1 rearnsha rearnsha 17619664 Jan 13 15:01 libstdc++.a -rw-r--r-- 1 rearnsha rearnsha 2472 Jan 13 15:01 libstdc++.a-gdb.py -rwxr-xr-x 1 rearnsha rearnsha 955 Jan 13 15:01 libstdc++.la -rw-r--r-- 1 rearnsha rearnsha 1109888 Jan 13 15:01 libsupc++.a -rwxr-xr-x 1 rearnsha rearnsha 950 Jan 13 15:01 libsupc++.la -rw-r--r-- 1 rearnsha rearnsha 8140 Jan 13 14:59 linux-crt0.o -rw-r--r-- 1 rearnsha rearnsha 121 Jan 13 14:59 linux.specs -rw-r--r-- 1 rearnsha rearnsha 680 Jan 13 14:59 nano.specs -rw-r--r-- 1 rearnsha rearnsha 277 Jan 13 14:59 nosys.specs -rw-r--r-- 1 rearnsha rearnsha 192 Jan 13 14:59 pid.specs -rw-r--r-- 1 rearnsha rearnsha 3044 Jan 13 14:59 rdimon-crt0.o -rw-r--r-- 1 rearnsha rearnsha 419 Jan 13 14:59 rdimon.specs -rw-r--r-- 1 rearnsha rearnsha 2344 Jan 13 14:59 rdpmon-crt0.o -rw-r--r-- 1 rearnsha rearnsha 147 Jan 13 14:59 rdpmon.specs -rw-r--r-- 1 rearnsha rearnsha 1920 Jan 13 14:59 redboot-crt0.o -rw-r--r-- 1 rearnsha rearnsha 6119 Jan 13 14:59 redboot.ld -rw-r--r-- 1 rearnsha rearnsha 192 Jan 13 14:59 redboot.specs -rw-r--r-- 1 rearnsha rearnsha 17568 Jan 13 14:59 redboot-syscalls.o I suggest you check that the install step completed successfully. > My question: How could this possibly work? I'd rather assumed that, similar to an x86_64 multilib build, dedicated binaries are needed for each of the available subarchs according to the output of: > > $ /disk2/ccache/install/arm-audis4-linux-gnueabihf@x86_64-linux-gnu/bin/arm-audis4-linux-gnueabihf-gcc -print-multi-lib > .; > thumb;@mthumb > v7-a;@march=armv7-a > v7ve;@march=armv7ve > v8-a;@march=armv8-a > v7-a/fpv3/softfp;@march=armv7-a@mfpu=vfpv3-d16@mfloat-abi=softfp > v7-a/fpv3/hard;@march=armv7-a@mfpu=vfpv3-d16@mfloat-abi=hard > v7-a/simdv1/softfp;@march=armv7-a@mfpu=neon@mfloat-abi=softfp > v7-a/simdv1/hard;@march=armv7-a@mfpu=neon@mfloat-abi=hard > v7ve/fpv4/softfp;@march=armv7ve@mfpu=vfpv4-d16@mfloat-abi=softfp > v7ve/fpv4/hard;@march=armv7ve@mfpu=vfpv4-d16@mfloat-abi=hard > v7ve/simdvfpv4/softfp;@march=armv7ve@mfpu=neon-vfpv4@mfloat-abi=softfp > v7ve/simdvfpv4/hard;@march=armv7ve@mfpu=neon-vfpv4@mfloat-abi=hard > v8-a/simdv8/softfp;@march=armv8-a@mfpu=neon-fp-armv8@mfloat-abi=softfp > v8-a/simdv8/hard;@march=armv8-a@mfpu=neon-fp-armv8@mfloat-abi=hard > thumb/v7-a;@mthumb@march=armv7-a > thumb/v7ve;@mthumb@march=armv7ve > thumb/v8-a;@mthumb@march=armv8-a > thumb/v7-a/fpv3/softfp;@mthumb@march=armv7-a@mfpu=vfpv3-d16@mfloat-abi=softfp > thumb/v7-a/fpv3/hard;@mthumb@march=armv7-a@mfpu=vfpv3-d16@mfloat-abi=hard > thumb/v7-a/simdv1/softfp;@mthumb@march=armv7-a@mfpu=neon@mfloat-abi=softfp > thumb/v7-a/simdv1/hard;@mthumb@march=armv7-a@mfpu=neon@mfloat-abi=hard > thumb/v7ve/fpv4/softfp;@mthumb@march=armv7ve@mfpu=vfpv4-d16@mfloat-abi=softfp > thumb/v7ve/fpv4/hard;@mthumb@march=armv7ve@mfpu=vfpv4-d16@mfloat-abi=hard > thumb/v7ve/simdvfpv4/softfp;@mthumb@march=armv7ve@mfpu=neon-vfpv4@mfloat-abi=softfp > thumb/v7ve/simdvfpv4/hard;@mthumb@march=armv7ve@mfpu=neon-vfpv4@mfloat-abi=hard > thumb/v8-a/simdv8/softfp;@mthumb@march=armv8-a@mfpu=neon-fp-armv8@mfloat-abi=softfp > thumb/v8-a/simdv8/hard;@mthumb@march=armv8-a@mfpu=neon-fp-armv8@mfloat-abi=hard > > And what about a related multilib GLIBC for arm? Do I also only need only one? > Depends on your needs, but you'll need at a minimum one for each float-abi variant. It's relatively unusual to use the 'aprofile' multilib list for glibc variants; most code doesn't benefit hugely from more specific options and dynamic function selection and symbol binding can mitigate some of the more egregious cases. R. > Thanks for sharing your thoughts, > > Chris > > >