[ARM][AArch64] Pass through endian flags to assembler and linker.
authorPeter Smith <peter.smith@linaro.org>
Tue, 16 Oct 2018 09:21:17 +0000 (09:21 +0000)
committerPeter Smith <peter.smith@linaro.org>
Tue, 16 Oct 2018 09:21:17 +0000 (09:21 +0000)
commite75b6d78e0f90c1bdcf16d59fdacbbc0ffe6ec4a
tree9032adfd39bd7bb9385095220592a1d5a3544721
parent87de55ad01a092164f77f12f8aaccb0c5d7f6a7b
[ARM][AArch64] Pass through endian flags to assembler and linker.

The big-endian arm32 Linux builds are currently failing when the
-mbig-endian flag is used but the binutils default on the system is little
endian. This also holds when -mlittle-endian is used and the binutils
default is big endian.

The patch always passes through -EL or -BE to the assembler and linker,
taking into account the target and the -mbig-endian and -mlittle-endian
flag.

Fixes pr38770

Differential Revision: https://reviews.llvm.org/D52784

llvm-svn: 344597
clang/lib/Driver/ToolChains/Arch/ARM.cpp
clang/lib/Driver/ToolChains/Arch/ARM.h
clang/lib/Driver/ToolChains/Gnu.cpp
clang/lib/Driver/ToolChains/NetBSD.cpp
clang/test/Driver/linux-as.c
clang/test/Driver/linux-ld.c