Re: [PATCH] configure.in: allow cross compilation

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

 



On Mon, 2012-10-15 at 14:19 +1300, Chris Packham wrote:
> The default behaviour of AC_RUN_IFELSE is to stop with an error if cross
> compiling. Avoid this by providing the optional 4th argument to set
> gcc_supports_pie=no if support for PIE cannot be detected.

Patch has been added to the queue for the next time I commit.

> 
> Signed-off-by: Chris Packham <chris.packham@xxxxxxxxxxxxxxxxxxx>
> ---
> This patch was sent privately to Ian but now that I've figured out the
> mailing list address it probably belongs here.
> 
> One outstanding problem is for cross compilers who do want -fPIE. One
> possibility would be make gcc_supports_pie ac_cv_gcc_supports_pie which
> would make it over-ridable. I don't think its worth the effort just yet.
> 
>  configure.in |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure.in b/configure.in
> index 1a24e34..90bda62 100644
> --- a/configure.in
> +++ b/configure.in
> @@ -307,7 +307,7 @@ DAEMON_CFLAGS=
>  DAEMON_LDFLAGS=
>  AC_MSG_CHECKING([whether gcc -fPIE works])
>  AC_RUN_IFELSE([AC_LANG_PROGRAM([[]], [[int main(void) {return 0;}]])],
> -	      [gcc_supports_pie=yes], [gcc_supports_pie=no])
> +	      [gcc_supports_pie=yes], [gcc_supports_pie=no], [gcc_supports_pie=no])
>  AC_MSG_RESULT([$gcc_supports_pie])
>  if test $gcc_supports_pie = yes ; then
>  	DAEMON_CFLAGS="-fPIE"


--
To unsubscribe from this list: send the line "unsubscribe autofs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux Ext4]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux