diff options
author | Carlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au> | 2012-10-15 17:10:06 +1100 |
---|---|---|
committer | Carlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au> | 2012-10-15 17:10:06 +1100 |
commit | be1de4be954c80875ad4108e0a33e8e131b2f2c0 (patch) | |
tree | 1fbbecf276bf7c7bdcbb4dd446099d6d90eaa516 /clang/test/Driver/freebsd.c | |
parent | c4626a62754862d20b41e8a46a3574264ea80e6d (diff) | |
parent | f1bd2e48c5324d3f7cda4090c87f8a5b6f463ce2 (diff) |
Merge branch 'master' of ssh://bitbucket.org/czan/honours
Diffstat (limited to 'clang/test/Driver/freebsd.c')
-rw-r--r-- | clang/test/Driver/freebsd.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/clang/test/Driver/freebsd.c b/clang/test/Driver/freebsd.c new file mode 100644 index 0000000..1fb84a0 --- /dev/null +++ b/clang/test/Driver/freebsd.c @@ -0,0 +1,30 @@ +// REQUIRES: ppc32-registered-target,ppc64-registered-target +// RUN: %clang -ccc-clang-archs powerpc -no-canonical-prefixes \ +// RUN: -target powerpc-pc-freebsd8 %s \ +// RUN: --sysroot=%S/Inputs/basic_freebsd_tree -### 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-PPC %s +// CHECK-PPC: clang{{.*}}" "-cc1" "-triple" "powerpc-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 -ccc-clang-archs powerpc64 -no-canonical-prefixes \ +// RUN: -target powerpc64-pc-freebsd8 %s \ +// RUN: --sysroot=%S/Inputs/basic_freebsd64_tree -### 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-PPC64 %s +// CHECK-PPC64: clang{{.*}}" "-cc1" "-triple" "powerpc64-pc-freebsd8" +// CHECK-PPC64: ld{{.*}}" "--sysroot=[[SYSROOT:[^"]+]]" +// CHECK-PPC64: "--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 -target x86_64-pc-freebsd8 -m32 %s \ +// RUN: --sysroot=%S/Inputs/multiarch_freebsd64_tree -### 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-LIB32 %s +// CHECK-LIB32: clang{{.*}}" "-cc1" "-triple" "i386-pc-freebsd8" +// CHECK-LIB32: ld{{.*}}" {{.*}} "-m" "elf_i386_fbsd" +// +// RUN: %clang -target x86_64-pc-freebsd8 -m32 %s 2>&1 \ +// RUN: --sysroot=%S/Inputs/multiarch_freebsd64_tree -print-search-dirs 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-LIB32PATHS %s +// CHECK-LIB32PATHS: libraries: ={{.*:?}}/usr/lib32 |