r203212 - [OPENMP] Fixed linked libraries for libiomp5 on Linux
Alexey Bataev
a.bataev at hotmail.com
Thu Mar 6 23:43:52 PST 2014
Author: abataev
Date: Fri Mar 7 01:43:52 2014
New Revision: 203212
URL: http://llvm.org/viewvc/llvm-project?rev=203212&view=rev
Log:
[OPENMP] Fixed linked libraries for libiomp5 on Linux
Modified:
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/test/OpenMP/linking.c
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=203212&r1=203211&r2=203212&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Fri Mar 7 01:43:52 2014
@@ -6911,7 +6911,7 @@ void gnutools::Link::ConstructJob(Compil
AddRunTimeLibs(ToolChain, D, CmdArgs, Args);
if (Args.hasArg(options::OPT_pthread) ||
- Args.hasArg(options::OPT_pthreads) || UsedOpenMPLib == LibGOMP)
+ Args.hasArg(options::OPT_pthreads) || UsedOpenMPLib != LibUnknown)
CmdArgs.push_back("-lpthread");
CmdArgs.push_back("-lc");
Modified: cfe/trunk/test/OpenMP/linking.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/linking.c?rev=203212&r1=203211&r2=203212&view=diff
==============================================================================
--- cfe/trunk/test/OpenMP/linking.c (original)
+++ cfe/trunk/test/OpenMP/linking.c Fri Mar 7 01:43:52 2014
@@ -33,13 +33,15 @@
// RUN: -fopenmp=libiomp5 -target i386-unknown-linux \
// RUN: | FileCheck --check-prefix=CHECK-IOMP5-LD-32 %s
// CHECK-IOMP5-LD-32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-IOMP5-LD-32: "-liomp5"
+// CHECK-IOMP5-LD-32: "-liomp5" "-lgcc"
+// CHECK-IOMP5-LD-32: "-lpthread" "-lc"
//
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: -fopenmp=libiomp5 -target x86_64-unknown-linux \
// RUN: | FileCheck --check-prefix=CHECK-IOMP5-LD-64 %s
// CHECK-IOMP5-LD-64: "{{.*}}ld{{(.exe)?}}"
-// CHECK-IOMP5-LD-64: "-liomp5"
+// CHECK-IOMP5-LD-64: "-liomp5" "-lgcc"
+// CHECK-IOMP5-LD-64: "-lpthread" "-lc"
//
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: -fopenmp=lib -target i386-unknown-linux \
More information about the cfe-commits
mailing list