[cfe-commits] r154200 - in /cfe/trunk: lib/Driver/Tools.cpp test/Driver/linux-ld.c

İsmail Dönmez ismail at namtrac.org
Thu Apr 12 02:22:26 PDT 2012


Hi;

On Fri, Apr 6, 2012 at 10:14 PM, Simon Atanasyan <satanasyan at mips.com>wrote:

> Author: atanasyan
> Date: Fri Apr  6 15:14:27 2012
> New Revision: 154200
>
> URL: http://llvm.org/viewvc/llvm-project?rev=154200&view=rev
> Log:
> MIPS: Provide a correct path to the dynamic linker when build for MIPS
> 64-bit targets.
>
> Modified:
>    cfe/trunk/lib/Driver/Tools.cpp
>    cfe/trunk/test/Driver/linux-ld.c
>
> Modified: cfe/trunk/lib/Driver/Tools.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=154200&r1=154199&r2=154200&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/Driver/Tools.cpp (original)
> +++ cfe/trunk/lib/Driver/Tools.cpp Fri Apr  6 15:14:27 2012
> @@ -5164,6 +5164,9 @@
>     else if (ToolChain.getArch() == llvm::Triple::mips ||
>              ToolChain.getArch() == llvm::Triple::mipsel)
>       CmdArgs.push_back("/lib/ld.so.1");
> +    else if (ToolChain.getArch() == llvm::Triple::mips64 ||
> +             ToolChain.getArch() == llvm::Triple::mips64el)
> +      CmdArgs.push_back("/lib64/ld.so.1");
>     else if (ToolChain.getArch() == llvm::Triple::ppc)
>       CmdArgs.push_back("/lib/ld.so.1");
>     else if (ToolChain.getArch() == llvm::Triple::ppc64)
>
> Modified: cfe/trunk/test/Driver/linux-ld.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/linux-ld.c?rev=154200&r1=154199&r2=154200&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/Driver/linux-ld.c (original)
> +++ cfe/trunk/test/Driver/linux-ld.c Fri Apr  6 15:14:27 2012
> @@ -187,26 +187,35 @@
>  // CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/usr/lib/../lib64"
>  //
>  // Check that we do not pass --hash-style=gnu and --hash-style=both to
> linker
> -// when build for MIPS platforms.
> +// and provide correct path to the dynamic linker and emulation mode when
> build
> +// for MIPS platforms.
>  // RUN: %clang %s -### -o %t.o 2>&1 \
>  // RUN:     -target mips-linux-gnu -ccc-clang-archs mips \
>  // RUN:   | FileCheck --check-prefix=CHECK-MIPS %s
>  // CHECK-MIPS: "{{.*}}ld{{(.exe)?}}"
> +// CHECK-MIPS: "-m" "elf32btsmip"
> +// CHECK-MIPS: "-dynamic-linker" "{{.*}}/lib/ld.so.1"
>  // CHECK-MIPS-NOT: "--hash-style={{gnu|both}}"
>  // RUN: %clang %s -### -o %t.o 2>&1 \
>  // RUN:     -target mipsel-linux-gnu -ccc-clang-archs mipsel \
>  // RUN:   | FileCheck --check-prefix=CHECK-MIPSEL %s
>  // CHECK-MIPSEL: "{{.*}}ld{{(.exe)?}}"
> +// CHECK-MIPSEL: "-m" "elf32ltsmip"
> +// CHECK-MIPSEL: "-dynamic-linker" "{{.*}}/lib/ld.so.1"
>

This last line breaks on Linux/x86-64 :

/home/abuild/rpmbuild/BUILD/llvm/tools/clang/test/Driver/linux-ld.c:197:16:
error: expected string not found in input
// CHECK-MIPS: "-dynamic-linker" "{{.*}}/lib/ld.so.1"
               ^
<stdin>:6:99: note: scanning from here
 "/usr/bin/ld" "-z" "relro" "--build-id" "--enable-new-dtags"
"--eh-frame-hdr" "-m" "elf32btsmip" "-dynamic-linker" "/lib64/ld.so.1" "-o"
"/home/abuild/rpmbuild/BUILD/llvm/stage3/tools/clang/test/Driver/Output/linux-ld.c.tmp.o"
"crt1.o" "crti.o" "crtbegin.o" "-L/lib" "-L/usr/lib"
"/tmp/linux-ld-FjAs8Q.o" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
"-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "crtend.o" "crtn.o"

Regards,
ismail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120412/01ade9b3/attachment.html>


More information about the cfe-commits mailing list