Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1465934

Re: [PATCH] tools lib: Reinstate strlcpy() header guard with __UCLIBC__

From Vineet Gupta <Vineet.Gupta1@synopsys.com>
Newsgroups linux.kernel
Subject Re: [PATCH] tools lib: Reinstate strlcpy() header guard with __UCLIBC__
Date 2016-08-19 04:50 +0200
Message-ID <s7ymB-28e-7@gated-at.bofh.it> (permalink)
References <s7fjY-5PV-7@gated-at.bofh.it> <s7wkQ-Sy-95@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 08/18/2016 07:07 AM, Arnaldo Carvalho de Melo wrote:
> Em Wed, Aug 17, 2016 at 01:00:50PM -0700, Vineet Gupta escreveu:
>> perf tools build in recent kernels spews splat when cross compiling with uClibc
>>
>> |   CC       util/alias.o
>> | In file included from tools/perf/util/../ui/../util/cache.h:8:0,
>> |                 from tools/perf/util/../ui/helpline.h:7,
>> |                 from tools/perf/util/debug.h:8,
>> |                 from arch/../util/cpumap.h:9,
>> |                 from arch/../util/env.h:5,
>> |                 from arch/common.h:4,
>> |                 from arch/common.c:3:
>> | tools/include/linux/string.h:12:15: warning: redundant redeclaration of ‘strlcpy’ [-Wredundant-decls]
>> |  extern size_t strlcpy(char *dest, const char *src, size_t size);
>>                ^
>> This is after commit 61a6445e463a31 ("tools lib: Guard the strlcpy() header with
>> __GLIBC__"). While the commit was right in theory, issue is uClibc also
>> defines __GLIBC__ for application headers.
>>
>> Instead of reverting the commit, manually revert with some addeed commentary to
>> same effect.
> 
> Well, you can't revert it, as this will make it break elsewhere.

Just curious, your last change to use ifdef GLIBC vs. ifndef UCLIBC was just a
preventive fix or was it addressing something reported.

> So
> please check if
> 
> #if defined(__GLIBC__) && !defined(__UCLIBC__)
> 
> suits uclibc.

Yes that works as well - I'll send a v2.

> Are you aware of any readily available tarball or docker image that has
> a uclibc based devel env that I could grab? I'd add it to my build setup
> to make sure I (and my downstreamers) don't break uclibc environments in
> the future.

A prebuilt toolchain would just suffice.

https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-2016.03/arc_gnu_2016.03_prebuilt_uclibc_le_archs_linux_install.tar.gz

Thx,
-Vineet

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] tools lib: Reinstate strlcpy() header guard with __UCLIBC__ Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-08-17 22:10 +0200
  Re: [PATCH] tools lib: Reinstate strlcpy() header guard with  __UCLIBC__ Arnaldo Carvalho de Melo <acme@redhat.com> - 2016-08-18 16:20 +0200
    Re: [PATCH] tools lib: Reinstate strlcpy() header guard with  __UCLIBC__ Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-08-18 18:30 +0200
    [PATCH v2] tools lib: Reinstate strlcpy() header guard with __UCLIBC__ Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-08-19 04:00 +0200
    Re: [PATCH] tools lib: Reinstate strlcpy() header guard with  __UCLIBC__ Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-08-19 04:50 +0200
      Re: [PATCH] tools lib: Reinstate strlcpy() header guard with  __UCLIBC__ Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-08-19 16:30 +0200
        Re: [PATCH] tools lib: Reinstate strlcpy() header guard with  __UCLIBC__ Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-08-19 20:10 +0200
          Re: [PATCH] tools lib: Reinstate strlcpy() header guard with  __UCLIBC__ Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-08-19 21:30 +0200
            Re: [PATCH] tools lib: Reinstate strlcpy() header guard with  __UCLIBC__ Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-08-19 22:20 +0200
            Re: [PATCH] tools lib: Reinstate strlcpy() header guard with  __UCLIBC__ Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-08-19 23:20 +0200
              Re: [PATCH] tools lib: Reinstate strlcpy() header guard with  __UCLIBC__ Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-08-19 23:30 +0200
                Re: [PATCH] tools lib: Reinstate strlcpy() header guard with  __UCLIBC__ Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-08-19 23:50 +0200
                Re: [PATCH] tools lib: Reinstate strlcpy() header guard with  __UCLIBC__ Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-08-20 01:10 +0200
                Re: [PATCH] tools lib: Reinstate strlcpy() header guard with  __UCLIBC__ Alexey Brodkin <Alexey.Brodkin@synopsys.com> - 2016-08-22 20:10 +0200
                Re: [PATCH] tools lib: Reinstate strlcpy() header guard with  __UCLIBC__ Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-08-22 20:10 +0200

csiph-web