This is an archive of the discontinued LLVM Phabricator instance.

Fix linking of omp_foreign_thread_team_reuse test on FreeBSD
ClosedPublic

Authored by dim on Aug 2 2016, 1:42 PM.

Details

Summary

On FreeBSD, linking the misc_bugs/omp_foreign_thread_team_reuse.c test
case fails with:

/usr/local/bin/ld: /tmp/omp_foreign_thread_team_reuse-c5e71b.o: undefined reference to symbol 'pthread_create@@FBSD_1.0'

This is because the program is linked without -lpthread. Since the
%libomp-compile-and-run macro does not allow that option to be added to
the compile command line, split it up and add the required -lpthread
between %libomp-compile and %libomp-run.

Diff Detail

Repository
rL LLVM

Event Timeline

dim updated this revision to Diff 66546.Aug 2 2016, 1:42 PM
dim retitled this revision from to Fix linking of omp_foreign_thread_team_reuse test on FreeBSD.
dim updated this object.
dim added reviewers: jlpeyton, hfinkel.
dim added subscribers: openmp-commits, emaste.
Hahnfeld accepted this revision.Aug 7 2016, 11:07 PM
Hahnfeld added a reviewer: Hahnfeld.
Hahnfeld added a subscriber: Hahnfeld.

LGTM

This revision is now accepted and ready to land.Aug 7 2016, 11:07 PM
dim closed this revision.Aug 8 2016, 11:41 AM
This revision was automatically updated to reflect the committed changes.