mirror of
https://github.com/nasa/trick.git
synced 2024-12-18 12:56:26 +00:00
Link correct clang libs based on availability. ICG clang lib link flags are determined by trick/configure
This commit is contained in:
parent
ba94c8181d
commit
3b89cbfdb2
6
.github/workflows/test.yml
vendored
6
.github/workflows/test.yml
vendored
@ -19,7 +19,7 @@ jobs:
|
|||||||
- { os: centos, tag: 7, arch: rhel } # EOL June 2024
|
- { os: centos, tag: 7, arch: rhel } # EOL June 2024
|
||||||
- { os: centos, tag: latest, arch: rhel } # 8 as of April 2020
|
- { os: centos, tag: latest, arch: rhel } # 8 as of April 2020
|
||||||
- { os: fedora, tag: latest, arch: rhel } # 31 as of April 2020
|
- { os: fedora, tag: latest, arch: rhel } # 31 as of April 2020
|
||||||
# - { os: fedora, tag: 32, arch: rhel } # feeling confident?
|
# - { os: fedora, tag: 33, arch: rhel } # feeling confident?
|
||||||
# - { os: fedora, tag: rawhide, arch: rhel } # for thrill-seekers only
|
# - { os: fedora, tag: rawhide, arch: rhel } # for thrill-seekers only
|
||||||
|
|
||||||
#-------- Defaults --------------------------
|
#-------- Defaults --------------------------
|
||||||
@ -95,7 +95,11 @@ jobs:
|
|||||||
#-------- Fedora Only Dependencies ----------------
|
#-------- Fedora Only Dependencies ----------------
|
||||||
- cfg: { os: fedora }
|
- cfg: { os: fedora }
|
||||||
pkg_mgr: dnf
|
pkg_mgr: dnf
|
||||||
|
conf_pkg: >
|
||||||
|
dnf install -y 'dnf-command(config-manager)' &&
|
||||||
|
dnf config-manager --enable updates-testing
|
||||||
os_deps: >-
|
os_deps: >-
|
||||||
|
clang-10.0.1
|
||||||
perl-Text-Balanced
|
perl-Text-Balanced
|
||||||
python-devel
|
python-devel
|
||||||
diffutils
|
diffutils
|
||||||
|
@ -441,6 +441,33 @@ AC_PATH_PROG(CLANG, clang, noclang, "$LLVM_BIN_DIR:/bin:/usr/bin:/usr/local/bin:
|
|||||||
AS_IF([test "$ac_cv_path_CLANG" = "noclang"],AC_MSG_ERROR([could not find clang]),[])
|
AS_IF([test "$ac_cv_path_CLANG" = "noclang"],AC_MSG_ERROR([could not find clang]),[])
|
||||||
AC_SUBST([LLVM_HOME])
|
AC_SUBST([LLVM_HOME])
|
||||||
|
|
||||||
|
OLD_CLANG_LIBS="-lclangFrontend -lclangDriver -lclangSerialization -lclangParse -lclangSema -lclangAnalysis -lclangEdit -lclangAST -lclangLex -lclangBasic"
|
||||||
|
NEW_CLANG_LIBS="-lclang-cpp"
|
||||||
|
AC_CHECK_FILE([$LLVM_LIB_DIR/libclangFrontend.a],
|
||||||
|
[
|
||||||
|
ICG_CLANGLIBS="$OLD_CLANG_LIBS"
|
||||||
|
],
|
||||||
|
AC_CHECK_FILE([$LLVM_LIB_DIR/libclangFrontend.so],
|
||||||
|
[
|
||||||
|
ICG_CLANGLIBS="$OLD_CLANG_LIBS"
|
||||||
|
],
|
||||||
|
AC_CHECK_FILE([$LLVM_LIB_DIR/libclang-cpp.a],
|
||||||
|
[
|
||||||
|
ICG_CLANGLIBS="$NEW_CLANG_LIBS"
|
||||||
|
],
|
||||||
|
AC_CHECK_FILE([$LLVM_LIB_DIR/libclang-cpp.so],
|
||||||
|
[
|
||||||
|
ICG_CLANGLIBS="$NEW_CLANG_LIBS"
|
||||||
|
],
|
||||||
|
AC_MSG_ERROR([could not find clang libs in LLVM library: "$LLVM_LIB_DIR"])
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
AC_SUBST([ICG_CLANGLIBS])
|
||||||
|
|
||||||
|
|
||||||
AC_DEFUN([AX_CLANG_VERSION], [
|
AC_DEFUN([AX_CLANG_VERSION], [
|
||||||
CLANG_VERSION=""
|
CLANG_VERSION=""
|
||||||
ax_cv_clang_version="`$CLANG --version | grep "version" | sed "s/.*version \([0-9]*\.[0-9]*\.[0-9]*\).*/\1/"`"
|
ax_cv_clang_version="`$CLANG --version | grep "version" | sed "s/.*version \([0-9]*\.[0-9]*\.[0-9]*\).*/\1/"`"
|
||||||
|
123
configure
vendored
123
configure
vendored
@ -632,6 +632,7 @@ UDUNITS_LDFLAGS
|
|||||||
UDUNITS_INCLUDES
|
UDUNITS_INCLUDES
|
||||||
UDUNITS_HOME
|
UDUNITS_HOME
|
||||||
CLANG_VERSION
|
CLANG_VERSION
|
||||||
|
ICG_CLANGLIBS
|
||||||
LLVM_HOME
|
LLVM_HOME
|
||||||
CLANG
|
CLANG
|
||||||
LLVM_CONFIG
|
LLVM_CONFIG
|
||||||
@ -717,7 +718,6 @@ infodir
|
|||||||
docdir
|
docdir
|
||||||
oldincludedir
|
oldincludedir
|
||||||
includedir
|
includedir
|
||||||
runstatedir
|
|
||||||
localstatedir
|
localstatedir
|
||||||
sharedstatedir
|
sharedstatedir
|
||||||
sysconfdir
|
sysconfdir
|
||||||
@ -812,7 +812,6 @@ datadir='${datarootdir}'
|
|||||||
sysconfdir='${prefix}/etc'
|
sysconfdir='${prefix}/etc'
|
||||||
sharedstatedir='${prefix}/com'
|
sharedstatedir='${prefix}/com'
|
||||||
localstatedir='${prefix}/var'
|
localstatedir='${prefix}/var'
|
||||||
runstatedir='${localstatedir}/run'
|
|
||||||
includedir='${prefix}/include'
|
includedir='${prefix}/include'
|
||||||
oldincludedir='/usr/include'
|
oldincludedir='/usr/include'
|
||||||
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
|
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
|
||||||
@ -1065,15 +1064,6 @@ do
|
|||||||
| -silent | --silent | --silen | --sile | --sil)
|
| -silent | --silent | --silen | --sile | --sil)
|
||||||
silent=yes ;;
|
silent=yes ;;
|
||||||
|
|
||||||
-runstatedir | --runstatedir | --runstatedi | --runstated \
|
|
||||||
| --runstate | --runstat | --runsta | --runst | --runs \
|
|
||||||
| --run | --ru | --r)
|
|
||||||
ac_prev=runstatedir ;;
|
|
||||||
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
|
|
||||||
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
|
|
||||||
| --run=* | --ru=* | --r=*)
|
|
||||||
runstatedir=$ac_optarg ;;
|
|
||||||
|
|
||||||
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
||||||
ac_prev=sbindir ;;
|
ac_prev=sbindir ;;
|
||||||
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
||||||
@ -1211,7 +1201,7 @@ fi
|
|||||||
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
|
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
|
||||||
datadir sysconfdir sharedstatedir localstatedir includedir \
|
datadir sysconfdir sharedstatedir localstatedir includedir \
|
||||||
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
|
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
|
||||||
libdir localedir mandir runstatedir
|
libdir localedir mandir
|
||||||
do
|
do
|
||||||
eval ac_val=\$$ac_var
|
eval ac_val=\$$ac_var
|
||||||
# Remove trailing slashes.
|
# Remove trailing slashes.
|
||||||
@ -1364,7 +1354,6 @@ Fine tuning of the installation directories:
|
|||||||
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
||||||
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
||||||
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
||||||
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
|
|
||||||
--libdir=DIR object code libraries [EPREFIX/lib]
|
--libdir=DIR object code libraries [EPREFIX/lib]
|
||||||
--includedir=DIR C header files [PREFIX/include]
|
--includedir=DIR C header files [PREFIX/include]
|
||||||
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
||||||
@ -7189,6 +7178,113 @@ if test "$ac_cv_path_CLANG" = "noclang"; then :
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
OLD_CLANG_LIBS="-lclangFrontend -lclangDriver -lclangSerialization -lclangParse -lclangSema -lclangAnalysis -lclangEdit -lclangAST -lclangLex -lclangBasic"
|
||||||
|
NEW_CLANG_LIBS="-lclang-cpp"
|
||||||
|
as_ac_File=`$as_echo "ac_cv_file_$LLVM_LIB_DIR/libclangFrontend.a" | $as_tr_sh`
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LLVM_LIB_DIR/libclangFrontend.a" >&5
|
||||||
|
$as_echo_n "checking for $LLVM_LIB_DIR/libclangFrontend.a... " >&6; }
|
||||||
|
if eval \${$as_ac_File+:} false; then :
|
||||||
|
$as_echo_n "(cached) " >&6
|
||||||
|
else
|
||||||
|
test "$cross_compiling" = yes &&
|
||||||
|
as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
|
||||||
|
if test -r "$LLVM_LIB_DIR/libclangFrontend.a"; then
|
||||||
|
eval "$as_ac_File=yes"
|
||||||
|
else
|
||||||
|
eval "$as_ac_File=no"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
eval ac_res=\$$as_ac_File
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
|
||||||
|
$as_echo "$ac_res" >&6; }
|
||||||
|
if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
|
||||||
|
|
||||||
|
ICG_CLANGLIBS="$OLD_CLANG_LIBS"
|
||||||
|
|
||||||
|
else
|
||||||
|
as_ac_File=`$as_echo "ac_cv_file_$LLVM_LIB_DIR/libclangFrontend.so" | $as_tr_sh`
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LLVM_LIB_DIR/libclangFrontend.so" >&5
|
||||||
|
$as_echo_n "checking for $LLVM_LIB_DIR/libclangFrontend.so... " >&6; }
|
||||||
|
if eval \${$as_ac_File+:} false; then :
|
||||||
|
$as_echo_n "(cached) " >&6
|
||||||
|
else
|
||||||
|
test "$cross_compiling" = yes &&
|
||||||
|
as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
|
||||||
|
if test -r "$LLVM_LIB_DIR/libclangFrontend.so"; then
|
||||||
|
eval "$as_ac_File=yes"
|
||||||
|
else
|
||||||
|
eval "$as_ac_File=no"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
eval ac_res=\$$as_ac_File
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
|
||||||
|
$as_echo "$ac_res" >&6; }
|
||||||
|
if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
|
||||||
|
|
||||||
|
ICG_CLANGLIBS="$OLD_CLANG_LIBS"
|
||||||
|
|
||||||
|
else
|
||||||
|
as_ac_File=`$as_echo "ac_cv_file_$LLVM_LIB_DIR/libclang-cpp.a" | $as_tr_sh`
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LLVM_LIB_DIR/libclang-cpp.a" >&5
|
||||||
|
$as_echo_n "checking for $LLVM_LIB_DIR/libclang-cpp.a... " >&6; }
|
||||||
|
if eval \${$as_ac_File+:} false; then :
|
||||||
|
$as_echo_n "(cached) " >&6
|
||||||
|
else
|
||||||
|
test "$cross_compiling" = yes &&
|
||||||
|
as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
|
||||||
|
if test -r "$LLVM_LIB_DIR/libclang-cpp.a"; then
|
||||||
|
eval "$as_ac_File=yes"
|
||||||
|
else
|
||||||
|
eval "$as_ac_File=no"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
eval ac_res=\$$as_ac_File
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
|
||||||
|
$as_echo "$ac_res" >&6; }
|
||||||
|
if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
|
||||||
|
|
||||||
|
ICG_CLANGLIBS="$NEW_CLANG_LIBS"
|
||||||
|
|
||||||
|
else
|
||||||
|
as_ac_File=`$as_echo "ac_cv_file_$LLVM_LIB_DIR/libclang-cpp.so" | $as_tr_sh`
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LLVM_LIB_DIR/libclang-cpp.so" >&5
|
||||||
|
$as_echo_n "checking for $LLVM_LIB_DIR/libclang-cpp.so... " >&6; }
|
||||||
|
if eval \${$as_ac_File+:} false; then :
|
||||||
|
$as_echo_n "(cached) " >&6
|
||||||
|
else
|
||||||
|
test "$cross_compiling" = yes &&
|
||||||
|
as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
|
||||||
|
if test -r "$LLVM_LIB_DIR/libclang-cpp.so"; then
|
||||||
|
eval "$as_ac_File=yes"
|
||||||
|
else
|
||||||
|
eval "$as_ac_File=no"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
eval ac_res=\$$as_ac_File
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
|
||||||
|
$as_echo "$ac_res" >&6; }
|
||||||
|
if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
|
||||||
|
|
||||||
|
ICG_CLANGLIBS="$NEW_CLANG_LIBS"
|
||||||
|
|
||||||
|
else
|
||||||
|
as_fn_error $? "could not find clang libs in LLVM library: \"$LLVM_LIB_DIR\"" "$LINENO" 5
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CLANG_VERSION=""
|
CLANG_VERSION=""
|
||||||
@ -7298,7 +7394,6 @@ then
|
|||||||
LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"
|
LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"
|
||||||
CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include"
|
CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ac_ext=c
|
ac_ext=c
|
||||||
ac_cpp='$CPP $CPPFLAGS'
|
ac_cpp='$CPP $CPPFLAGS'
|
||||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||||
|
@ -22,6 +22,7 @@ TRICK_MONGOOSE = @TRICK_MONGOOSE@
|
|||||||
USE_X_WINDOWS = @USE_X_WINDOWS@
|
USE_X_WINDOWS = @USE_X_WINDOWS@
|
||||||
|
|
||||||
LLVM_HOME = @LLVM_HOME@
|
LLVM_HOME = @LLVM_HOME@
|
||||||
|
ICG_CLANGLIBS = @ICG_CLANGLIBS@
|
||||||
|
|
||||||
PYTHON_INCLUDES = @PYTHON_CPPFLAGS@
|
PYTHON_INCLUDES = @PYTHON_CPPFLAGS@
|
||||||
PYTHON_LIB = @PYTHON_LIBS@ @PYTHON_EXTRA_LIBS@
|
PYTHON_LIB = @PYTHON_LIBS@ @PYTHON_EXTRA_LIBS@
|
||||||
|
@ -19,6 +19,18 @@ USE_X_WINDOWS = @USE_X_WINDOWS@
|
|||||||
|
|
||||||
LLVM_HOME = @LLVM_ROOT_DIR@
|
LLVM_HOME = @LLVM_ROOT_DIR@
|
||||||
|
|
||||||
|
ICG_CLANGLIBS = \
|
||||||
|
-lclangFrontend \
|
||||||
|
-lclangDriver \
|
||||||
|
-lclangSerialization \
|
||||||
|
-lclangParse \
|
||||||
|
-lclangSema \
|
||||||
|
-lclangAnalysis \
|
||||||
|
-lclangEdit \
|
||||||
|
-lclangAST \
|
||||||
|
-lclangLex \
|
||||||
|
-lclangBasic \
|
||||||
|
|
||||||
PYTHON_INCLUDES = -I@PYTHON_INCLUDE_DIRS@
|
PYTHON_INCLUDES = -I@PYTHON_INCLUDE_DIRS@
|
||||||
PYTHON_LIB = @PYTHON_LIBRARIES@
|
PYTHON_LIB = @PYTHON_LIBRARIES@
|
||||||
|
|
||||||
|
@ -29,17 +29,7 @@ OBJECTS = $(addprefix $(OBJ_DIR)/, $(subst .cpp,.o,$(SOURCES)))
|
|||||||
UDUNITS_OBJS = \
|
UDUNITS_OBJS = \
|
||||||
$(OBJ_DIR)/map_trick_units_to_udunits.o
|
$(OBJ_DIR)/map_trick_units_to_udunits.o
|
||||||
|
|
||||||
CLANGLIBS = \
|
CLANGLIBS = $(ICG_CLANGLIBS)
|
||||||
-lclangFrontend \
|
|
||||||
-lclangDriver \
|
|
||||||
-lclangSerialization \
|
|
||||||
-lclangParse \
|
|
||||||
-lclangSema \
|
|
||||||
-lclangAnalysis \
|
|
||||||
-lclangEdit \
|
|
||||||
-lclangAST \
|
|
||||||
-lclangLex \
|
|
||||||
-lclangBasic \
|
|
||||||
|
|
||||||
CXXFLAGS += -DLIBCLANG_MAJOR=$(CLANG_MAJOR) -DLIBCLANG_MINOR=$(CLANG_MINOR)
|
CXXFLAGS += -DLIBCLANG_MAJOR=$(CLANG_MAJOR) -DLIBCLANG_MINOR=$(CLANG_MINOR)
|
||||||
ifneq ($(CLANG_PATCHLEVEL),)
|
ifneq ($(CLANG_PATCHLEVEL),)
|
||||||
|
Loading…
Reference in New Issue
Block a user