diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2012-01-25 21:32:31 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2012-01-25 21:32:31 +0000 |
commit | d081baa34b8b165d204a9e48c7c29d736f9d9317 (patch) | |
tree | da4c1afc5155d103077242a227ea0186f2a90e66 /test/Driver/freebsd.c | |
parent | 3943b1c0215da2a4171dd6c696cb75d19e5a04a9 (diff) | |
download | clang-d081baa34b8b165d204a9e48c7c29d736f9d9317.tar.gz clang-d081baa34b8b165d204a9e48c7c29d736f9d9317.tar.bz2 clang-d081baa34b8b165d204a9e48c7c29d736f9d9317.tar.xz |
Try to unbreak the FreeBSD toolchain's detection of 32-bit targets
inside a 64-bit freebsd machine with the 32-bit compatibility layer
installed. The FreeBSD image always has the /usr/lib32 directory, so
test for the more concrete existence of crt1.o. Also enhance the tests
for freebsd to clarify what these trees look like and exercise the new
code.
Thanks to all the FreeBSD folks for helping me understand what caused
the failure and how we might fix it. =] That helps a lot. Also, yay
build bots.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148981 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Driver/freebsd.c')
-rw-r--r-- | test/Driver/freebsd.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/test/Driver/freebsd.c b/test/Driver/freebsd.c index a25d6e0de4..c7edef93f3 100644 --- a/test/Driver/freebsd.c +++ b/test/Driver/freebsd.c @@ -1,14 +1,21 @@ -// RUN: %clang -no-canonical-prefixes --sysroot=%S/Inputs/basic_freebsd_tree -ccc-clang-archs "" -target powerpc64-pc-freebsd8 %s -### 2> %t +// RUN: %clang -no-canonical-prefixes --sysroot=%S/Inputs/basic_freebsd_tree -ccc-clang-archs "" -target powerpc-pc-freebsd8 %s -### 2> %t // RUN: FileCheck --check-prefix=CHECK-PPC < %t %s // // CHECK-PPC: clang{{.*}}" "-cc1" "-triple" "powerpc64-pc-freebsd8" // CHECK-PPC: ld{{.*}}" "--sysroot=[[SYSROOT:[^"]+]]" // CHECK-PPC: "--eh-frame-hdr" "-dynamic-linker" "{{.*}}ld-elf{{.*}}" "-o" "a.out" "{{.*}}crt1.o" "{{.*}}crti.o" "{{.*}}crtbegin.o" "-L[[SYSROOT]]/usr/lib" "{{.*}}.o" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "{{.*}}crtend.o" "{{.*}}crtn.o" - - +// +// RUN: %clang -no-canonical-prefixes --sysroot=%S/Inputs/basic_freebsd64_tree -ccc-clang-archs "" -target powerpc64-pc-freebsd8 %s -### 2> %t +// RUN: FileCheck --check-prefix=CHECK-PPC < %t %s +// +// CHECK-PPC: clang{{.*}}" "-cc1" "-triple" "powerpc64-pc-freebsd8" +// CHECK-PPC: ld{{.*}}" "--sysroot=[[SYSROOT:[^"]+]]" +// CHECK-PPC: "--eh-frame-hdr" "-dynamic-linker" "{{.*}}ld-elf{{.*}}" "-o" "a.out" "{{.*}}crt1.o" "{{.*}}crti.o" "{{.*}}crtbegin.o" "-L[[SYSROOT]]/usr/lib" "{{.*}}.o" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "{{.*}}crtend.o" "{{.*}}crtn.o" +// +// // Check that -m32 properly adjusts the toolchain flags. // -// RUN: %clang -no-canonical-prefixes --sysroot=%S/Inputs/basic_freebsd64_tree -target x86_64-pc-freebsd8 -m32 -### %s 2> %t +// RUN: %clang -no-canonical-prefixes --sysroot=%S/Inputs/multiarch_freebsd64_tree -target x86_64-pc-freebsd8 -m32 -### %s 2> %t // RUN: FileCheck --check-prefix=CHECK-LIB32 < %t %s // // CHECK-LIB32: clang{{.*}}" "-cc1" "-triple" "i386-pc-freebsd8" |