From 7c52b213c870ac210b225110759308cd8c6b8e81 Mon Sep 17 00:00:00 2001 From: D3m0nKingx Date: Mon, 8 Jan 2018 03:04:24 -0500 Subject: [PATCH 1/2] Change fPIE to fPIC (#1420) -fpic Generate position-independent code (PIC) suitable for use in a shared library... -fpie These options are similar to -fpic and -fPIC, but generated position independent code can be only linked into executables.... By building with fPIE, the resulting binaries are "LSB shared objects" not LSB executables. When trying to run the program (double-click) with mouse it doesn't start. Therefore this change fixes this. --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index fb3c4da51..749edcb22 100644 --- a/configure.ac +++ b/configure.ac @@ -417,8 +417,8 @@ if test x$use_hardening != xno; then if test x$TARGET_OS != xwindows; then # All windows code is PIC, forcing it on just adds useless compile warnings - AX_CHECK_COMPILE_FLAG([-fPIE],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fPIE"]) - AX_CHECK_LINK_FLAG([[-pie]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"]) + AX_CHECK_COMPILE_FLAG([-fPIC],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fPIC"]) + AX_CHECK_LINK_FLAG([[-fno-pie]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -fno-pie"]) fi case $host in From 10a5e93a055ab5f239c5447a5fe05283af09e293 Mon Sep 17 00:00:00 2001 From: Patrick Lodder Date: Sun, 21 Jan 2018 14:54:26 +0100 Subject: [PATCH 2/2] Revert "Change fPIE to fPIC (#1420)" (#1447) This reverts commit 7c52b213c870ac210b225110759308cd8c6b8e81. --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 749edcb22..fb3c4da51 100644 --- a/configure.ac +++ b/configure.ac @@ -417,8 +417,8 @@ if test x$use_hardening != xno; then if test x$TARGET_OS != xwindows; then # All windows code is PIC, forcing it on just adds useless compile warnings - AX_CHECK_COMPILE_FLAG([-fPIC],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fPIC"]) - AX_CHECK_LINK_FLAG([[-fno-pie]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -fno-pie"]) + AX_CHECK_COMPILE_FLAG([-fPIE],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fPIE"]) + AX_CHECK_LINK_FLAG([[-pie]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"]) fi case $host in