eal: detect endianness
There is no standard to check endianness.
So we need to try different checks.
Previous trials were done in testpmd (see commits
51f694dd40f56 and
64741f237cf29) without full success.
This one is not guaranteed to work everywhere so it could
evolve when exceptions are found.
If endianness is not detected, there is a fallback on x86
to little endian. It could be forced before doing detection
but it would add some arch-dependent code in the generic header.
The option CONFIG_RTE_ARCH_BIG_ENDIAN introduced for IBM Power only
(commit
a982ec81d84d53) can be removed. A compile-time check is better.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
Acked-by: Michael Qiu <michael.qiu@intel.com>