This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

How to tell linker to use minimum ISA?


Hi Everyone,

I have object files from different ISAs. The higher ISAs are guarded
at runtime though getauxval.

Compile is OK. For example:

    a.o  # -march=armv7a
    b_simd.o  # -march=armv7a -mfpu=vfpv3-d16 -mfpu=neon

On Android link is failing when using only -march=armv7a with:

    .../arm-linux-androideabi/bin/ld: error: aria_simd.o uses VFP
register arguments, output does not

To fix it I need to add -march=armv7a -mfpu=vfpv3-d16 -mfpu=neon to LDFLAGS.

I'm concerned the linker may want to perform optimizations, especially
now that LTO is becoming more popular. That could cause a lot of
problems, especially if the linker uses the wrong ISA.

How do I tell the linker to use the minimum ISA, and not the ISA I am using?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]