diff options
author | Joe Slater <joe.slater@windriver.com> | 2018-02-05 14:36:34 -0800 |
---|---|---|
committer | Jia Zhang <zhang.jia@linux.alibaba.com> | 2018-07-06 14:50:47 +0800 |
commit | 4a357121bff4839cb481286f768550d58b36f29c (patch) | |
tree | dadf971292770223a18f0dfaec3b801229bfb789 | |
parent | 086aa9d299e37168ec24b9571479cdc2c32b6c2b (diff) | |
download | meta-secure-core-4a357121bff4839cb481286f768550d58b36f29c.tar.gz |
util-linux: allow -static linking for switch_root.static
Specify -no-pie to override possible -pie default.
Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
-rw-r--r-- | meta-integrity/recipes-core/util-linux/util-linux_%.bbappend | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/meta-integrity/recipes-core/util-linux/util-linux_%.bbappend b/meta-integrity/recipes-core/util-linux/util-linux_%.bbappend index 954183c..d3d498e 100644 --- a/meta-integrity/recipes-core/util-linux/util-linux_%.bbappend +++ b/meta-integrity/recipes-core/util-linux/util-linux_%.bbappend | |||
@@ -1,7 +1,9 @@ | |||
1 | CFLAGS_remove += "-pie -fpie" | 1 | CFLAGS_remove += "-pie -fpie" |
2 | 2 | ||
3 | # We need -no-pie in case the default is to generate pie code. | ||
4 | # | ||
3 | do_compile_append_class-target() { | 5 | do_compile_append_class-target() { |
4 | ${CC} ${CFLAGS} ${LDFLAGS} -static \ | 6 | ${CC} ${CFLAGS} ${LDFLAGS} -no-pie -static \ |
5 | sys-utils/switch_root.o \ | 7 | sys-utils/switch_root.o \ |
6 | -o switch_root.static | 8 | -o switch_root.static |
7 | } | 9 | } |