Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TEST 'Clang :: OpenMP/target_driver_and_codegen.c' FAILED #49

Open
howarthjw opened this issue Nov 16, 2014 · 5 comments
Open

TEST 'Clang :: OpenMP/target_driver_and_codegen.c' FAILED #49

howarthjw opened this issue Nov 16, 2014 · 5 comments

Comments

@howarthjw
Copy link

On x86_64-apple-darwin, clang-omp currently shows an apparent bogus test suite failure of...

FAIL: Clang :: OpenMP/target_driver_and_codegen.c (3899 of 7661)
******************** TEST 'Clang :: OpenMP/target_driver_and_codegen.c' FAILED ********************
Script:
--
gtimeout 1m     /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/clang  -### -fopenmp -omptargets=aaa-bbb-ccc-ddd /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c 2>&1    | /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck -check-prefix=CHK-INVALID-TARGET /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
gtimeout 1m     /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/clang  -### -fopenmp -omptargets=  /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c 2>&1    | /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck -check-prefix=CHK-EMPTY-OMPTARGETS /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
gtimeout 1m     /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/clang  -### -fopenmp -omptargets=x86_64-apple-darwin /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c 2>&1    | /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck -check-prefix=CHK-NO-SUPPORT /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
gtimeout 1m     /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/clang  -### -fopenmp -target powerpc64-linux -omptargets=powerpc64-ibm-linux-gnu,nvptx64-nvidia-cuda /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c 2>&1    | /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck -check-prefix=CHK-COMMANDS /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
gtimeout 1m    not /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/clang -cc1 -internal-isystem /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/bin/../lib/clang/3.5.0/include "-fopenmp" "-omptargets=powerpc64-ibm-linux-gnu,nvptx64-nvidia-cuda" "-triple" "powerpc64-ibm-linux-gnu" /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c 2>&1    | /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck -check-prefix=CHK-MAINFILE /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
gtimeout 1m    not /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/clang -cc1 -internal-isystem /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/bin/../lib/clang/3.5.0/include "-fopenmp" "-omptargets=powerpc64-ibm-linux-gnu,nvptx64-nvidia-cuda" "-omp-target-mode" "-triple" "nvptx64-nvidia-cuda" /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c 2>&1    | /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck -check-prefix=CHK-MAINFILE /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
gtimeout 1m    not /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/clang -cc1 -internal-isystem /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/bin/../lib/clang/3.5.0/include "-fopenmp" "-omptargets=powerpc64-ibm-linux-gnu,nvptx64-nvidia-cuda" "-triple" "powerpc64-ibm-linux-gnu" "-omp-main-file-path" "abcd.efgh" /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c 2>&1    | /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck -check-prefix=CHK-MODULEID /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
gtimeout 1m    not /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/clang -cc1 -internal-isystem /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/bin/../lib/clang/3.5.0/include "-fopenmp" "-omptargets=powerpc64-ibm-linux-gnu,nvptx64-nvidia-cuda" "-omp-target-mode" "-triple" "nvptx64-nvidia-cuda" /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c "-omp-main-file-path" "abcd.efgh" 2>&1    | /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck -check-prefix=CHK-MODULEID /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
gtimeout 1m     /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/clang  -### -fopenmp -target powerpc64-linux -omptargets=nvptx64sm_35-nvidia-cuda /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c 2>&1    | /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck -check-prefix=CHK-SUBTARGET /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
gtimeout 1m     /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/clang  -S -emit-llvm -O0 -fopenmp -target powerpc64-linux -omptargets=powerpc64-ibm-linux-gnu,nvptx64-nvidia-cuda /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c 2>&1
gtimeout 1m    /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck -check-prefix=CHK-CODEGEN-HOST -input-file=target_driver_and_codegen.ll /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
gtimeout 1m    /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck -check-prefix=CHK-CODEGEN-TARGET1 -input-file=target_driver_and_codegen.tgt-nvptx64-nvidia-cuda.ll /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
gtimeout 1m    /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck -check-prefix=CHK-CODEGEN-TARGET2 -input-file=target_driver_and_codegen.tgt-powerpc64-ibm-linux-gnu.ll /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
--
Exit Code: 1

Command Output (stderr):
--
/sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c:54:18: error: expected string not found in input
// CHK-COMMANDS: ld" {{.*}} "-o" "a.out" {{.*}} "[[HOSTOBJ]].o" "-liomp5" "-lomptarget" {{.*}} "-T" "[[LKSCRIPT:.+]].lk"
                 ^
<stdin>:13:255: note: scanning from here
 "/usr/bin/ld" "--eh-frame-hdr" "-m" "elf64ppc" "-shared" "-o" "/var/tmp/target_driver_and_codegen-b9f35e.so" "crti.o" "crtbeginS.o" "-L/sw/src/fink.build/llvm35-3.5.0-0/build/stage3/bin/../lib" "-L/usr/lib" "/var/tmp/target_driver_and_codegen-109979.o" "-L/sw/opt/llvm-3.5/lib" "-liomp5" "-lomptarget" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lpthread" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "crtendS.o" "crtn.o"

                                                                                                   ^
