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>
This commit is contained in:
Joe Slater
2018-02-05 14:36:34 -08:00
committed by Jia Zhang
parent 086aa9d299
commit 4a357121bf

View File

@@ -1,7 +1,9 @@
CFLAGS_remove += "-pie -fpie"
# We need -no-pie in case the default is to generate pie code.
#
do_compile_append_class-target() {
${CC} ${CFLAGS} ${LDFLAGS} -static \
${CC} ${CFLAGS} ${LDFLAGS} -no-pie -static \
sys-utils/switch_root.o \
-o switch_root.static
}