1 1.22 mrg # $NetBSD: Makefile,v 1.22 2019/02/03 12:11:11 mrg Exp $ 2 1.1 mrg 3 1.1 mrg # build GCC's libgomp, so that -fopenmp works. 4 1.1 mrg 5 1.3 mrg # XXX 6 1.3 mrg NOLINT= # defined 7 1.3 mrg 8 1.1 mrg .include <bsd.own.mk> 9 1.4 mrg 10 1.4 mrg .if !defined(NO_LIBGOMP) # { 11 1.4 mrg 12 1.12 mrg DIST= ${GCCDIST} 13 1.1 mrg 14 1.1 mrg LIB= gomp 15 1.22 mrg # XXX mknative-gcc should pull out libgomp_la_SOURCES 16 1.1 mrg SRCS= \ 17 1.22 mrg alloc.c atomic.c barrier.c critical.c env.c error.c \ 18 1.22 mrg icv.c icv-device.c iter.c iter_ull.c loop.c loop_ull.c ordered.c \ 19 1.22 mrg parallel.c sections.c single.c task.c team.c work.c lock.c mutex.c \ 20 1.22 mrg proc.c sem.c bar.c ptrlock.c time.c fortran.c affinity.c target.c \ 21 1.22 mrg splay-tree.c libgomp-plugin.c oacc-parallel.c oacc-host.c oacc-init.c \ 22 1.22 mrg oacc-mem.c oacc-async.c oacc-plugin.c oacc-cuda.c priority_queue.c 23 1.15 mrg 24 1.1 mrg 25 1.8 matt GOMP_MACHINE_ARCH?= ${MACHINE_ARCH:S/earmv5/earm/} 26 1.3 mrg ARCHDIR= ${.CURDIR}/arch/${GOMP_MACHINE_ARCH} 27 1.2 mrg 28 1.1 mrg CPPFLAGS+= \ 29 1.1 mrg -DHAVE_CONFIG_H \ 30 1.1 mrg -I${DIST}/libgomp \ 31 1.1 mrg -I${DIST}/libgomp/config/posix \ 32 1.1 mrg -I${DIST}/libgcc \ 33 1.15 mrg -I${DIST}/include \ 34 1.3 mrg -I${ARCHDIR} 35 1.1 mrg CFLAGS+=-pthread 36 1.1 mrg 37 1.6 joerg CWARNFLAGS.clang+= -Wno-conversion 38 1.6 joerg 39 1.22 mrg SHLIB_MAJOR= 2 40 1.22 mrg SHLIB_MINOR= 0 41 1.1 mrg 42 1.1 mrg LDFLAGS+= -Wl,--version-script,${DIST}/libgomp/libgomp.map 43 1.1 mrg 44 1.9 matt .if ${GOMP_MACHINE_ARCH} == ${MACHINE_ARCH:S/earmv5/earm/} 45 1.3 mrg # This is where GCC looks for it. 46 1.3 mrg FILES= libgomp.spec 47 1.3 mrg FILESDIR= ${LIBDIR} 48 1.4 mrg 49 1.15 mrg INCS= omp.h openacc.h 50 1.20 mrg INCSDIR= ${GCC_INCSDIR} 51 1.3 mrg .endif 52 1.3 mrg 53 1.7 nonaka .else # } else { 54 1.7 nonaka libinstall:: 55 1.4 mrg .endif # } 56 1.4 mrg 57 1.4 mrg .include <bsd.lib.mk> 58 1.5 tron 59 1.16 christos COPTS+= -Wno-stack-protector -Wno-missing-prototypes 60 1.16 christos COPTS.oacc-mem.c+= -Wno-pointer-arith 61 1.13 tron 62 1.22 mrg COPTS.lock.c+= -Wno-error=incompatible-pointer-types 63 1.22 mrg COPTS.target.c+= -Wno-error=pointer-arith 64 1.21 mrg 65 1.21 mrg 66 1.12 mrg .PATH: ${ARCHDIR} ${DIST}/libgomp ${DIST}/libgomp/config/posix 67