Re: [PATCH 1/4] pie: add Position-Independent-Executable flag

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

 



On Thu, Mar 20, 2014 at 09:39:20AM +0100, Wojciech Macek wrote:
> Add possibility to choose whether the code is compiled with PIE
> or without. New configuration flags:
> --enable-pie (default)
> --disable-pie
> ---
>  configure.ac | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 62b74c5..96a7038 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -215,7 +215,6 @@ fi
>  # Check for compiler and library settings.
>  
>  LIBVIRT_COMPILE_WARNINGS
> -LIBVIRT_COMPILE_PIE
>  LIBVIRT_LINKER_RELRO
>  LIBVIRT_LINKER_NO_INDIRECT
>  
> @@ -581,7 +580,20 @@ if test x"$enable_debug" = x"yes"; then
>     AC_DEFINE([ENABLE_DEBUG], [], [whether debugging is enabled])
>  fi
>  
> +dnl --enable-pie=(yes|no)
> +AC_ARG_ENABLE([pie],
> +              [AS_HELP_STRING([--enable-pie=@<:@no|yes@:>@],
> +                             [enable Position-Independent-Executables @<:@default=yes@:>@])],
> +  [],[enable_pie=yes])
> +AM_CONDITIONAL([ENABLE_PIE], test x"$enable_pie" = x"yes")
> +if test x"$enable_debug" = x"yes"; then
> +   AC_DEFINE([ENABLE_PIE], [], [whether Position-Independent-Executables are enabled])
> +fi
>  
> +# Check if Position-Independent-Executables should be supported
> +if test "$enable_pie" = "yes" ; then
> +LIBVIRT_COMPILE_PIE
> +fi

IMHO the rationale behind this is pretty dubious. Can you elaborate
on exactly what errors you're getting with PIE builds, since presumably
they're working find for FreeBSD devs in general. If there are problems
that can't be avoided, then adding a configure flag is still the wrong
way to deal with them. We already probe to see if PIE mode works, so
if that's not detecting a problem we must improve that detection.


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]