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 authored and Jia Zhang committed 2018-07-06 14:50:47 +08:00
1 parent 086aa9d299
commit 4a357121bf
1 file changed
+3 -1
@@ -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
}