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

[Minios-devel] [UNIKRAFT PATCHv2 01/25] build: Remove the check of '--enable-default-pie' in Makefile.uk



As discussed in mailing list [1], the check for '--enable-default-pie'
is unnecessary, because GCC supports '-no-pie' as soon as it.
We have checked '-no-pie' already. So we can remove the check for
'--enable-default-pie' to get rid of the console command.

[1]https://lists.xenproject.org/archives/html/minios-devel/2018-09/msg00067.html

Signed-off-by: Wei Chen <wei.chen@xxxxxxx>
---
 Makefile.uk | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/Makefile.uk b/Makefile.uk
index 0cc6690..2d11544 100644
--- a/Makefile.uk
+++ b/Makefile.uk
@@ -57,13 +57,11 @@ ASFLAGS  += -DUK_VERSION=$(UK_VERSION).$(UK_SUBVERSION) 
-DUK_FULLVERSION=$(UK_FU
 CFLAGS   += -DUK_VERSION=$(UK_VERSION).$(UK_SUBVERSION) 
-DUK_FULLVERSION=$(UK_FULLVERSION) -DUK_CODENAME="$(UK_CODENAME)"
 CXXFLAGS += -DUK_VERSION=$(UK_VERSION).$(UK_SUBVERSION) 
-DUK_FULLVERSION=$(UK_FULLVERSION) -DUK_CODENAME="$(UK_CODENAME)"
 
-# Check whether the pie option is enabled by default. If possible,
-# add -no-pie to link flags to override default pie option.
-PIE_ON = $(shell $(CC) -v 2>&1 | grep -Fo "enable-default-pie")
-ifneq ($(PIE_ON),)
+# If GCC supports "-no-pie" flag, we will add this flag to link flags to
+# override "pie" option, because some distributions will set
+# "--enbale-default-pie" by default.
 ASFLAGS-$(call gcc_version_ge,6,1)     += -no-pie
 CFLAGS-$(call gcc_version_ge,6,1)      += -no-pie
 CXXFLAGS-$(call gcc_version_ge,6,1)    += -no-pie
 LIBLDFLAGS-$(call gcc_version_ge,6,1)  += -no-pie
 LDFLAGS-$(call gcc_version_ge,6,1)     += -no-pie
-endif
-- 
2.17.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.