<stdin>:13:255: note: with variable "HOSTOBJ" equal to "/var/tmp/target_driver_and_codegen-489c39"
 "/usr/bin/ld" "--eh-frame-hdr" "-m" "elf64ppc" "-shared" "-o" "/var/tmp/target_driver_and_codegen-b9f35e.so" "crti.o" "crtbeginS.o" "-L/sw/src/fink.build/llvm35-3.5.0-0/build/stage3/bin/../lib" "-L/usr/lib" "/var/tmp/target_driver_and_codegen-109979.o" "-L/sw/opt/llvm-3.5/lib" "-liomp5" "-lomptarget" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lpthread" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "crtendS.o" "crtn.o"

                                                                                                   ^
<stdin>:14:249: note: possible intended match here
 "/usr/bin/ld" "--eh-frame-hdr" "-m" "elf64ppc" "-dynamic-linker" "/lib64/ld64.so.1" "-o" "a.out" "/usr/lib/crt1.o" "crti.o" "crtbegin.o" "-L/sw/src/fink.build/llvm35-3.5.0-0/build/stage3/bin/../lib" "-L/usr/lib" "/var/tmp/target_driver_and_codegen-489c39.o" "-L/sw/opt/llvm-3.5/lib" "-liomp5" "-lomptarget" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lpthread" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "crtend.o" "crtn.o" "-T" "/var/tmp/a-93ab58.lk"

                                                                                             ^

--

********************

Any ideas on how to suppress this on x86_64-apple-darwin?

@sfantao
Copy link

sfantao commented Nov 16, 2014

Hi,

Thanks for reporting the issue.

I believe that you are getting a different order in the generated target
offloading globals. I'll try to run this on the same machine you are using
as the issue seems to not occur in the x86_64 server I have access to. I'll
try to commit a patch to fix this ASAP.

Thanks again,
Samuel

