diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-08-10 17:39:05 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-08-10 17:39:05 +0000 |
commit | 9d5600a8349cdda4e4971ebbbf7aa15a9da8bba7 (patch) | |
tree | 777eecfe897ecfbd76df51edf6daec5554957770 /test/Driver/freebsd.c | |
parent | 648220ed00711a0fb8ea4a1ab6896a4ee63d8fc5 (diff) | |
download | clang-9d5600a8349cdda4e4971ebbbf7aa15a9da8bba7.tar.gz clang-9d5600a8349cdda4e4971ebbbf7aa15a9da8bba7.tar.bz2 clang-9d5600a8349cdda4e4971ebbbf7aa15a9da8bba7.tar.xz |
Driver/FreeBSD: Infer the right arch name in the presence of -m32,-m64, for the
cases we care about.
- This is eventually going to be unified outside the host specific code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110693 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Driver/freebsd.c')
-rw-r--r-- | test/Driver/freebsd.c | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/test/Driver/freebsd.c b/test/Driver/freebsd.c index 3deee46f9a..e8bc223457 100644 --- a/test/Driver/freebsd.c +++ b/test/Driver/freebsd.c @@ -1,7 +1,21 @@ -// RUN: %clang -ccc-clang-archs "" -ccc-host-triple powerpc64-pc-freebsd8 %s -### 2> %t.log -// RUN: cat %t.log -// RUN: FileCheck -input-file %t.log %s +// RUN: %clang -ccc-clang-archs "" -ccc-host-triple powerpc64-pc-freebsd8 %s -### 2> %t +// RUN: FileCheck --check-prefix=CHECK-PPC < %t %s +// +// CHECK-PPC: clang{{.*}}" "-cc1" "-triple" "powerpc64-pc-freebsd8" +// CHECK-PPC: as{{.*}}" "-o" "{{.*}}.o" "{{.*}}.s +// CHECK-PPC: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "{{.*}}ld-elf{{.*}}" "-o" "a.out" "{{.*}}crt1.o" "{{.*}}crti.o" "{{.*}}crtbegin.o" "{{.*}}.o" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "{{.*}}crtend.o" "{{.*}}crtn.o" -// CHECK: clang{{.*}}" "-cc1" "-triple" "powerpc64-pc-freebsd8" -// CHECK: as{{.*}}" "-o" "{{.*}}.o" "{{.*}}.s -// CHECK: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "{{.*}}ld-elf{{.*}}" "-o" "a.out" "{{.*}}crt1.o" "{{.*}}crti.o" "{{.*}}crtbegin.o" "{{.*}}.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 -ccc-host-triple x86_64-pc-freebsd8 -m32 -### %s 2> %t +// RUN: FileCheck --check-prefix=CHECK-LIB32 < %t %s +// +// CHECK-LIB32: clang{{.*}}" "-cc1" "-triple" "i386-pc-freebsd8" +// CHECK-LIB32: as{{.*}}" "--32" +// CHECK-LIB32: ld{{.*}}" {{.*}} "-m" "elf_i386_fbsd" +// +// RUN: %clang -ccc-host-triple x86_64-pc-freebsd8 -m32 -print-search-dirs %s > %t +// RUN: FileCheck --check-prefix=CHECK-LIB32PATHS < %t %s +// +// CHECK-LIB32PATHS: libraries: ={{.*}}:/usr/lib32 |