Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
792a48b1
Commit
792a48b1
authored
Mar 30, 2021
by
Evgeny Vereshchagin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build-system: make it compatible with ASan/UBsan/MSan
Closes:
https://github.com/lxc/lxc/issues/3727
Signed-off-by:
Evgeny Vereshchagin
<
evvers@ya.ru
>
parent
b31484bd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
configure.ac
configure.ac
+9
-1
Makefile.am
src/lxc/Makefile.am
+5
-3
No files found.
configure.ac
View file @
792a48b1
...
@@ -200,6 +200,11 @@ AC_ARG_ENABLE([werror],
...
@@ -200,6 +200,11 @@ AC_ARG_ENABLE([werror],
[AS_HELP_STRING([--disable-werror], [do not treat warnings as errors])],
[AS_HELP_STRING([--disable-werror], [do not treat warnings as errors])],
[enable_werror=$enableval], [enable_werror=yes])
[enable_werror=$enableval], [enable_werror=yes])
AC_ARG_ENABLE([no_undefined],
[AS_HELP_STRING([--disable-no-undefined], [do not pass -Wl,--no-undefined])],
[enable_no_undefined=$enableval], [enable_no_undefined=yes])
AM_CONDITIONAL([ENABLE_NO_UNDEFINED], [test "x$enable_no_undefined" = "xyes"])
# Allow disabling rpath
# Allow disabling rpath
AC_ARG_ENABLE([rpath],
AC_ARG_ENABLE([rpath],
[AS_HELP_STRING([--enable-rpath], [set rpath in executables [default=no]])],
[AS_HELP_STRING([--enable-rpath], [set rpath in executables [default=no]])],
...
@@ -801,12 +806,15 @@ AC_SUBST(AM_CFLAGS)
...
@@ -801,12 +806,15 @@ AC_SUBST(AM_CFLAGS)
CC_CHECK_FLAGS_APPEND([AM_LDFLAGS],[LDFLAGS],[ \
CC_CHECK_FLAGS_APPEND([AM_LDFLAGS],[LDFLAGS],[ \
-Wl,--as-needed \
-Wl,--as-needed \
-Wl,--no-undefined \
-Wl,--gc-sections \
-Wl,--gc-sections \
-Wl,-z,relro \
-Wl,-z,relro \
-Wl,-z,now \
-Wl,-z,now \
-pie \
-pie \
-Wl,-fuse-ld=gold])
-Wl,-fuse-ld=gold])
AM_COND_IF([ENABLE_NO_UNDEFINED],
[CC_CHECK_FLAGS_APPEND([AM_LDFLAGS],[LDFLAGS],[-Wl,--no-undefined])])
AC_SUBST(AM_LDFLAGS)
AC_SUBST(AM_LDFLAGS)
CFLAGS="$CFLAGS -Wvla -std=gnu11 -fms-extensions"
CFLAGS="$CFLAGS -Wvla -std=gnu11 -fms-extensions"
...
...
src/lxc/Makefile.am
View file @
792a48b1
...
@@ -262,10 +262,13 @@ liblxc_la_CFLAGS = -fPIC \
...
@@ -262,10 +262,13 @@ liblxc_la_CFLAGS = -fPIC \
-pthread
-pthread
liblxc_la_LDFLAGS
=
-pthread
\
liblxc_la_LDFLAGS
=
-pthread
\
-Wl
,-no-undefined
\
-Wl
,-soname,liblxc.so.
$
(
firstword
$
(
subst ., ,@LXC_ABI@
))
\
-Wl
,-soname,liblxc.so.
$
(
firstword
$
(
subst ., ,@LXC_ABI@
))
\
-version-info
@LXC_ABI_MAJOR@
-version-info
@LXC_ABI_MAJOR@
if
ENABLE_NO_UNDEFINED
liblxc_la_LDFLAGS
+=
-Wl
,-no-undefined
endif
liblxc_la_LIBADD
=
$(CAP_LIBS)
\
liblxc_la_LIBADD
=
$(CAP_LIBS)
\
$(OPENSSL_LIBS)
\
$(OPENSSL_LIBS)
\
$(SELINUX_LIBS)
\
$(SELINUX_LIBS)
\
...
@@ -1855,8 +1858,7 @@ pam_cgfs_la_LIBADD = $(AM_LIBS) \
...
@@ -1855,8 +1858,7 @@ pam_cgfs_la_LIBADD = $(AM_LIBS) \
pam_cgfs_la_LDFLAGS
=
$(AM_LDFLAGS)
\
pam_cgfs_la_LDFLAGS
=
$(AM_LDFLAGS)
\
-avoid-version
\
-avoid-version
\
-module
\
-module
\
-shared
\
-shared
-Wl
,-no-undefined
endif
endif
endif
endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment