- give precedence to ~openmp (-no-openmp) over +openmp (-openmp) in the general rules and in the Makefile. This makes it robuster when specifying +openmp in general, but ~openmp for specific build components. - disable openmp for OSspecific and Pstream components. Neither should contain any openmp code anyhow. Additionally, since OSspecific is generally built as a static object, it can become problematic (eg, with AMD ROCm) if the compiler generates information that openmp is required but then uses static linkage.
26 lines
820 B
Bash
Executable File
26 lines
820 B
Bash
Executable File
#!/bin/sh
|
|
cd "${0%/*}" || exit # Run from this directory
|
|
targetType=libo # Preferred library type
|
|
. ${WM_PROJECT_DIR:?}/wmake/scripts/AllwmakeParseArguments $*
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
if [ -f /usr/include/FlexLexer.h ] && [ ! -f FlexLexer.h ]
|
|
then
|
|
echo "Adding FlexLexer.h link to ${PWD##*/} for cross-compilation"
|
|
ln -sf /usr/include/FlexLexer.h FlexLexer.h
|
|
|
|
if [ -d lnInclude ]
|
|
then
|
|
(cd lnInclude && ln -sf ../FlexLexer.h .)
|
|
fi
|
|
fi
|
|
|
|
unset COMP_FLAGS LINK_FLAGS
|
|
|
|
# Make object (non-shared by default)
|
|
# Never want/need openmp, especially for static objects
|
|
wmake -no-openmp $targetType
|
|
|
|
#------------------------------------------------------------------------------
|