diff options
| author | Joerg Sonnenberger <joerg@bec.de> | 2014-09-10 21:25:37 +0000 |
|---|---|---|
| committer | Joerg Sonnenberger <joerg@bec.de> | 2014-09-10 21:25:37 +0000 |
| commit | b7e0ac625364c19f4741ead3f4a13a2e8ad101b2 (patch) | |
| tree | 7c1e73f3733dc9845b583f5794fcf1c4bbd4b14d /clang/test/Driver/biarch.c | |
| parent | 8123630a2184921a62e2314b8dce878bc0a4d864 (diff) | |
| download | bcm5719-llvm-b7e0ac625364c19f4741ead3f4a13a2e8ad101b2.tar.gz bcm5719-llvm-b7e0ac625364c19f4741ead3f4a13a2e8ad101b2.zip | |
Only override the target architecture on -m32 and friends if it is
actually different. Fixes a surprising link error with nodejs on rpi,
where armv6-netbsd-eabihf turned into armv5e-netbsd-eabihf, which
doesn't lacks the necessary VFP support.
llvm-svn: 217546
Diffstat (limited to 'clang/test/Driver/biarch.c')
| -rw-r--r-- | clang/test/Driver/biarch.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/clang/test/Driver/biarch.c b/clang/test/Driver/biarch.c new file mode 100644 index 00000000000..1f0982e3c5d --- /dev/null +++ b/clang/test/Driver/biarch.c @@ -0,0 +1,41 @@ +// RUN: %clang -target i386--netbsd -m32 %s -### 2> %t +// RUN: grep '"-cc1" "-triple" "i386--netbsd"' %t + +// RUN: %clang -target i386--netbsd -m64 %s -### 2> %t +// RUN: grep '"-cc1" "-triple" "x86_64--netbsd"' %t + +// RUN: %clang -target x86_64--netbsd -m32 %s -### 2> %t +// RUN: grep '"-cc1" "-triple" "i386--netbsd"' %t + +// RUN: %clang -target x86_64--netbsd -m64 %s -### 2> %t +// RUN: grep '"-cc1" "-triple" "x86_64--netbsd"' %t + +// RUN: %clang -target armv6--netbsd-eabihf -m32 %s -### 2> %t +// RUN: grep '"-cc1" "-triple" "armv6--netbsd-eabihf"' %t + +// RUN: %clang -target sparcv9--netbsd -m32 %s -### 2> %t +// RUN: grep '"-cc1" "-triple" "sparc--netbsd"' %t + +// RUN: %clang -target sparcv9--netbsd -m64 %s -### 2> %t +// RUN: grep '"-cc1" "-triple" "sparcv9--netbsd"' %t + +// RUN: %clang -target sparc64--netbsd -m64 %s -### 2> %t +// RUN: grep '"-cc1" "-triple" "sparc64--netbsd"' %t + +// RUN: %clang -target sparc--netbsd -m32 %s -### 2> %t +// RUN: grep '"-cc1" "-triple" "sparc--netbsd"' %t + +// RUN: %clang -target sparc--netbsd -m64 %s -### 2> %t +// RUN: grep '"-cc1" "-triple" "sparcv9--netbsd"' %t + +// RUN: %clang -target mips64--netbsd -m32 %s -### 2> %t +// RUN: grep '"-cc1" "-triple" "mips--netbsd"' %t + +// RUN: %clang -target mips64--netbsd -m64 %s -### 2> %t +// RUN: grep '"-cc1" "-triple" "mips64--netbsd"' %t + +// RUN: %clang -target mips--netbsd -m32 %s -### 2> %t +// RUN: grep '"-cc1" "-triple" "mips--netbsd"' %t + +// RUN: %clang -target mips--netbsd -m64 %s -### 2> %t +// RUN: grep '"-cc1" "-triple" "mips64--netbsd"' %t |

