Re: [PATCH] Makefile: add USE_PIE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Fabrice,


Thank you for your patch.

Am 05.05.24 um 15:39 schrieb Fabrice Fontaine:
Do not hardcode -pie and allow the user to drop it (e.g. PIE could be
enabled or disabled by the buildsystem such as buildroot)

This sounds reasonable, but it changes the current default behavior, doesn’t it? Could you please elaborate, when this was added, and if the new default would break systems?

A formal nit pick for the commit messages would be to please add a dot/period at the end of sentences.)

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@xxxxxxxxx>
---
  Makefile | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 7c221a89..a5269687 100644
--- a/Makefile
+++ b/Makefile
@@ -137,7 +137,11 @@ LDFLAGS = -Wl,-z,now,-z,noexecstack
  # If you want a static binary, you might uncomment these
  # LDFLAGS += -static
  # STRIP = -s
-LDLIBS = -ldl -pie
+LDLIBS = -ldl
+USE_PIE = 1
+ifdef USE_PIE
+LDLIBS += -pie
+endif
# To explicitly disable libudev, set -DNO_LIBUDEV in CXFLAGS
  ifeq (, $(findstring -DNO_LIBUDEV,  $(CXFLAGS)))


Kind regards,

Paul




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux