1 # $NetBSD: Makefile,v 1.30 2026/10/19 22:59:50 mrg Exp $ 2 3 # build GCC's libgomp, so that -fopenmp works. 4 5 # XXX 6 NOLINT= # defined 7 8 UNSUPPORTED_COMPILER.clang= # defined 9 10 .include <bsd.own.mk> 11 12 .if !defined(NO_LIBGOMP) # { 13 14 DIST= ${GCCDIST} 15 16 17 LIB= gomp 18 19 .include "${.CURDIR}/defs.mk" 20 SRCS= ${G_libgomp_la_SOURCES} 21 22 GOMP_MACHINE_ARCH?= ${MACHINE_ARCH:S/earmv5/earm/} 23 ARCHDIR= ${.CURDIR}/arch/${GOMP_MACHINE_ARCH} 24 25 CPPFLAGS+= \ 26 -DHAVE_CONFIG_H \ 27 -I${DIST}/libgomp \ 28 -I${DIST}/libgomp/config/posix \ 29 -I${DIST}/libgcc \ 30 -I${DIST}/include \ 31 -I${ARCHDIR} 32 CFLAGS+=-pthread 33 34 SHLIB_MAJOR= 2 35 SHLIB_MINOR= 3 36 37 LDFLAGS+= -Wl,--version-script,${DIST}/libgomp/libgomp.map 38 39 # This is to avoid installing more than one copy of these files 40 # with src/compat subdirs. For earmv5 and m68ksf, the translation 41 # here is necessary. 42 .if ${GOMP_MACHINE_ARCH} == ${MACHINE_ARCH:S/earmv5/earm/:S/m68ksf/m68k/} 43 # This is where GCC looks for it. 44 FILES= libgomp.spec 45 FILESDIR= ${LIBDIR} 46 47 INCS= ${G_nodist_libsubinclude_HEADERS} 48 INCSDIR= ${GCC_INCSDIR} 49 .endif 50 51 .else # } else { 52 libinstall:: 53 .endif # } 54 55 .include <bsd.lib.mk> 56 57 COPTS+= -Wno-stack-protector -Wno-missing-prototypes 58 COPTS.oacc-mem.c+= -Wno-pointer-arith 59 60 COPTS.lock.c+= -Wno-error=incompatible-pointer-types 61 COPTS.target.c+= -Wno-error=pointer-arith 62 63 .PATH: ${DIST}/libgomp/config/posix 64 .PATH: ${ARCHDIR} ${DIST}/libgomp 65