* [PATCH] libselinux: fix compiler flags for linux + clang
@ 2016-11-01 20:23 william.c.roberts
2016-11-01 20:30 ` William Roberts
2016-11-01 20:32 ` Stephen Smalley
0 siblings, 2 replies; 8+ messages in thread
From: william.c.roberts @ 2016-11-01 20:23 UTC (permalink / raw)
To: nicolas.iooss, selinux; +Cc: sds, William Roberts
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] libselinux: fix compiler flags for linux + clang
2016-11-01 20:23 [PATCH] libselinux: fix compiler flags for linux + clang william.c.roberts
@ 2016-11-01 20:30 ` William Roberts
2016-11-01 20:32 ` Stephen Smalley
1 sibling, 0 replies; 8+ messages in thread
From: William Roberts @ 2016-11-01 20:30 UTC (permalink / raw)
To: William Roberts; +Cc: Nicolas Iooss, selinux, Stephen Smalley
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.
--
Respectfully,
William C Roberts
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] libselinux: fix compiler flags for linux + clang
2016-11-01 20:23 [PATCH] libselinux: fix compiler flags for linux + clang william.c.roberts
2016-11-01 20:30 ` William Roberts
@ 2016-11-01 20:32 ` Stephen Smalley
2016-11-01 20:32 ` William Roberts
1 sibling, 1 reply; 8+ messages in thread
From: Stephen Smalley @ 2016-11-01 20:32 UTC (permalink / raw)
To: william.c.roberts, nicolas.iooss, selinux
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
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] libselinux: fix compiler flags for linux + clang
2016-11-01 20:32 ` Stephen Smalley
@ 2016-11-01 20:32 ` William Roberts
2016-11-01 20:55 ` Stephen Smalley
0 siblings, 1 reply; 8+ messages in thread
From: William Roberts @ 2016-11-01 20:32 UTC (permalink / raw)
To: Stephen Smalley; +Cc: William Roberts, Nicolas Iooss, selinux
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.
--
Respectfully,
William C Roberts
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] libselinux: fix compiler flags for linux + clang
2016-11-01 20:55 ` Stephen Smalley
@ 2016-11-01 20:54 ` William Roberts
2016-11-01 20:59 ` Stephen Smalley
0 siblings, 1 reply; 8+ messages in thread
From: William Roberts @ 2016-11-01 20:54 UTC (permalink / raw)
To: Stephen Smalley; +Cc: William Roberts, Nicolas Iooss, selinux
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.
--
Respectfully,
William C Roberts
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] libselinux: fix compiler flags for linux + clang
2016-11-01 20:32 ` William Roberts
@ 2016-11-01 20:55 ` Stephen Smalley
2016-11-01 20:54 ` William Roberts
0 siblings, 1 reply; 8+ messages in thread
From: Stephen Smalley @ 2016-11-01 20:55 UTC (permalink / raw)
To: William Roberts; +Cc: William Roberts, Nicolas Iooss, selinux
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] libselinux: fix compiler flags for linux + clang
2016-11-01 20:59 ` Stephen Smalley
@ 2016-11-01 20:57 ` William Roberts
0 siblings, 0 replies; 8+ messages in thread
From: William Roberts @ 2016-11-01 20:57 UTC (permalink / raw)
To: Stephen Smalley; +Cc: selinux
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] libselinux: fix compiler flags for linux + clang
2016-11-01 20:54 ` William Roberts
@ 2016-11-01 20:59 ` Stephen Smalley
2016-11-01 20:57 ` William Roberts
0 siblings, 1 reply; 8+ messages in thread
From: Stephen Smalley @ 2016-11-01 20:59 UTC (permalink / raw)
To: William Roberts; +Cc: selinux
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-11-01 20:59 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-01 20:23 [PATCH] libselinux: fix compiler flags for linux + clang william.c.roberts
2016-11-01 20:30 ` William Roberts
2016-11-01 20:32 ` Stephen Smalley
2016-11-01 20:32 ` William Roberts
2016-11-01 20:55 ` Stephen Smalley
2016-11-01 20:54 ` William Roberts
2016-11-01 20:59 ` Stephen Smalley
2016-11-01 20:57 ` William Roberts
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.