[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: [PATCH] - Remove -pie from LDFLAGS
From: Nimesh Prajapati <nimesh.prajapati () rockwellcollins ! com>
Date: 2017-11-24 5:19:24
Message-ID: 1511500764-17813-1-git-send-email-nimesh.prajapati () rockwellcollins ! com
[Download RAW message or body]
From: Yogesh Prasad <yogesh.prasad@rockwellcollins.com>
Description
This patch will remove '-pie' option from LDFLAGS if it was passed
from TARGET_LDFLAGS. Removing of -pie linker option is required
because it cannot be used with the -r option.
Busybox bydefault enables -r option. if -r and -pie are used together
below error is thrown by the linker.
-------------------------------------------------------------------------
/host/lib/gcc/powerpc-buildroot-linux-gnu/6.4.0/../../../../
powerpc-buildroot-linux-gnu/bin/ld: -r and -pie may not be used together
collect2: error: ld returned 1 exit status
make[3]: *** [applets/built-in.o] Error 1
make[2]: *** [applets_dir] Error 2
make[1]: *** [/build/busybox-1.27.1/.stamp_built] Error 2
make: *** [_all] Error 2
-------------------------------------------------------------------------
Signed-off-by: Yogesh Prasad <yogesh.prasad@rockwellcollins.com>
Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com>
---
scripts/Makefile.lib | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 3e54ea7..acf5d33 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -121,7 +121,7 @@ cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(__cpp_flags)
# yet ld_flags is fed to ld.
#ld_flags = $(LDFLAGS) $(EXTRA_LDFLAGS)
# Remove the -Wl, prefix from linker options normally passed through gcc
-ld_flags = $(filter-out -Wl$(comma)%,$(LDFLAGS) $(EXTRA_LDFLAGS))
+ld_flags = $(filter-out -Wl$(comma)% -pie,$(LDFLAGS) $(EXTRA_LDFLAGS))
# Finds the multi-part object the current object will be linked into
--
1.9.1
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic