From 01180e78fe9568e7fb2673ba61801c42f0f70115 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 11 Mar 2022 10:37:51 -0800
Subject: [PATCH] make: Static PIE does not work on musl/ppc

Fixes linker error e.g.
"read-only segment has dynamic relocations"

Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index cbb7634..69ee228 100644
--- a/Makefile
+++ b/Makefile
@@ -76,7 +76,7 @@ ${LIBGCOMPAT_NAME}: ${LIBGCOMPAT_OBJ}
 ${LIBGCOMPAT_OBJ}: ${LIBGCOMPAT_INCLUDE}
 
 ${LOADER_NAME}: ${LOADER_OBJ}
-	${CC} ${CFLAGS} ${LDFLAGS} -static-pie -o ${LOADER_NAME} ${LOADER_OBJ}
+	${CC} ${CFLAGS} ${LDFLAGS} -static -o ${LOADER_NAME} ${LOADER_OBJ}
 
 .c.o:
 	${CC} ${CPPFLAGS} ${CFLAGS} -c -D_BSD_SOURCE \
-- 
2.35.1

