Skip to content

Commit 8dfc876

Browse files
committed
[Link] configure flag '-linker' accepts default value, which corresponds to the default linker.
1 parent 79ab371 commit 8dfc876

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

DEVELOPER_NOTES

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-------------------------------------------------------------
22
Developer notes version 1.9.4_beta : Changes since version 1.9.3 :
33
-------------------------------------------------------------
4-
23/05/24 (TRUST) Change : Flag '-linker' can be used to override linker, otherwise mold will be used if found.
4+
23/05/24 (TRUST) Change : Flag '-linker' can be used to override linker, otherwise mold will be used if found. configure option -linker=default will force default linker.
55
17/05/24 (TRUST) Minor change : Methods Gpoint() and Gpoint(t1,t2) renamed derivee_en_temps() and calculer_derivee_en_temps(t1,t2)
66
14/05/24 (TRUST) Debug : Flag '-enable-kokkos-debug' can be used to compile (and link only with $exec_debug) Kokkos library in Debug mode.
77
30/04/24 (TRUST) Debug : Flag '-enable-mc-debug' can be used to compile (and link only with $exec_debug) MEDCoupling library in Debug mode.

bin/KSH/Createcmakefile.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ def generate_cmake_files(root_dir, atelier):
489489
add_executable (${trio} ${inst_compl})
490490
target_link_libraries(${trio} ${my_listobj} ${syslib})
491491
endif()
492-
492+
493493
install (TARGETS ${trio} DESTINATION exec)
494494
495495
#

configure

+1-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ echo " -cxxflags=<flags> Add C++ compiler options."
273273
echo " -cflags=<flags> Add C compiler options."
274274
echo " -fflags=<flags> Add Fortran compiler options."
275275
echo " "
276-
echo " -linker=<prog> Force the use of a specified linker."
276+
echo " -linker=<prog> Force the use of a specified linker (if -linker=default, standard linking will be used)."
277277
echo " "
278278
echo " -with-64-bit-indices Build with 64 bits integer indices."
279279
echo " "

env_src/configurer_env

+10-7
Original file line numberDiff line numberDiff line change
@@ -1077,14 +1077,17 @@ fi
10771077
# Linker setup - will use 'mold' if found:
10781078
###############################
10791079
echo "# Checking if linker is overriden (you can set configure option '-linker=' to do this) or if 'mold' is present ..."
1080-
if [ "$TRUST_FORCE_LINKER" != "" ]; then
1081-
echo "# TRUST linker forced to : $TRUST_FORCE_LINKER"
1082-
m="# TRUST linker" && e="TRUST_LINKER=\"$TRUST_FORCE_LINKER\" && export TRUST_LINKER" && ecrit $m"|"$e"|"$env;eval $e
1080+
if [ "$TRUST_FORCE_LINKER" != "" ] && [ "$TRUST_FORCE_LINKER" != "default" ]
1081+
then
1082+
echo "# TRUST linker forced to: $TRUST_FORCE_LINKER"
1083+
m="# TRUST linker" && e="TRUST_LINKER=\"$TRUST_FORCE_LINKER\" && export TRUST_LINKER" && ecrit $m"|"$e"|"$env;eval $e
10831084
fi
10841085
mold=`whence_ mold`
1085-
if [ $? -eq 0 ] && [ "$TRUST_FORCE_LINKER" == "" ]; then
1086-
echo "# 'mold' linker detected: $mold"
1087-
m="# TRUST linker" && e="TRUST_LINKER=\"$mold\" && export TRUST_LINKER" && ecrit $m"|"$e"|"$env;eval $e
1086+
if [ "$mold" != "" ] && [ "$TRUST_FORCE_LINKER" == "" ] && [ "$TRUST_ARCH_CC" != "linux_icpc" ] && [ "$TRUST_ARCH_CC" != "linux_icpx" ]
1087+
then
1088+
# for intel, only bfd, gold and lld are avail: https://www.intel.com/content/www/us/en/docs/cpp-compiler/developer-guide-reference/2021-8/fuse-ld.html
1089+
echo "# 'mold' linker detected: $mold (if you want to not use it, set configure option -linker=default)"
1090+
m="# TRUST linker" && e="TRUST_LINKER=\"mold\" && export TRUST_LINKER" && ecrit $m"|"$e"|"$env;eval $e
10881091
fi
10891092
10901093
#####################
@@ -2546,4 +2549,4 @@ then
25462549
(cd $TRUST_ROOT && ./bin/BUILD64/GO)
25472550
fi
25482551
2549-
exit 0
2552+
exit 0

0 commit comments

Comments
 (0)