]> git.neil.brown.name Git - portmap.git/commitdiff
NO_PIE: make PIE support controllable
authorMike Frysinger <vapier@gentoo.org>
Tue, 11 Jan 2011 19:09:03 +0000 (14:09 -0500)
committerNeil Brown <neilb@suse.de>
Wed, 12 Jan 2011 06:21:14 +0000 (17:21 +1100)
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Neil Brown <neilb@suse.de>
Makefile
README

index b00c496f4992e3c3a4ab373c76293b34d2cc916e..8004c1a2b418a5162b9107dead95a5b91ffe9149 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -138,6 +138,10 @@ CPPFLAGS += -DIGNORE_SIGCHLD       # AIX 4.x, HP-UX 9.x
 #
 # LDLIBS       += -m
 # CFLAGS       += -arch m68k -arch i386 -arch hppa
+ifeq ($(NO_PIE),)
+CFLAGS_PIE  = -fpie
+LDFLAGS_PIE = -pie
+endif
 
 # Auxiliary libraries that you may have to specify
 #
@@ -157,9 +161,9 @@ CFLAGS   += -Wall -Wstrict-prototypes
 all:   portmap pmap_dump pmap_set portmap.man
 
 CPPFLAGS += $(HOSTS_ACCESS)
-portmap: CFLAGS   += -fpie
+portmap: CFLAGS   += $(CFLAGS_PIE)
 portmap: LDLIBS   += $(WRAP_LIB)
-portmap: LDFLAGS  += -pie
+portmap: LDFLAGS  += $(LDFLAGS_PIE)
 portmap: portmap.o pmap_check.o from_local.o
 
 from_local: CPPFLAGS += -DTEST
diff --git a/README b/README
index 916de7e3008727e784b2f408f0946970cddf75a6..e0b561a85ee22f4e84f3596c7c08d32346a76173 100644 (file)
--- a/README
+++ b/README
@@ -18,6 +18,7 @@ There is no "./configure", just use "make".
 
 Some make variable can be used to control compilation.
 
+ NO_PIE=         if non-empty, don't build portmap as a PIE
  NO_TCP_WRAPPER=  if non-empty, don't use tcp_wrappers
  USE_DNS=        if set, tcp_wrappers can check peers based on hostname
                  as well as IP address.  This should only be used if you