From: howarthjw notifications@github.com
To: clang-omp/clang clang@noreply.github.com
Date: 11/16/2014 11:27 AM
Subject: [clang] TEST 'Clang :: OpenMP/target_driver_and_codegen.c'
FAILED (#49)

On x86_64-apple-darwin, clang-omp currently shows an apparent bogus test
suite failure of...

FAIL: Clang :: OpenMP/target_driver_and_codegen.c (3899 of 7661)
******************** TEST 'Clang :: OpenMP/target_driver_and_codegen.c'
FAILED ********************

Script:

gtimeout 1m /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/clang -###
-fopenmp
-omptargets=aaa-bbb-ccc-ddd /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
2>&1 | /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck
-check-prefix=CHK-INVALID-TARGET /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c

gtimeout 1m /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/clang -###
-fopenmp
-omptargets= /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
2>&1 | /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck
-check-prefix=CHK-EMPTY-OMPTARGETS /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c

gtimeout 1m /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/clang -###
-fopenmp
-omptargets=x86_64-apple-darwin /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
2>&1 | /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck
-check-prefix=CHK-NO-SUPPORT /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c

gtimeout 1m /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/clang -###
-fopenmp -target powerpc64-linux
-omptargets=powerpc64-ibm-linux-gnu,nvptx64-nvidia-cuda /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
2>&1 | /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck
-check-prefix=CHK-COMMANDS /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c

gtimeout 1m not /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/clang
-cc1
-internal-isystem /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/bin/../lib/clang/3.5.0/include
"-fopenmp" "-omptargets=powerpc64-ibm-linux-gnu,nvptx64-nvidia-cuda"
"-triple"
"powerpc64-ibm-linux-gnu" /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
2>&1 | /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck
-check-prefix=CHK-MAINFILE /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c

gtimeout 1m not /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/clang
-cc1
-internal-isystem /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/bin/../lib/clang/3.5.0/include
"-fopenmp" "-omptargets=powerpc64-ibm-linux-gnu,nvptx64-nvidia-cuda"
"-omp-target-mode" "-triple"
"nvptx64-nvidia-cuda" /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
2>&1 | /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck
-check-prefix=CHK-MAINFILE /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c

gtimeout 1m not /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/clang
-cc1
-internal-isystem /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/bin/../lib/clang/3.5.0/include
"-fopenmp" "-omptargets=powerpc64-ibm-linux-gnu,nvptx64-nvidia-cuda"
"-triple" "powerpc64-ibm-linux-gnu" "-omp-main-file-path"
"abcd.efgh" /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
2>&1 | /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck
-check-prefix=CHK-MODULEID /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c

gtimeout 1m not /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/clang
-cc1
-internal-isystem /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/bin/../lib/clang/3.5.0/include
"-fopenmp" "-omptargets=powerpc64-ibm-linux-gnu,nvptx64-nvidia-cuda"
"-omp-target-mode" "-triple"
"nvptx64-nvidia-cuda" /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
"-omp-main-file-path" "abcd.efgh" 2>&1
| /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck
-check-prefix=CHK-MODULEID /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c

gtimeout 1m /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/clang -###
-fopenmp -target powerpc64-linux
-omptargets=nvptx64sm_35-nvidia-cuda /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
2>&1 | /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck
-check-prefix=CHK-SUBTARGET /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c

gtimeout 1m /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/clang -S
-emit-llvm -O0 -fopenmp -target powerpc64-linux
-omptargets=powerpc64-ibm-linux-gnu,nvptx64-nvidia-cuda /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
2>&1
gtimeout 1m /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck
-check-prefix=CHK-CODEGEN-HOST
-input-file=target_driver_and_codegen.ll /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c

gtimeout 1m /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck
-check-prefix=CHK-CODEGEN-TARGET1
-input-file=target_driver_and_codegen.tgt-nvptx64-nvidia-cuda.ll /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c

gtimeout 1m /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck
-check-prefix=CHK-CODEGEN-TARGET2
-input-file=target_driver_and_codegen.tgt-powerpc64-ibm-linux-gnu.ll /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c

Exit Code: 1

Command Output (stderr):

/sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c:54:18:
error: expected string not found in input
// CHK-COMMANDS: ld" {{.}} "-o" "a.out" {{.}} "[[HOSTOBJ]].o" "-liomp5"
"-lomptarget" {{.*}} "-T" "[[LKSCRIPT:.+]].lk"
^
:13:255: note: scanning from here
"/usr/bin/ld" "--eh-frame-hdr" "-m" "elf64ppc" "-shared" "-o"
"/var/tmp/target_driver_and_codegen-b9f35e.so" "crti.o" "crtbeginS.o"
"-L/sw/src/fink.build/llvm35-3.5.0-0/build/stage3/bin/../lib" "-L/usr/lib"
"/var/tmp/target_driver_and_codegen-109979.o" "-L/sw/opt/llvm-3.5/lib"
"-liomp5" "-lomptarget" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
"-lpthread" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
"crtendS.o" "crtn.o"

^

:13:255: note: with variable "HOSTOBJ" equal to
"/var/tmp/target_driver_and_codegen-489c39"
"/usr/bin/ld" "--eh-frame-hdr" "-m" "elf64ppc" "-shared" "-o"
"/var/tmp/target_driver_and_codegen-b9f35e.so" "crti.o" "crtbeginS.o"
"-L/sw/src/fink.build/llvm35-3.5.0-0/build/stage3/bin/../lib" "-L/usr/lib"
"/var/tmp/target_driver_and_codegen-109979.o" "-L/sw/opt/llvm-3.5/lib"
"-liomp5" "-lomptarget" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
"-lpthread" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
"crtendS.o" "crtn.o"

^

:14:249: note: possible intended match here
"/usr/bin/ld" "--eh-frame-hdr" "-m" "elf64ppc" "-dynamic-linker"
"/lib64/ld64.so.1" "-o" "a.out" "/usr/lib/crt1.o" "crti.o" "crtbegin.o"
"-L/sw/src/fink.build/llvm35-3.5.0-0/build/stage3/bin/../lib" "-L/usr/lib"
"/var/tmp/target_driver_and_codegen-489c39.o" "-L/sw/opt/llvm-3.5/lib"
"-liomp5" "-lomptarget" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
"-lpthread" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
"crtend.o" "crtn.o" "-T" "/var/tmp/a-93ab58.lk"

^

Any ideas on how to suppress this on x86_64-apple-darwin?


Reply to this email directly or view it on GitHub.

@howarthjw
Copy link
Author

I should clarify that the following patch is applied to the clang-omp sources to allow the compiler to find the location of the installed libiomp5.dylib...

--- cfe-3.5.0.src/lib/Driver/Tools.cpp.orig     2014-10-24 19:10:30.000000000 -0400
+++ cfe-3.5.0.src/lib/Driver/Tools.cpp  2014-10-24 19:16:13.000000000 -0400
@@ -5924,6 +5924,8 @@

   if (Args.hasArg(options::OPT_fopenmp)){
     // This is more complicated in gcc...
+    // Help clang find libiomp5.dylib
+    CmdArgs.push_back("-L/sw/opt/llvm-3.5/lib");
     CmdArgs.push_back("-liomp5");

     if (Args.hasArg(options::OPT_omptargets_EQ))
@@ -7670,6 +7672,8 @@

       bool OpenMP = Args.hasArg(options::OPT_fopenmp);
       if (OpenMP) {
+       // Help clang find libiomp5.dylib
+       CmdArgs.push_back("-L/sw/opt/llvm-3.5/lib");
         CmdArgs.push_back("-liomp5");
         if (Args.hasArg(options::OPT_omptargets_EQ))
           CmdArgs.push_back("-lomptarget");

I have tried changing the line...

// CHK-COMMANDS: ld" {{.*}} "-o" "a.out"  {{.*}}  "[[HOSTOBJ]].o" "-liomp5" "-lomptarget" {{.*}} "-T" "[[LKSCRIPT:.+]].lk"

to

// CHK-COMMANDS: ld" {{.*}} "-o" "a.out"  {{.*}}  "[[HOSTOBJ]].o" "-L/sw/opt/llvm-3.5/lib" "-liomp5" "-lomptarget" {{.*}} "-T" "[[LKSCRIPT:.+]].lk"

to account for the additional argument on the linkage output, but this seems to have no impact on the failure so I suspect it is unrelated to that change.

@sfantao
Copy link

sfantao commented Nov 18, 2014

Hi,

Unfortunately, I was unable to replicate the problem in my environment. Can
you check if the patch attached helps solving the problem for you?

Thanks!
Samuel

(See attached file: omptgt_fix.patch)

howarthjw notifications@github.com wrote on 11/16/2014 11:27:33 AM:

From: howarthjw notifications@github.com
To: clang-omp/clang clang@noreply.github.com
Date: 11/16/2014 11:27 AM
Subject: [clang] TEST 'Clang :: OpenMP/target_driver_and_codegen.c'
FAILED (#49)

On x86_64-apple-darwin, clang-omp currently shows an apparent bogus
test suite failure of...
FAIL: Clang :: OpenMP/target_driver_and_codegen.c (3899 of 7661)
******************* TEST 'Clang :: OpenMP/
target_driver_and_codegen.c' FAILED ********************
Script:
gtimeout 1m /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/
clang -### -fopenmp -omptargets=aaa-bbb-ccc-ddd /sw/src/fink.build/
llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
2>&1 | /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/
FileCheck -check-prefix=CHK-INVALID-TARGET /sw/src/fink.build/
llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
gtimeout 1m /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/
clang -### -fopenmp -omptargets= /sw/src/fink.build/llvm35-3.5.0-0/
cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c 2>&1 | /sw/
src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck -check-
prefix=CHK-EMPTY-OMPTARGETS /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.
5.0.src/test/OpenMP/target_driver_and_codegen.c
gtimeout 1m /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/
clang -### -fopenmp -omptargets=x86_64-apple-darwin /sw/src/
fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/
target_driver_and_codegen.c 2>&1 | /sw/src/fink.build/llvm35-3.5.
0-0/build/stage3/./bin/FileCheck -check-prefix=CHK-NO-SUPPORT /sw/
src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/
target_driver_and_codegen.c
gtimeout 1m /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/
clang -### -fopenmp -target powerpc64-linux -omptargets=powerpc64-
ibm-linux-gnu,nvptx64-nvidia-cuda /sw/src/fink.build/llvm35-3.5.0-0/
cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c 2>&1 | /sw/
src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck -check-
prefix=CHK-COMMANDS /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/
test/OpenMP/target_driver_and_codegen.c
gtimeout 1m not /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./
bin/clang -cc1 -internal-isystem /sw/src/fink.build/llvm35-3.5.0-0/
build/stage3/bin/../lib/clang/3.5.0/include "-fopenmp" "-
omptargets=powerpc64-ibm-linux-gnu,nvptx64-nvidia-cuda" "-triple"
"powerpc64-ibm-linux-gnu" /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.
0.src/test/OpenMP/target_driver_and_codegen.c 2>&1 | /sw/src/
fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck -check-
prefix=CHK-MAINFILE /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/
test/OpenMP/target_driver_and_codegen.c
gtimeout 1m not /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./
bin/clang -cc1 -internal-isystem /sw/src/fink.build/llvm35-3.5.0-0/
build/stage3/bin/../lib/clang/3.5.0/include "-fopenmp" "-
omptargets=powerpc64-ibm-linux-gnu,nvptx64-nvidia-cuda" "-omp-
target-mode" "-triple" "nvptx64-nvidia-cuda" /sw/src/fink.build/
llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
2>&1 | /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/
FileCheck -check-prefix=CHK-MAINFILE /sw/src/fink.build/llvm35-3.5.
0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
gtimeout 1m not /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./
bin/clang -cc1 -internal-isystem /sw/src/fink.build/llvm35-3.5.0-0/
build/stage3/bin/../lib/clang/3.5.0/include "-fopenmp" "-
omptargets=powerpc64-ibm-linux-gnu,nvptx64-nvidia-cuda" "-triple"
"powerpc64-ibm-linux-gnu" "-omp-main-file-path" "abcd.efgh" /sw/src/
fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/
target_driver_and_codegen.c 2>&1 | /sw/src/fink.build/llvm35-3.5.
0-0/build/stage3/./bin/FileCheck -check-prefix=CHK-MODULEID /sw/src/
fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/
target_driver_and_codegen.c
gtimeout 1m not /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./
bin/clang -cc1 -internal-isystem /sw/src/fink.build/llvm35-3.5.0-0/
build/stage3/bin/../lib/clang/3.5.0/include "-fopenmp" "-
omptargets=powerpc64-ibm-linux-gnu,nvptx64-nvidia-cuda" "-omp-
target-mode" "-triple" "nvptx64-nvidia-cuda" /sw/src/fink.build/
llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
"-omp-main-file-path" "abcd.efgh" 2>&1 | /sw/src/fink.build/
llvm35-3.5.0-0/build/stage3/./bin/FileCheck -check-prefix=CHK-
MODULEID /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/
OpenMP/target_driver_and_codegen.c
gtimeout 1m /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/
clang -### -fopenmp -target powerpc64-linux -
omptargets=nvptx64sm_35-nvidia-cuda /sw/src/fink.build/llvm35-3.5.
0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c 2>&1 | /
sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck -
check-prefix=CHK-SUBTARGET /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.
5.0.src/test/OpenMP/target_driver_and_codegen.c
gtimeout 1m /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/
clang -S -emit-llvm -O0 -fopenmp -target powerpc64-linux -
omptargets=powerpc64-ibm-linux-gnu,nvptx64-nvidia-cuda /sw/src/
fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/
target_driver_and_codegen.c 2>&1
gtimeout 1m /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/
FileCheck -check-prefix=CHK-CODEGEN-HOST -input-
file=target_driver_and_codegen.ll /sw/src/fink.build/llvm35-3.5.0-0/
cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
gtimeout 1m /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/
FileCheck -check-prefix=CHK-CODEGEN-TARGET1 -input-
file=target_driver_and_codegen.tgt-nvptx64-nvidia-cuda.ll /sw/src/
fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/
target_driver_and_codegen.c
gtimeout 1m /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/
FileCheck -check-prefix=CHK-CODEGEN-TARGET2 -input-
file=target_driver_and_codegen.tgt-powerpc64-ibm-linux-gnu.ll /sw/
src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/
target_driver_and_codegen.c
Exit Code: 1
Command Output (stderr):
/sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/
target_driver_and_codegen.c:54:18: error: expected string not found in
input
// CHK-COMMANDS: ld" {{.}} "-o" "a.out" {{.}} "[[HOSTOBJ]].o" "-
liomp5" "-lomptarget" {{.
}} "-T" "[[LKSCRIPT:.+]].lk"
^
:13:255: note: scanning from here
"/usr/bin/ld" "--eh-frame-hdr" "-m" "elf64ppc" "-shared" "-o" "/var/
tmp/target_driver_and_codegen-b9f35e.so" "crti.o" "crtbeginS.o" "-L/
sw/src/fink.build/llvm35-3.5.0-0/build/stage3/bin/../lib" "-L/usr/
lib" "/var/tmp/target_driver_and_codegen-109979.o" "-L/sw/opt/
llvm-3.5/lib" "-liomp5" "-lomptarget" "-lgcc" "--as-needed" "-
lgcc_s" "--no-as-needed" "-lpthread" "-lc" "-lgcc" "--as-needed" "-
lgcc_s" "--no-as-needed" "crtendS.o" "crtn.o"

^

:13:255: note: with variable "HOSTOBJ" equal to "/var/tmp/
target_driver_and_codegen-489c39"
"/usr/bin/ld" "--eh-frame-hdr" "-m" "elf64ppc" "-shared" "-o" "/var/
tmp/target_driver_and_codegen-b9f35e.so" "crti.o" "crtbeginS.o" "-L/
sw/src/fink.build/llvm35-3.5.0-0/build/stage3/bin/../lib" "-L/usr/
lib" "/var/tmp/target_driver_and_codegen-109979.o" "-L/sw/opt/
llvm-3.5/lib" "-liomp5" "-lomptarget" "-lgcc" "--as-needed" "-
lgcc_s" "--no-as-needed" "-lpthread" "-lc" "-lgcc" "--as-needed" "-
lgcc_s" "--no-as-needed" "crtendS.o" "crtn.o"

^

:14:249: note: possible intended match here
"/usr/bin/ld" "--eh-frame-hdr" "-m" "elf64ppc" "-dynamic-linker" "/
lib64/ld64.so.1" "-o" "a.out" "/usr/lib/crt1.o" "crti.o"
"crtbegin.o" "-L/sw/src/fink.build/llvm35-3.5.0-0/build/stage3/
bin/../lib" "-L/usr/lib" "/var/tmp/
target_driver_and_codegen-489c39.o" "-L/sw/opt/llvm-3.5/lib" "-
liomp5" "-lomptarget" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-
needed" "-lpthread" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-
needed" "crtend.o" "crtn.o" "-T" "/var/tmp/a-93ab58.lk"

^

Any ideas on how to suppress this on x86_64-apple-darwin?

Reply to this email directly or view it on GitHub.[image removed]

@howarthjw
Copy link
Author

Samuel,
There doesn't appear to be an attachment for omptgt_fix.patch in
your email or on the GitHub site.
Jack

On Tue, Nov 18, 2014 at 1:39 PM, Samuel F Antao notifications@github.com
wrote:

Hi,

Unfortunately, I was unable to replicate the problem in my environment.
Can
you check if the patch attached helps solving the problem for you?

Thanks!
Samuel

(See attached file: omptgt_fix.patch)

howarthjw notifications@github.com wrote on 11/16/2014 11:27:33 AM:

From: howarthjw notifications@github.com
To: clang-omp/clang clang@noreply.github.com
Date: 11/16/2014 11:27 AM
Subject: [clang] TEST 'Clang :: OpenMP/target_driver_and_codegen.c'
FAILED (#49)

On x86_64-apple-darwin, clang-omp currently shows an apparent bogus
test suite failure of...
FAIL: Clang :: OpenMP/target_driver_and_codegen.c (3899 of 7661)
******************* TEST 'Clang :: OpenMP/
target_driver_and_codegen.c' FAILED ********************
Script:
gtimeout 1m /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/
clang -### -fopenmp -omptargets=aaa-bbb-ccc-ddd /sw/src/fink.build/
llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
2>&1 | /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/
FileCheck -check-prefix=CHK-INVALID-TARGET /sw/src/fink.build/
llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
gtimeout 1m /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/
clang -### -fopenmp -omptargets= /sw/src/fink.build/llvm35-3.5.0-0/
cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c 2>&1 | /sw/
src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck -check-
prefix=CHK-EMPTY-OMPTARGETS /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.
5.0.src/test/OpenMP/target_driver_and_codegen.c
gtimeout 1m /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/
clang -### -fopenmp -omptargets=x86_64-apple-darwin /sw/src/
fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/
target_driver_and_codegen.c 2>&1 | /sw/src/fink.build/llvm35-3.5.
0-0/build/stage3/./bin/FileCheck -check-prefix=CHK-NO-SUPPORT /sw/
src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/
target_driver_and_codegen.c
gtimeout 1m /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/
clang -### -fopenmp -target powerpc64-linux -omptargets=powerpc64-
ibm-linux-gnu,nvptx64-nvidia-cuda /sw/src/fink.build/llvm35-3.5.0-0/
cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c 2>&1 | /sw/
src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck -check-
prefix=CHK-COMMANDS /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/
test/OpenMP/target_driver_and_codegen.c
gtimeout 1m not /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./
bin/clang -cc1 -internal-isystem /sw/src/fink.build/llvm35-3.5.0-0/
build/stage3/bin/../lib/clang/3.5.0/include "-fopenmp" "-
omptargets=powerpc64-ibm-linux-gnu,nvptx64-nvidia-cuda" "-triple"
"powerpc64-ibm-linux-gnu" /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.
0.src/test/OpenMP/target_driver_and_codegen.c 2>&1 | /sw/src/
fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck -check-
prefix=CHK-MAINFILE /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/
test/OpenMP/target_driver_and_codegen.c
gtimeout 1m not /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./
bin/clang -cc1 -internal-isystem /sw/src/fink.build/llvm35-3.5.0-0/
build/stage3/bin/../lib/clang/3.5.0/include "-fopenmp" "-
omptargets=powerpc64-ibm-linux-gnu,nvptx64-nvidia-cuda" "-omp-
target-mode" "-triple" "nvptx64-nvidia-cuda" /sw/src/fink.build/
llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
2>&1 | /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/
FileCheck -check-prefix=CHK-MAINFILE /sw/src/fink.build/llvm35-3.5.
0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
gtimeout 1m not /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./
bin/clang -cc1 -internal-isystem /sw/src/fink.build/llvm35-3.5.0-0/
build/stage3/bin/../lib/clang/3.5.0/include "-fopenmp" "-
omptargets=powerpc64-ibm-linux-gnu,nvptx64-nvidia-cuda" "-triple"
"powerpc64-ibm-linux-gnu" "-omp-main-file-path" "abcd.efgh" /sw/src/
fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/
target_driver_and_codegen.c 2>&1 | /sw/src/fink.build/llvm35-3.5.
0-0/build/stage3/./bin/FileCheck -check-prefix=CHK-MODULEID /sw/src/
fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/
target_driver_and_codegen.c
gtimeout 1m not /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./
bin/clang -cc1 -internal-isystem /sw/src/fink.build/llvm35-3.5.0-0/
build/stage3/bin/../lib/clang/3.5.0/include "-fopenmp" "-
omptargets=powerpc64-ibm-linux-gnu,nvptx64-nvidia-cuda" "-omp-
target-mode" "-triple" "nvptx64-nvidia-cuda" /sw/src/fink.build/
llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
"-omp-main-file-path" "abcd.efgh" 2>&1 | /sw/src/fink.build/
llvm35-3.5.0-0/build/stage3/./bin/FileCheck -check-prefix=CHK-
MODULEID /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/
OpenMP/target_driver_and_codegen.c
gtimeout 1m /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/
clang -### -fopenmp -target powerpc64-linux -
omptargets=nvptx64sm_35-nvidia-cuda /sw/src/fink.build/llvm35-3.5.
0-0/cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c 2>&1 | /
sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/FileCheck -
check-prefix=CHK-SUBTARGET /sw/src/fink.build/llvm35-3.5.0-0/cfe-3.
5.0.src/test/OpenMP/target_driver_and_codegen.c
gtimeout 1m /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/
clang -S -emit-llvm -O0 -fopenmp -target powerpc64-linux -
omptargets=powerpc64-ibm-linux-gnu,nvptx64-nvidia-cuda /sw/src/
fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/
target_driver_and_codegen.c 2>&1
gtimeout 1m /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/
FileCheck -check-prefix=CHK-CODEGEN-HOST -input-
file=target_driver_and_codegen.ll /sw/src/fink.build/llvm35-3.5.0-0/
cfe-3.5.0.src/test/OpenMP/target_driver_and_codegen.c
gtimeout 1m /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/
FileCheck -check-prefix=CHK-CODEGEN-TARGET1 -input-
file=target_driver_and_codegen.tgt-nvptx64-nvidia-cuda.ll /sw/src/
fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/
target_driver_and_codegen.c
gtimeout 1m /sw/src/fink.build/llvm35-3.5.0-0/build/stage3/./bin/
FileCheck -check-prefix=CHK-CODEGEN-TARGET2 -input-
file=target_driver_and_codegen.tgt-powerpc64-ibm-linux-gnu.ll /sw/
src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/
target_driver_and_codegen.c
Exit Code: 1
Command Output (stderr):
/sw/src/fink.build/llvm35-3.5.0-0/cfe-3.5.0.src/test/OpenMP/
target_driver_and_codegen.c:54:18: error: expected string not found in
input
// CHK-COMMANDS: ld" {{.}} "-o" "a.out" {{.}} "[[HOSTOBJ]].o" "-
liomp5" "-lomptarget" {{.
}} "-T" "[[LKSCRIPT:.+]].lk"
^
:13:255: note: scanning from here
"/usr/bin/ld" "--eh-frame-hdr" "-m" "elf64ppc" "-shared" "-o" "/var/
tmp/target_driver_and_codegen-b9f35e.so" "crti.o" "crtbeginS.o" "-L/
sw/src/fink.build/llvm35-3.5.0-0/build/stage3/bin/../lib" "-L/usr/
lib" "/var/tmp/target_driver_and_codegen-109979.o" "-L/sw/opt/
llvm-3.5/lib" "-liomp5" "-lomptarget" "-lgcc" "--as-needed" "-
lgcc_s" "--no-as-needed" "-lpthread" "-lc" "-lgcc" "--as-needed" "-
lgcc_s" "--no-as-needed" "crtendS.o" "crtn.o"

^

:13:255: note: with variable "HOSTOBJ" equal to "/var/tmp/
target_driver_and_codegen-489c39"
"/usr/bin/ld" "--eh-frame-hdr" "-m" "elf64ppc" "-shared" "-o" "/var/
tmp/target_driver_and_codegen-b9f35e.so" "crti.o" "crtbeginS.o" "-L/
sw/src/fink.build/llvm35-3.5.0-0/build/stage3/bin/../lib" "-L/usr/
lib" "/var/tmp/target_driver_and_codegen-109979.o" "-L/sw/opt/
llvm-3.5/lib" "-liomp5" "-lomptarget" "-lgcc" "--as-needed" "-
lgcc_s" "--no-as-needed" "-lpthread" "-lc" "-lgcc" "--as-needed" "-
lgcc_s" "--no-as-needed" "crtendS.o" "crtn.o"

^

:14:249: note: possible intended match here
"/usr/bin/ld" "--eh-frame-hdr" "-m" "elf64ppc" "-dynamic-linker" "/
lib64/ld64.so.1" "-o" "a.out" "/usr/lib/crt1.o" "crti.o"
"crtbegin.o" "-L/sw/src/fink.build/llvm35-3.5.0-0/build/stage3/
bin/../lib" "-L/usr/lib" "/var/tmp/
target_driver_and_codegen-489c39.o" "-L/sw/opt/llvm-3.5/lib" "-
liomp5" "-lomptarget" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-
needed" "-lpthread" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-
needed" "crtend.o" "crtn.o" "-T" "/var/tmp/a-93ab58.lk"

^

Any ideas on how to suppress this on x86_64-apple-darwin?

Reply to this email directly or view it on GitHub.[image removed]


Reply to this email directly or view it on GitHub
#49 (comment).

@sfantao
Copy link

sfantao commented Nov 18, 2014

Hum, apparently the attachment was removed from the email... Sorry about that. I'm pasting the patch below.

Thanks again,
Samuel

###########################################################################
diff --git a/test/OpenMP/target_driver_and_codegen.c b/test/OpenMP/target_driver_and_codegen.c
index 5cf6653..de03470 100644
--- a/test/OpenMP/target_driver_and_codegen.c
+++ b/test/OpenMP/target_driver_and_codegen.c
@@ -48,10 +48,10 @@
// CHK-COMMANDS: "-target-cpu" "ppc64"
// CHK-COMMANDS: "-o" "[[T2ASM:.+]].s" "-x" "cpp-output" "[[PP]].i"
// CHK-COMMANDS: as" "-a64" "-mppc64" "-many" "-o" "[[T2OBJ:.+]].o" "[[T2ASM]].s"
-// CHK-COMMANDS: ld" "--eh-frame-hdr" "-m" "elf64ppc" "-shared" "-o" "[[T2LIB:.+]].so" {{.}} "[[T2OBJ]].o"
+// CHK-COMMANDS: ld" {{.
}}"--eh-frame-hdr" "-m" "elf64ppc" "-shared" "-o" "[[T2LIB:.+]].so" {{.*}}"[[T2OBJ]].o"

