RTEMS GCC BIG ENDIAN SUPPORT

Aby Tom abythayil at gmail.com
Tue Aug 6 08:10:53 UTC 2019


Dear Sebastian Huber, Jonathan Brandmeyer and RTEMS community,

Thank you for your valuable inputs and suggestions to my problem with
big-endian targets.
I was able to resolve most of the issue by adding the CPU_FLAGS to linker
as well.

Now I have a few new errors; *‘**compiled for a little endian system and
target is big endian**’* which are just opposite of the previous ones.

The following are my console outputs:

/../../../../arm-rtems4.11/bin/ld:
/opt/rtems/4.11/bin/../lib/gcc/arm-rtems4.11/4.9.3/libgcc.a(_aeabi_uldivmod.o):
compiled for a little endian system and target is big endian

/../../../../arm-rtems4.11/bin/ld: failed to merge target specific data of
file
/opt/rtems/4.11/bin/../lib/gcc/arm-rtems4.11/4.9.3/libgcc.a(_aeabi_uldivmod.o)

/../../../../arm-rtems4.11/bin/ld:
/opt/rtems/4.11/bin/../lib/gcc/arm-rtems4.11/4.9.3/libgcc.a(bpabi.o):
compiled for a little endian system and target is big endian

/../../../../arm-rtems4.11/bin/ld: failed to merge target specific data of
file /opt/rtems/4.11/bin/../lib/gcc/arm-rtems4.11/4.9.3/libgcc.a(bpabi.o)

/../../../../arm-rtems4.11/bin/ld:
/opt/rtems/4.11/bin/../lib/gcc/arm-rtems4.11/4.9.3/libgcc.a(_dvmd_tls.o):
compiled for a little endian system and target is big endian

/../../../../arm-rtems4.11/bin/ld: failed to merge target specific data of
file
/opt/rtems/4.11/bin/../lib/gcc/arm-rtems4.11/4.9.3/libgcc.a(_dvmd_tls.o)

/../../../../arm-rtems4.11/bin/ld:
/opt/rtems/4.11/bin/../lib/gcc/arm-rtems4.11/4.9.3/libgcc.a(_divdi3.o):
compiled for a little endian system and target is big endian

/../../../../arm-rtems4.11/bin/ld: failed to merge target specific data of
file /opt/rtems/4.11/bin/../lib/gcc/arm-rtems4.11/4.9.3/libgcc.a(_divdi3.o)

/../../../../arm-rtems4.11/bin/ld:
/opt/rtems/4.11/bin/../lib/gcc/arm-rtems4.11/4.9.3/libgcc.a(_udivdi3.o):
compiled for a little endian system and target is big endian

/../../../../arm-rtems4.11/bin/ld: failed to merge target specific data of
file /opt/rtems/4.11/bin/../lib/gcc/arm-rtems4.11/4.9.3/libgcc.a(_udivdi3.o)

/../../../../arm-rtems4.11/bin/ld:
/opt/rtems/4.11/bin/../lib/gcc/arm-rtems4.11/4.9.3/libgcc.a(_clzdi2.o):
compiled for a little endian system and target is big endian

/../../../../arm-rtems4.11/bin/ld: failed to merge target specific data of
file /opt/rtems/4.11/bin/../lib/gcc/arm-rtems4.11/4.9.3/libgcc.a(_clzdi2.o)

/../../../../arm-rtems4.11/bin/ld:
/opt/rtems/4.11/bin/../lib/gcc/arm-rtems4.11/4.9.3/libgcc.a(_clzsi2.o):
compiled for a little endian system and target is big endian

/../../../../arm-rtems4.11/bin/ld: failed to merge target specific data of
file /opt/rtems/4.11/bin/../lib/gcc/arm-rtems4.11/4.9.3/libgcc.a(_clzsi2.o)

*I have only used the RSB from RTEMS **to make the toolchain and all GCC
files are from RTEMS only.*

Can you help me resolve this issue?
All similar issues I found on internet are related to GNU GCC compilers.
That is why I am looking for a solution from here.

Thank you very much for your time and effort.

Best regards,
Aby Tom

On Fri, Aug 2, 2019, 5:32 PM Jonathan Brandmeyer <jbrandmeyer at planetiq.com>
wrote:

> Another tip: Be sure to pass the complete set of machine-control
> arguments to the linker as well as the compiler invocations.  Ie,
> `-mbig-endian` and kin need to be used as both LDFLAGS and CFLAGS.
>
> > [OP is passing arguments] -D__ARMEB__ -D__VFP_NOFP__ -mfpu=vfpv3-d16
> -mfloat-abi=hard
>
> > [in order to achieve] This configuration is for ARM Cortex-R5F
> processor, floating-point disabled, and big-endian target.
>
> I don't think this does what you intend.  Don't pass the -D__
> arguments at all; just use the appropriate -m arguments.  If you
> really do want to disable the FPU, you'll want `-mfloat-abi=soft`.
> The arguments `-mfpu=vfpv3-d16 -mfloat-abi=hard` ask the compiler to
> emit floating-point instructions.
>
> See also
> https://gcc.gnu.org/onlinedocs/gcc-7.4.0/gcc/ARM-Options.html#ARM-Options
>
> HTH,
> --
> Jonathan Brandmeyer
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20190806/347c142c/attachment.html>


More information about the users mailing list