Message ID | 1478031804-13993-1-git-send-email-william.c.roberts@intel.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Nicolas, Let us know if this works for you, I am unable to test it at the moment on Linux. I did test this on Mac, its OK. On Tue, Nov 1, 2016 at 1:23 PM, <william.c.roberts@intel.com> wrote: > From: William Roberts <william.c.roberts@intel.com> > > As reported by Nicolas Iooss, the clang + linux build seems > broken: > > clang-3.9: warning: argument unused during compilation: '-undefined > dynamic_lookup' > /usr/bin/ld: unrecognised option: -install_name > clang-3.9: error: linker command failed with exit code 1 (use -v to > see invocation) > > We already have those options set for Darwin, just drop them from the > clang side. > > Signed-off-by: William Roberts <william.c.roberts@intel.com> > --- > libselinux/src/Makefile | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile > index ae40f80..b92fe1c 100644 > --- a/libselinux/src/Makefile > +++ b/libselinux/src/Makefile > @@ -73,13 +73,12 @@ override CFLAGS += -fipa-pure-const -Wlogical-op -Wpacked-bitfield-compat -Wsync > -Wno-suggest-attribute=pure -Wno-suggest-attribute=const -Wp,-D_FORTIFY_SOURCE=2 > else > override CFLAGS += -Wunused-command-line-argument > -override LDFLAGS += -L/opt/local/lib -undefined dynamic_lookup > -LD_SONAME_FLAGS=-install_name,$(LIBSO) > endif > > ifeq ($(OS), Darwin) > override CFLAGS += -I/opt/local/include > override LDFLAGS += -L/opt/local/lib -undefined dynamic_lookup > +LD_SONAME_FLAGS=-install_name,$(LIBSO) > endif > > PCRE_LDFLAGS ?= -lpcre > -- > 2.7.4 > > _______________________________________________ > Selinux mailing list > Selinux@tycho.nsa.gov > To unsubscribe, send email to Selinux-leave@tycho.nsa.gov. > To get help, send an email containing "help" to Selinux-request@tycho.nsa.gov.
On 11/01/2016 04:23 PM, william.c.roberts@intel.com wrote: > From: William Roberts <william.c.roberts@intel.com> > > As reported by Nicolas Iooss, the clang + linux build seems > broken: > > clang-3.9: warning: argument unused during compilation: '-undefined > dynamic_lookup' > /usr/bin/ld: unrecognised option: -install_name > clang-3.9: error: linker command failed with exit code 1 (use -v to > see invocation) > > We already have those options set for Darwin, just drop them from the > clang side. Thanks, applied. > > Signed-off-by: William Roberts <william.c.roberts@intel.com> > --- > libselinux/src/Makefile | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile > index ae40f80..b92fe1c 100644 > --- a/libselinux/src/Makefile > +++ b/libselinux/src/Makefile > @@ -73,13 +73,12 @@ override CFLAGS += -fipa-pure-const -Wlogical-op -Wpacked-bitfield-compat -Wsync > -Wno-suggest-attribute=pure -Wno-suggest-attribute=const -Wp,-D_FORTIFY_SOURCE=2 > else > override CFLAGS += -Wunused-command-line-argument > -override LDFLAGS += -L/opt/local/lib -undefined dynamic_lookup > -LD_SONAME_FLAGS=-install_name,$(LIBSO) > endif > > ifeq ($(OS), Darwin) > override CFLAGS += -I/opt/local/include > override LDFLAGS += -L/opt/local/lib -undefined dynamic_lookup > +LD_SONAME_FLAGS=-install_name,$(LIBSO) > endif > > PCRE_LDFLAGS ?= -lpcre >
On Tue, Nov 1, 2016 at 1:32 PM, Stephen Smalley <sds@tycho.nsa.gov> wrote: > On 11/01/2016 04:23 PM, william.c.roberts@intel.com wrote: >> From: William Roberts <william.c.roberts@intel.com> >> >> As reported by Nicolas Iooss, the clang + linux build seems >> broken: >> >> clang-3.9: warning: argument unused during compilation: '-undefined >> dynamic_lookup' >> /usr/bin/ld: unrecognised option: -install_name >> clang-3.9: error: linker command failed with exit code 1 (use -v to >> see invocation) >> >> We already have those options set for Darwin, just drop them from the >> clang side. > > Thanks, applied. Did you check this with clang-3.9 locally and reproduce the error? > >> >> Signed-off-by: William Roberts <william.c.roberts@intel.com> >> --- >> libselinux/src/Makefile | 3 +-- >> 1 file changed, 1 insertion(+), 2 deletions(-) >> >> diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile >> index ae40f80..b92fe1c 100644 >> --- a/libselinux/src/Makefile >> +++ b/libselinux/src/Makefile >> @@ -73,13 +73,12 @@ override CFLAGS += -fipa-pure-const -Wlogical-op -Wpacked-bitfield-compat -Wsync >> -Wno-suggest-attribute=pure -Wno-suggest-attribute=const -Wp,-D_FORTIFY_SOURCE=2 >> else >> override CFLAGS += -Wunused-command-line-argument >> -override LDFLAGS += -L/opt/local/lib -undefined dynamic_lookup >> -LD_SONAME_FLAGS=-install_name,$(LIBSO) >> endif >> >> ifeq ($(OS), Darwin) >> override CFLAGS += -I/opt/local/include >> override LDFLAGS += -L/opt/local/lib -undefined dynamic_lookup >> +LD_SONAME_FLAGS=-install_name,$(LIBSO) >> endif >> >> PCRE_LDFLAGS ?= -lpcre >> > > _______________________________________________ > Selinux mailing list > Selinux@tycho.nsa.gov > To unsubscribe, send email to Selinux-leave@tycho.nsa.gov. > To get help, send an email containing "help" to Selinux-request@tycho.nsa.gov.
On Tue, Nov 1, 2016 at 1:55 PM, Stephen Smalley <sds@tycho.nsa.gov> wrote: > On 11/01/2016 04:32 PM, William Roberts wrote: >> On Tue, Nov 1, 2016 at 1:32 PM, Stephen Smalley <sds@tycho.nsa.gov> wrote: >>> On 11/01/2016 04:23 PM, william.c.roberts@intel.com wrote: >>>> From: William Roberts <william.c.roberts@intel.com> >>>> >>>> As reported by Nicolas Iooss, the clang + linux build seems >>>> broken: >>>> >>>> clang-3.9: warning: argument unused during compilation: '-undefined >>>> dynamic_lookup' >>>> /usr/bin/ld: unrecognised option: -install_name >>>> clang-3.9: error: linker command failed with exit code 1 (use -v to >>>> see invocation) >>>> >>>> We already have those options set for Darwin, just drop them from the >>>> clang side. >>> >>> Thanks, applied. >> >> Did you check this with clang-3.9 locally and reproduce the error? > > Yes. I think casting to void* will clear it. That's what I was leaning towards myself.
On 11/01/2016 04:32 PM, William Roberts wrote: > On Tue, Nov 1, 2016 at 1:32 PM, Stephen Smalley <sds@tycho.nsa.gov> wrote: >> On 11/01/2016 04:23 PM, william.c.roberts@intel.com wrote: >>> From: William Roberts <william.c.roberts@intel.com> >>> >>> As reported by Nicolas Iooss, the clang + linux build seems >>> broken: >>> >>> clang-3.9: warning: argument unused during compilation: '-undefined >>> dynamic_lookup' >>> /usr/bin/ld: unrecognised option: -install_name >>> clang-3.9: error: linker command failed with exit code 1 (use -v to >>> see invocation) >>> >>> We already have those options set for Darwin, just drop them from the >>> clang side. >> >> Thanks, applied. > > Did you check this with clang-3.9 locally and reproduce the error? Yes. I think casting to void* will clear it.
On Tue, Nov 1, 2016 at 1:59 PM, Stephen Smalley <sds@tycho.nsa.gov> wrote: > On 11/01/2016 04:54 PM, William Roberts wrote: >> On Tue, Nov 1, 2016 at 1:55 PM, Stephen Smalley <sds@tycho.nsa.gov> wrote: >>> On 11/01/2016 04:32 PM, William Roberts wrote: >>>> On Tue, Nov 1, 2016 at 1:32 PM, Stephen Smalley <sds@tycho.nsa.gov> wrote: >>>>> On 11/01/2016 04:23 PM, william.c.roberts@intel.com wrote: >>>>>> From: William Roberts <william.c.roberts@intel.com> >>>>>> >>>>>> As reported by Nicolas Iooss, the clang + linux build seems >>>>>> broken: >>>>>> >>>>>> clang-3.9: warning: argument unused during compilation: '-undefined >>>>>> dynamic_lookup' >>>>>> /usr/bin/ld: unrecognised option: -install_name >>>>>> clang-3.9: error: linker command failed with exit code 1 (use -v to >>>>>> see invocation) >>>>>> >>>>>> We already have those options set for Darwin, just drop them from the >>>>>> clang side. >>>>> >>>>> Thanks, applied. >>>> >>>> Did you check this with clang-3.9 locally and reproduce the error? >>> >>> Yes. I think casting to void* will clear it. >> >> That's what I was leaning towards myself. > > Actually, if you just switch the parameter type for buf in both > functions to void*, everything is fine. > That's actually exactly what I have locally that I am testing.
On 11/01/2016 04:54 PM, William Roberts wrote: > On Tue, Nov 1, 2016 at 1:55 PM, Stephen Smalley <sds@tycho.nsa.gov> wrote: >> On 11/01/2016 04:32 PM, William Roberts wrote: >>> On Tue, Nov 1, 2016 at 1:32 PM, Stephen Smalley <sds@tycho.nsa.gov> wrote: >>>> On 11/01/2016 04:23 PM, william.c.roberts@intel.com wrote: >>>>> From: William Roberts <william.c.roberts@intel.com> >>>>> >>>>> As reported by Nicolas Iooss, the clang + linux build seems >>>>> broken: >>>>> >>>>> clang-3.9: warning: argument unused during compilation: '-undefined >>>>> dynamic_lookup' >>>>> /usr/bin/ld: unrecognised option: -install_name >>>>> clang-3.9: error: linker command failed with exit code 1 (use -v to >>>>> see invocation) >>>>> >>>>> We already have those options set for Darwin, just drop them from the >>>>> clang side. >>>> >>>> Thanks, applied. >>> >>> Did you check this with clang-3.9 locally and reproduce the error? >> >> Yes. I think casting to void* will clear it. > > That's what I was leaning towards myself. Actually, if you just switch the parameter type for buf in both functions to void*, everything is fine.
diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile index ae40f80..b92fe1c 100644 --- a/libselinux/src/Makefile +++ b/libselinux/src/Makefile @@ -73,13 +73,12 @@ override CFLAGS += -fipa-pure-const -Wlogical-op -Wpacked-bitfield-compat -Wsync -Wno-suggest-attribute=pure -Wno-suggest-attribute=const -Wp,-D_FORTIFY_SOURCE=2 else override CFLAGS += -Wunused-command-line-argument -override LDFLAGS += -L/opt/local/lib -undefined dynamic_lookup -LD_SONAME_FLAGS=-install_name,$(LIBSO) endif ifeq ($(OS), Darwin) override CFLAGS += -I/opt/local/include override LDFLAGS += -L/opt/local/lib -undefined dynamic_lookup +LD_SONAME_FLAGS=-install_name,$(LIBSO) endif PCRE_LDFLAGS ?= -lpcre