mirror of
https://github.com/opnsense/src.git
synced 2026-02-21 08:50:22 -05:00
Also:
Switch FreeBSD to use libgcc_s.so.1.
Use dl_iterate_phdr to locate shared objects' exception frame
info instead of depending on older register_frame_info machinery.
This allows us to avoid depending on libgcc_s.so.1 in binaries
that do not use exception handling directly. As an additional
benefit it breaks circular libc <=> libgcc_s.so.1 dependency too.
Build newly added libgomp.so.1 library, the runtime support
bits for OpenMP.
Build LGPLed libssp library. Our libc provides our own
BSD-licensed SSP callbacks implementation, so this library
is only built to benefit applications that have hadcoded
knowledge of libssp.so and libssp_nonshared.a. When linked
in from command line, these libraries override libc
implementation.
58 lines
1.5 KiB
Makefile
58 lines
1.5 KiB
Makefile
# $FreeBSD$
|
|
|
|
GCCDIR= ${.CURDIR}/../../../contrib/gcc
|
|
GCCLIB= ${.CURDIR}/../../../contrib/gcclibs
|
|
SRCDIR= ${GCCLIB}/libgomp
|
|
|
|
.PATH: ${SRCDIR} ${SRCDIR}/config/posix
|
|
|
|
LIB= gomp
|
|
SHLIB_MAJOR= 1
|
|
|
|
SRCS= alloc.c barrier.c critical.c env.c \
|
|
error.c iter.c loop.c ordered.c parallel.c sections.c \
|
|
single.c team.c work.c lock.c mutex.c proc.c sem.c \
|
|
bar.c time.c fortran.c
|
|
SRCS+= gstdint.h libgomp_f.h omp.h omp_lib.h
|
|
|
|
CFLAGS+= -DHAVE_CONFIG_H
|
|
CFLAGS+= -I${.CURDIR} -I. -I${SRCDIR} -I${SRCDIR}/config/posix
|
|
|
|
VERSION_MAP= ${SRCDIR}/libgomp.map
|
|
|
|
# Target-specific OpenMP configuration
|
|
.if ${MACHINE_ARCH} == arm || ${MACHINE_ARCH} == i386 || \
|
|
${MACHINE_ARCH} == powerpc
|
|
OMP_LOCK_ALIGN = 4
|
|
OMP_LOCK_KIND= 4
|
|
OMP_LOCK_SIZE= 4
|
|
OMP_NEST_LOCK_ALIGN= 4
|
|
OMP_NEST_LOCK_KIND= 8
|
|
OMP_NEST_LOCK_SIZE= 8
|
|
.else
|
|
OMP_LOCK_ALIGN = 8
|
|
OMP_LOCK_KIND= 8
|
|
OMP_LOCK_SIZE= 8
|
|
OMP_NEST_LOCK_ALIGN= 8
|
|
OMP_NEST_LOCK_KIND= 8
|
|
OMP_NEST_LOCK_SIZE= 16
|
|
.endif
|
|
|
|
gstdint.h:
|
|
echo '#include <sys/types.h>' > ${.TARGET}
|
|
echo '#include <stdint.h>' >> ${.TARGET}
|
|
CLEANFILES+= gstdint.h
|
|
|
|
.for HFILE in libgomp_f.h omp.h omp_lib.h
|
|
${HFILE}: ${SRCDIR}/${HFILE}.in
|
|
sed -e 's/@OMP_LOCK_ALIGN@/${OMP_LOCK_ALIGN}/g' \
|
|
-e 's/@OMP_LOCK_KIND@/${OMP_LOCK_KIND}/g' \
|
|
-e 's/@OMP_LOCK_SIZE@/${OMP_LOCK_SIZE}/g' \
|
|
-e 's/@OMP_NEST_LOCK_ALIGN@/${OMP_NEST_LOCK_ALIGN}/g' \
|
|
-e 's/@OMP_NEST_LOCK_KIND@/${OMP_NEST_LOCK_KIND}/g' \
|
|
-e 's/@OMP_NEST_LOCK_SIZE@/${OMP_NEST_LOCK_SIZE}/g' \
|
|
< ${.ALLSRC} > ${.TARGET}
|
|
CLEANFILES+= ${HFILE}
|
|
.endfor
|
|
|
|
.include <bsd.lib.mk>
|