1 // REQUIRES: ppc32-registered-target,ppc64-registered-target 2 // RUN: %clang -ccc-clang-archs powerpc -no-canonical-prefixes \ 3 // RUN: -target powerpc-pc-freebsd8 %s \ 4 // RUN: --sysroot=%S/Inputs/basic_freebsd_tree -### 2>&1 \ 5 // RUN: | FileCheck --check-prefix=CHECK-PPC %s 6 // CHECK-PPC: clang{{.*}}" "-cc1" "-triple" "powerpc-pc-freebsd8" 7 // CHECK-PPC: ld{{.*}}" "--sysroot=[[SYSROOT:[^"]+]]" 8 // 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" 9 // 10 // RUN: %clang -ccc-clang-archs powerpc64 -no-canonical-prefixes \ 11 // RUN: -target powerpc64-pc-freebsd8 %s \ 12 // RUN: --sysroot=%S/Inputs/basic_freebsd64_tree -### 2>&1 \ 13 // RUN: | FileCheck --check-prefix=CHECK-PPC64 %s 14 // CHECK-PPC64: clang{{.*}}" "-cc1" "-triple" "powerpc64-pc-freebsd8" 15 // CHECK-PPC64: ld{{.*}}" "--sysroot=[[SYSROOT:[^"]+]]" 16 // 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" 17 // 18 // 19 // Check that -m32 properly adjusts the toolchain flags. 20 // 21 // RUN: %clang -no-canonical-prefixes -target x86_64-pc-freebsd8 -m32 %s \ 22 // RUN: --sysroot=%S/Inputs/multiarch_freebsd64_tree -### 2>&1 \ 23 // RUN: | FileCheck --check-prefix=CHECK-LIB32 %s 24 // CHECK-LIB32: clang{{.*}}" "-cc1" "-triple" "i386-pc-freebsd8" 25 // CHECK-LIB32: ld{{.*}}" {{.*}} "-m" "elf_i386_fbsd" 26 // 27 // RUN: %clang -target x86_64-pc-freebsd8 -m32 %s 2>&1 \ 28 // RUN: --sysroot=%S/Inputs/multiarch_freebsd64_tree -print-search-dirs 2>&1 \ 29 // RUN: | FileCheck --check-prefix=CHECK-LIB32PATHS %s 30 // CHECK-LIB32PATHS: libraries: ={{.*:?}}/usr/lib32 31