// Final linking command
-// CHK-COMMANDS: ld" {{.}} "-o" "a.out" {{.}} "[[HOSTOBJ]].o" "-liomp5" "-lomptarget" {{.}} "-T" "[[LKSCRIPT:.+]].lk"
+// CHK-COMMANDS: ld" {{.
}}"-o" "a.out" {{.}}"[[HOSTOBJ]].o" {{.}}"-liomp5" "-lomptarget" {{.*}} "-T" "[[LKSCRIPT:.+]].lk"

/// Check frontend require main file name
// RUN: not %clang_cc1 "-fopenmp" "-omptargets=powerpc64-ibm-linux-gnu,nvptx64-nvidia-cuda" "-triple" "powerpc64-ibm-linux-gnu" %s 2>&1
@@ -82,13 +82,14 @@
// RUN: FileCheck -check-prefix=CHK-CODEGEN-TARGET2 -input-file=target_driver_and_codegen.tgt-powerpc64-ibm-linux-gnu.ll %s

-// CHK-CODEGEN-HOST: @_omptgt__img_start[[T1:.]] = external constant i8
-// CHK-CODEGEN-HOST: @_omptgt__img_end[[T1]] = external constant i8
-// CHK-CODEGEN-HOST: @_omptgt__img_start[[T2:.
]] = external constant i8
-// CHK-CODEGEN-HOST: @_omptgt__img_end[[T2]] = external constant i8
+// CHK-CODEGEN-HOST-DAG: @__omptgt__img_end_powerpc64_ibm_linux_gnu = external constant i8
+// CHK-CODEGEN-HOST-DAG: @__omptgt__img_start_powerpc64_ibm_linux_gnu = external constant i8
+// CHK-CODEGEN-HOST-DAG: @__omptgt__img_end_nvptx64_nvidia_cuda = external constant i8
+// CHK-CODEGEN-HOST-DAG: @omptgt__img_start_nvptx64_nvidia_cuda = external constant i8
// CHK-CODEGEN-HOST: @omptgt__device_images = internal constant [2 x { i8, i8 }] [
-// CHK-CODEGEN-HOST: { i8
, i8
} { i8* @omptgt__img_start[[T1]], i8* @omptgt__img_end[[T1]] },
-// CHK-CODEGEN-HOST: { i8
, i8
} { i8* @omptgt__img_start[[T2]], i8* @omptgt__img_end[[T2]] }]
+// CHK-CODEGEN-HOST-DAG: { i8
, i8
} { i8* @__omptgt__img_start_powerpc64_ibm_linux_gnu, i8* @omptgt__img_end_powerpc64_ibm_linux_gnu },
+// CHK-CODEGEN-HOST-DAG: { i8
, i8
} { i8* @__omptgt__img_start_nvptx64_nvidia_cuda, i8* @__omptgt__img_end_nvptx64_nvidia_cuda }]
+
// CHK-CODEGEN-HOST: @_omptgt__host_entries_begin = external constant { i8, i32 }
// CHK-CODEGEN-HOST: @_omptgt__host_entries_end = external constant { i8, i32 }
// CHK-CODEGEN-HOST: @omptgt__target_regions_descriptor =
@@ -107,7 +108,6 @@
// CHK-CODEGEN-HOST: constant { i8
, i32 } { i8
getelementptr inbounds ([{{[1-9][0-9]}} x i8] @__omptgt__host_ptr_0, i32 0, i32 0), i32 0 },
// CHK-CODEGEN-HOST: section ".openmptgt_host_entries"

/// Argument sizes (int32)
// CHK-CODEGEN-HOST: [[S2:@.tgt_sizes[0-9]*]] = private constant [1 x i32] [i32 4]
/// Map types (to-from)

###########################################################################

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants