https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227438

            Bug ID: 227438
           Summary: -fopenmp=libgomp doesn't work
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: toolch...@freebsd.org
          Reporter: jbe...@freebsd.org

libomp has limited platform availability (currently, only i386 and amd64), so
ports/ may prefer to use another library to avoid ugly conditionals. Using GCC
isn't always an option due to conflicts in libgcc_s, libstdc++, broken ASAN and
hard to use with LLD.

Steps to reproduce:

  $ pkg install ca_root_nss gcc7
  $ fetch https://computing.llnl.gov/tutorials/openMP/samples/C/omp_hello.c
  $ cc -fopenmp=libgomp -isystem$(find /usr/local/lib/gcc7 -name omp.h | xargs
dirname) -L/usr/local/lib/gcc7 omp_hello.c

Actual result

  $ ./a.out
  Hello World from thread = 0
  Number of threads = 1

Expected result:

  $ ./a.out
  Hello World from thread = 4
  Hello World from thread = 0
  Number of threads = 8
  Hello World from thread = 2
  Hello World from thread = 1
  Hello World from thread = 6
  Hello World from thread = 5
  Hello World from thread = 7
  Hello World from thread = 3

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"

Reply via email to