Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
base
Commits
ab7b7f10
Commit
ab7b7f10
authored
3 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
MNT: Add FSLDEVDIR to rpath entry for shared libs/exes
parent
1f2af62d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!30
Mnt/fsldevdir rpath
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
config/buildSettings.mk
+28
-15
28 additions, 15 deletions
config/buildSettings.mk
with
28 additions
and
15 deletions
config/buildSettings.mk
+
28
−
15
View file @
ab7b7f10
...
@@ -78,17 +78,19 @@ ARCHNVCCLDFLAGS =
...
@@ -78,17 +78,19 @@ ARCHNVCCLDFLAGS =
#
#
#####################################################################
#####################################################################
# Drop -rpath flags from LDFLAGS if it is
# Drop -rpath flags from LDFLAGS if it is set in
# set in the environment - we explicitly
# the environment - we explicitly add them below
# add them below such that executables
# such that executables will be able to find libs
# will be able to find libs in $(pwd) and
# in $(pwd), $FSLDEVDIR/lib, and $FSLDIR/lib *in
# in $FSLDIR/lib *in that order*. This is
# that order*. This is so that executables
# so that executables located in the
# located in the project source dir can be
# project source dir can be executed in
# executed in place with sensible behaviour (i.e.
# place with sensible behaviour (i.e. any
# any shared libs located in the same dir will
# shared libs located in the same dir will
# take precedence over libs of the same name in
# take precedence over libs of the same
# $FSLDIR/lib/).
# name in $FSLDIR/lib/).
#
# Fortunately -Wl,-rpath is used for both g++ and
# clang, so we can cover both with one substitution.
COMMA
:=
,
COMMA
:=
,
_LDFLAGS
:=
$(
patsubst
-Wl
${
COMMA
}
-rpath
%,,
${
LDFLAGS
})
_LDFLAGS
:=
$(
patsubst
-Wl
${
COMMA
}
-rpath
%,,
${
LDFLAGS
})
LDFLAGS
=
${
_LDFLAGS
}
LDFLAGS
=
${
_LDFLAGS
}
...
@@ -101,8 +103,12 @@ ifeq ($(SYSTYPE), Darwin)
...
@@ -101,8 +103,12 @@ ifeq ($(SYSTYPE), Darwin)
CXX
?=
clang++
CXX
?=
clang++
CFLAGS
?=
-arch
x86_64
-Wall
-pedantic
CFLAGS
?=
-arch
x86_64
-Wall
-pedantic
CXXFLAGS
?=
-arch
x86_64
-Wall
-pedantic
CXXFLAGS
?=
-arch
x86_64
-Wall
-pedantic
LDFLAGS
+=
-Wl
,-rpath,
"@executable_path/"
\
LDFLAGS
+=
-Wl
,-rpath,
"@executable_path/"
-Wl
,-rpath,
"
${
FSLDIR
}
/lib"
# Only add FSLDEVDIR if different to FSLDIR
ifneq
(${FSLDEVDIR}, ${FSLDIR})
LDFLAGS
+=
-Wl
,-rpath,
"
${
FSLDEVDIR
}
/lib"
endif
LDFLAGS
+=
-Wl
,-rpath,
"
${
FSLDIR
}
/lib"
ARCHLIBS
+=
-llapack
-lblas
-lz
-lm
ARCHLIBS
+=
-llapack
-lblas
-lz
-lm
# On macOS, we need to change the install
# On macOS, we need to change the install
...
@@ -131,8 +137,15 @@ ifeq ($(SYSTYPE), Linux)
...
@@ -131,8 +137,15 @@ ifeq ($(SYSTYPE), Linux)
-Wall
-pedantic
-Wno-long-long
-Wall
-pedantic
-Wno-long-long
CXXFLAGS
?=
-fexpensive-optimizations
\
CXXFLAGS
?=
-fexpensive-optimizations
\
-Wall
-pedantic
-Wno-long-long
-Wall
-pedantic
-Wno-long-long
LDFLAGS
+=
-Wl
,-rpath,
'$$ORIGIN:
${
FSLDIR
}
/lib'
\
LDFLAGS
+=
-Wl
,-rpath,
'$$ORIGIN'
\
-Wl
,-rpath-link,
'$$ORIGIN:
${
FSLDIR
}
/lib'
-Wl
,-rpath-link,
'$$ORIGIN'
# Only add FSLDEVDIR if different to FSLDIR
ifneq
(${FSLDEVDIR}, ${FSLDIR})
LDFLAGS
+=
-Wl
,-rpath,
'
${
FSLDEVDIR
}
/lib'
\
-Wl
,-rpath-link,
'
${
FSLDEVDIR
}
/lib'
endif
LDFLAGS
+=
-Wl
,-rpath,
'
${
FSLDIR
}
/lib'
\
-Wl
,-rpath-link,
'
${
FSLDIR
}
/lib'
ARCHLIBS
+=
-lopenblas
-lz
-lm
ARCHLIBS
+=
-lopenblas
-lz
-lm
endif
endif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment