Re: [PATCH] libselinux: Add CPPFLAGS to Makefile

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

 



On Tue, Jun 6, 2023 at 5:50 AM ChungSheng Wu <chungsheng@xxxxxxxxxx> wrote:
>
> From: Chung-Sheng Wu <chungsheng@xxxxxxxxxx>
>
> Add CPPFLAGS to Makefile to allow users change the flags of
> preprocessor.
> We offen use CFLAGS for compiler flags and use CPPFLAGS for
> preprocessor.
>
> Signed-off-by: Chung-Sheng Wu <chungsheng@xxxxxxxxxx>
> ---
>  libselinux/src/Makefile | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile
> index f9a1e5f5..4e4640f0 100644
> --- a/libselinux/src/Makefile
> +++ b/libselinux/src/Makefile
> @@ -149,10 +149,10 @@ pywrap: all selinuxswig_python_exception.i
>  rubywrap: all $(SWIGRUBYSO)
>
>  $(SWIGRUBYLOBJ): $(SWIGRUBYCOUT)
> -       $(CC) $(CFLAGS) $(SWIG_CFLAGS) $(RUBYINC) -fPIC -DSHARED -c -o $@ $<
> +       $(CC) $(CPPFLAGS) $(CFLAGS) $(SWIG_CFLAGS) $(RUBYINC) -fPIC -DSHARED -c -o $@ $<
>
>  $(SWIGRUBYSO): $(SWIGRUBYLOBJ)
> -       $(CC) $(CFLAGS) $(LDFLAGS) -L. -shared -o $@ $^ -lselinux $(RUBYLIBS)
> +       $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -L. -shared -o $@ $^ -lselinux $(RUBYLIBS)
>
>  $(LIBA): $(OBJS)
>         $(AR) rcs $@ $^
> @@ -169,10 +169,10 @@ selinuxswig_python_exception.i: exception.sh ../include/selinux/selinux.h
>         bash -e exception.sh > $@ || (rm -f $@ ; false)
>
>  %.o:  %.c policy.h
> -       $(CC) $(CFLAGS) $(TLSFLAGS) -c -o $@ $<
> +       $(CC) $(CPPFLAGS) $(CFLAGS) $(TLSFLAGS) -c -o $@ $<
>
>  %.lo:  %.c policy.h
> -       $(CC) $(CFLAGS) -fPIC -DSHARED -c -o $@ $<
> +       $(CC) $(CPPFLAGS) $(CFLAGS) -fPIC -DSHARED -c -o $@ $<
>
>  $(SWIGRUBYCOUT): $(SWIGRUBYIF)
>         $(SWIGRUBY) $<
> --
> 2.41.0.rc0.172.g3f132b7071-goog
>

I am not opposed to this, but I would want it for all of the SELinux
userspace, not just libselinux.
Thanks,
Jim




[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux