Message ID | 20191025134149.12518-1-thomas.petazzoni@bootlin.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | [libselinux] libselinux/src/Makefile: don't pass bogus -I and -L to python setup.py build_ext | expand |
On Fri, Oct 25, 2019 at 3:42 PM Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote: > > Using $(DESTDIR) during the build does not follow the normal/standard > semantic of DESTDIR: it is normally only needed during the > installation. Therefore, a lot of build systems/environments don't > pass any DESTDIR at build time, which causes setup.py to be called > with -I /usr/include -L /usr/lib, which breaks cross-compilation. > > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> This patch looks good to me. It does not seem to break the build configurations that I am using and fixes a real issue. If nobody complains, I will merge it (without the 2 other patches) tomorrow. Acked-by: Nicolas Iooss <nicolas.iooss@m4x.org> Thanks! > --- > libselinux/src/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile > index 2b1696a0..3b8bad81 100644 > --- a/libselinux/src/Makefile > +++ b/libselinux/src/Makefile > @@ -130,7 +130,7 @@ SWIGRUBY = swig -Wall -ruby -o $(SWIGRUBYCOUT) -outdir ./ $(DISABLE_FLAGS) > all: $(LIBA) $(LIBSO) $(LIBPC) > > pywrap: all selinuxswig_python_exception.i > - CFLAGS="$(CFLAGS) $(SWIG_CFLAGS)" $(PYTHON) setup.py build_ext -I $(DESTDIR)$(INCLUDEDIR) -L $(DESTDIR)$(LIBDIR) > + CFLAGS="$(CFLAGS) $(SWIG_CFLAGS)" $(PYTHON) setup.py build_ext > > rubywrap: all $(SWIGRUBYSO) > > -- > 2.21.0 >
On Fri, Nov 1, 2019 at 10:22 AM Nicolas Iooss <nicolas.iooss@m4x.org> wrote: > > On Fri, Oct 25, 2019 at 3:42 PM Thomas Petazzoni > <thomas.petazzoni@bootlin.com> wrote: > > > > Using $(DESTDIR) during the build does not follow the normal/standard > > semantic of DESTDIR: it is normally only needed during the > > installation. Therefore, a lot of build systems/environments don't > > pass any DESTDIR at build time, which causes setup.py to be called > > with -I /usr/include -L /usr/lib, which breaks cross-compilation. > > > > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> > > This patch looks good to me. It does not seem to break the build > configurations that I am using and fixes a real issue. If nobody > complains, I will merge it (without the 2 other patches) tomorrow. > > Acked-by: Nicolas Iooss <nicolas.iooss@m4x.org> > > Thanks! Applied. Nicolas > > --- > > libselinux/src/Makefile | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile > > index 2b1696a0..3b8bad81 100644 > > --- a/libselinux/src/Makefile > > +++ b/libselinux/src/Makefile > > @@ -130,7 +130,7 @@ SWIGRUBY = swig -Wall -ruby -o $(SWIGRUBYCOUT) -outdir ./ $(DISABLE_FLAGS) > > all: $(LIBA) $(LIBSO) $(LIBPC) > > > > pywrap: all selinuxswig_python_exception.i > > - CFLAGS="$(CFLAGS) $(SWIG_CFLAGS)" $(PYTHON) setup.py build_ext -I $(DESTDIR)$(INCLUDEDIR) -L $(DESTDIR)$(LIBDIR) > > + CFLAGS="$(CFLAGS) $(SWIG_CFLAGS)" $(PYTHON) setup.py build_ext > > > > rubywrap: all $(SWIGRUBYSO) > > > > -- > > 2.21.0 > >
diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile index 2b1696a0..3b8bad81 100644 --- a/libselinux/src/Makefile +++ b/libselinux/src/Makefile @@ -130,7 +130,7 @@ SWIGRUBY = swig -Wall -ruby -o $(SWIGRUBYCOUT) -outdir ./ $(DISABLE_FLAGS) all: $(LIBA) $(LIBSO) $(LIBPC) pywrap: all selinuxswig_python_exception.i - CFLAGS="$(CFLAGS) $(SWIG_CFLAGS)" $(PYTHON) setup.py build_ext -I $(DESTDIR)$(INCLUDEDIR) -L $(DESTDIR)$(LIBDIR) + CFLAGS="$(CFLAGS) $(SWIG_CFLAGS)" $(PYTHON) setup.py build_ext rubywrap: all $(SWIGRUBYSO)
Using $(DESTDIR) during the build does not follow the normal/standard semantic of DESTDIR: it is normally only needed during the installation. Therefore, a lot of build systems/environments don't pass any DESTDIR at build time, which causes setup.py to be called with -I /usr/include -L /usr/lib, which breaks cross-compilation. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> --- libselinux/src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)