2013-12-06 12:04:52 +01:00
|
|
|
# $NetBSD: Makefile,v 1.9 2013/08/23 05:02:46 matt Exp $
|
2012-06-06 15:06:52 +02:00
|
|
|
|
|
|
|
# build GCC's libgomp, so that -fopenmp works.
|
|
|
|
|
|
|
|
# XXX
|
|
|
|
NOLINT= # defined
|
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
|
|
|
.if !defined(NO_LIBGOMP) # {
|
|
|
|
|
|
|
|
DIST= ${NETBSDSRCDIR}/external/gpl3/gcc/dist
|
|
|
|
|
|
|
|
LIB= gomp
|
|
|
|
SRCS= \
|
|
|
|
alloc.c \
|
|
|
|
barrier.c \
|
|
|
|
critical.c \
|
|
|
|
env.c \
|
|
|
|
error.c \
|
|
|
|
iter.c \
|
|
|
|
iter_ull.c \
|
|
|
|
loop.c \
|
|
|
|
loop_ull.c \
|
|
|
|
ordered.c \
|
|
|
|
parallel.c \
|
|
|
|
sections.c \
|
|
|
|
single.c \
|
|
|
|
task.c \
|
|
|
|
team.c \
|
|
|
|
work.c \
|
|
|
|
lock.c \
|
|
|
|
mutex.c \
|
|
|
|
proc.c \
|
|
|
|
sem.c \
|
|
|
|
bar.c \
|
|
|
|
ptrlock.c \
|
|
|
|
time.c \
|
|
|
|
fortran.c \
|
|
|
|
affinity.c
|
|
|
|
|
2013-12-06 12:04:52 +01:00
|
|
|
GOMP_MACHINE_ARCH?= ${MACHINE_ARCH:S/earmv5/earm/}
|
2012-06-06 15:06:52 +02:00
|
|
|
ARCHDIR= ${.CURDIR}/arch/${GOMP_MACHINE_ARCH}
|
|
|
|
|
|
|
|
CPPFLAGS+= \
|
|
|
|
-DHAVE_CONFIG_H \
|
|
|
|
-I${DIST}/libgomp \
|
|
|
|
-I${DIST}/libgomp/config/posix \
|
|
|
|
-I${DIST}/libgcc \
|
|
|
|
-I${ARCHDIR}
|
|
|
|
CFLAGS+=-pthread
|
|
|
|
|
|
|
|
CWARNFLAGS.clang+= -Wno-conversion
|
|
|
|
|
|
|
|
# libgomp.so.1.0 is in GCC 4.5.
|
|
|
|
SHLIB_MAJOR= 1
|
|
|
|
SHLIB_MINOR= 0
|
|
|
|
|
|
|
|
LDFLAGS+= -Wl,--version-script,${DIST}/libgomp/libgomp.map
|
|
|
|
|
|
|
|
.PATH: ${ARCHDIR} ${DIST}/libgomp ${DIST}/libgomp/config/posix
|
|
|
|
|
2013-12-06 12:04:52 +01:00
|
|
|
.if ${GOMP_MACHINE_ARCH} == ${MACHINE_ARCH:S/earmv5/earm/}
|
2012-06-06 15:06:52 +02:00
|
|
|
# This is where GCC looks for it.
|
|
|
|
FILES= libgomp.spec
|
|
|
|
FILESDIR= ${LIBDIR}
|
|
|
|
|
|
|
|
INCS= omp.h
|
|
|
|
INCSDIR= /usr/include/gcc-4.5
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.else # } else {
|
|
|
|
libinstall::
|
|
|
|
.endif # }
|
|
|
|
|
|
|
|
.include <bsd.lib.mk>
|
|
|
|
|
|
|
|
COPTS+= -Wno-stack-protector
|