[systemd-devel] [PATCH] build-sys: use -fno-semantic-interposition if available

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Sun Jan 25 15:43:26 PST 2015


On Sun, Jan 25, 2015 at 06:46:12PM -0300, Cristian Rodríguez wrote:
> GCC5 introduces -fno-semantic-interposition allowing
> better code generation in shared libraries at the cost
> of making interposition of exported symbols impossible
> (i.e, a 3rd party shared library overriding sd_notify() will not work)
> Using this particular feature with systemd is not supported
> and crazy, so do not pay the cost of it.
I'd be careful here. Testing of -Wno-* options does not work
with gcc, and I think it might also not work with -fno-*.

Zbyszek

> ---
>  configure.ac | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/configure.ac b/configure.ac
> index 12e4ab2..e4d7c05 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -199,6 +199,7 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
>          -fdata-sections \
>          -fstack-protector \
>          -fstack-protector-strong \
> +        -fno-semantic-interposition \
>          -fPIE \
>          --param=ssp-buffer-size=4])
>  
> -- 
> 2.2.2
> 
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel


More information about the systemd-devel mailing list