Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LbScripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
LHCb Core Software
LbScripts
Merge requests
!216
Updated compiler wrappers
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Updated compiler wrappers
update-compilers
into
master
Overview
0
Commits
4
Changes
45
Merged
Marco Clemencic
requested to merge
update-compilers
into
master
7 years ago
Overview
0
Commits
4
Changes
45
Expand
added support for clang built on multiple gcc versions
added support for 3 digits versions for clang
updated compiler versions
Edited
7 years ago
by
Marco Clemencic
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
e70a293f
4 commits,
7 years ago
45 files
+
86
−
11
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
45
Search (e.g. *.vue) (Ctrl+P)
LbUtils/scripts/.lcg-compiler-wrapper.sh
+
40
−
8
Options
@@ -41,8 +41,10 @@ set_prefix() {
setup_gcc
()
{
local
_version
=
$1
local
_no_binutils
=
$2
_prefix
=
""
set_prefix gcc
${
_version
}
binutils
[
-z
"
${
_no_binutils
}
"
]
&&
set_prefix gcc
${
_version
}
binutils
if
[
-n
"
${
_prefix
}
"
]
;
then
# we found a build of the compiler that uses new binutils
# FIXME: new binutils require an extra entry in the LD_LIBRARY_PATH...
@@ -68,18 +70,48 @@ setup_gcc() {
}
setup_clang
()
{
local
_gcc_version _clang_version _base_platform
_prefix
=
_clang_version
=
$1
case
${
_clang_version
}
in
3.2
)
setup_gcc 4.6.3
;;
3.3|3.4
)
setup_gcc 4.8.1
;;
*
)
setup_gcc 4.9.3
;;
if
[
"
${
_clang_version
}
"
=
"5.0"
]
;
then
_clang_version
=
5.0.0
fi
_base_platform
=
${
_platform
}
for
_gcc_version
in
7 62 49 48 46
;
do
_platform
=
${
_base_platform
}
-gcc
${
_gcc_version
}
-opt
set_prefix llvm
${
_clang_version
}
if
[
-n
"
${
_prefix
}
"
]
;
then
break
;
fi
done
if
[
-z
"
${
_prefix
}
"
]
;
then
_platform
=
${
_base_platform
}
set_prefix llvm
${
_clang_version
}
case
${
_clang_version
}
in
3.2
)
_gcc_version
=
46
;;
3.3|3.4
)
_gcc_version
=
48
;;
*
)
_gcc_version
=
49
;;
esac
fi
local
_llvm_prefix
=
${
_prefix
}
_platform
=
${
_base_platform
}
case
${
_gcc_version
}
in
46
)
_gcc_version
=
4.6.3
;;
48
)
_gcc_version
=
4.8.1
;;
49
)
_gcc_version
=
4.9.3
;;
62
)
_gcc_version
=
6.2.0
;;
7
)
_gcc_version
=
7.1.0
;;
esac
setup_gcc
${
_gcc_version
}
no-binutils
set_prefix llvm
${
_clang_version
}
_bin
=
"
${
_prefix
}
/bin"
_lib
=
"
${
_prefix
}
/lib64"
_bin
=
"
${
_
llvm_
prefix
}
/bin"
_lib
=
"
${
_
llvm_
prefix
}
/lib64"
LD_LIBRARY_PATH
=
$(
echo
$LD_LIBRARY_PATH
|
sed
's-[^:]*/llvm/[^:]*:\?--g'
)
LD_LIBRARY_PATH
=
"
${
_lib
}${
LD_LIBRARY_PATH
:+:
}${
LD_LIBRARY_PATH
}
"
PATH
=
"
${
_bin
}${
PATH
:+:
}${
PATH
}
"
Loading