Comment 12 for bug 1304267

Revision history for this message
changyp (changyp6) wrote : Re: [Bug 1304267] Re: Linaro arm linux gnueabihf gcc always add Tag_FP_arch: VFPv3-D16 when building .S file with -mfloat-abi=soft

I changed t-mlibs to support armv6k and armv7-a without fpu and with
vfpv3 respectively.
Here is the output
./gcc/xgcc -print-multi-lib
.;
armv7a-linux-gnueabi;@marm@march=armv7-a@mtune=cortex-a9@mfloat-abi=softfp@mfpu=vfpv3
armv6k-linux-gnueabi;@marm@march=armv6k@mtune=arm1136j-s@mfloat-abi=soft@Wa,-mfpu=softvfp

libc layout in install_root/arm-linux-gnueabihf/libc/usr/lib is

usr/lib
├── arm-linux-gnueabihf
│ ├── crt1.o
│ ├── crti.o
│ ├── crtn.o
│ └── libc.so
├── armv6k-linux-gnueabi
│ ├── crt1.o
│ ├── crti.o
│ ├── crtn.o
│ └── libc.so
└── armv7a-linux-gnueabi
    ├── crt1.o
    ├── crti.o
    ├── crtn.o
    └── libc.so

The final link commands of
armv6k-linux-gnueabi/libgcc/libgcc_s.so.1.tmp show that xgcc is
looking for ./gcc/crtendS.o instead of
./gcc/armv6k-linux-gnueabi/crtendS.o

However, libgcc_s.so.1 for armv7a-linux-gnueabi is compiled
successfully, the link command is correct,
armv7a-linux-gnueabi/libgcc/libgcc_s.so.1.tmp is linking
./gcc/armv7a-linux-gnueabi/crtendS.o

I don't understand why one multilib directory is correct, the other is wrong.

On Wed, Apr 9, 2014 at 5:29 PM, Zhenqiang Chen
<email address hidden> wrote:
> I do not think it is a libgcc bug. If your multilib option is correct,
> libgcc should find the correct path.
>
> Can you show me the multilib options?
>
> ./gcc/xgcc --print-multi-lib
>
> And all your libc layout in your install dir?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1304267
>
> Title:
> Linaro arm linux gnueabihf gcc always add Tag_FP_arch: VFPv3-D16 when
> building .S file with -mfloat-abi=soft
>
> Status in Linaro GCC:
> Invalid
>
> Bug description:
> I have a ASM file with extension .S
> After I build this file with option
> "-marm -march=armv4t -mfloat-abi=soft -c xxx.S -o xxx.o"
> I checked xxx.o with command "arm-linux-gnueabihf-readelf -A xxx.o"
>
> And the output is
> Attribute Section: aeabi
> File Attributes
> Tag_CPU_name: "4t"
> Tag_CPU_arch: v4T
> Tag_ARM_ISA_use: Yes
> Tag_THUMB_ISA_use: Thumb-1
> Tag_FP_arch: VFPv3-D16
>
> I noticed tag " Tag_FP_arch: VFPv3-D16", this tag prevents this xxx.o
> from linking with other .o files.
>
> However, when building .c or .cpp files, the generated .o files don't
> have " Tag_FP_arch: VFPv3-D16"
>
> It seems that AS doen't respect option "-mfloat-abi=soft" and always
> add "Tag_FP_arch: VFPv3-D16" to the genrated .o files
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/gcc-linaro/+bug/1304267/+subscriptions