From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40823) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1US3Wq-0005oG-Tc for qemu-devel@nongnu.org; Tue, 16 Apr 2013 06:54:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1US3Wp-0001UO-Sb for qemu-devel@nongnu.org; Tue, 16 Apr 2013 06:54:24 -0400 Received: from mail-da0-x233.google.com ([2607:f8b0:400e:c00::233]:42007) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1US3Wp-0001Tt-9z for qemu-devel@nongnu.org; Tue, 16 Apr 2013 06:54:23 -0400 Received: by mail-da0-f51.google.com with SMTP id g27so197885dan.10 for ; Tue, 16 Apr 2013 03:54:19 -0700 (PDT) Message-ID: <516D2DD4.4030408@ozlabs.ru> Date: Tue, 16 Apr 2013 20:54:12 +1000 From: Alexey Kardashevskiy MIME-Version: 1.0 References: <1365993073-4659-1-git-send-email-aik@ozlabs.ru> <8761zofezy.fsf@blackfin.pond.sub.org> <516BA87A.2020107@ozlabs.ru> <874nf8cidj.fsf@blackfin.pond.sub.org> <516BCD71.9070905@ozlabs.ru> <516BDBFB.5070602@ozlabs.ru> <87vc7ovtnm.fsf@blackfin.pond.sub.org> <516BFAA7.1000208@ozlabs.ru> <87zjwzu6tl.fsf@blackfin.pond.sub.org> <516C83AE.9040800@ozlabs.ru> <516CC295.8010505@ozlabs.ru> <87r4ianc11.fsf@blackfin.pond.sub.org> <516D1859.5040703@redhat.com> In-Reply-To: <516D1859.5040703@redhat.com> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] pixman: remove -Wredundand-decls List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Peter Maydell , Markus Armbruster , qemu-devel@nongnu.org, Blue Swirl , Gerd Hoffmann , Stefan Hajnoczi , David Gibson On 04/16/2013 07:22 PM, Paolo Bonzini wrote: > Il 16/04/2013 09:57, Markus Armbruster ha scritto: >>> >>> I think this is just beautiful. Fedora18, x86_64, NO cross >>> compiler. gcc does not apply -Wredundant-decls to /usr/include/* but >>> does it for all other headers and in the case of cross compilation I >>> hit this case. > > '-Wsystem-headers' > Print warning messages for constructs found in system header files. > Warnings from system headers are normally suppressed, on the > assumption that they usually do not indicate real problems and > would only make the compiler output harder to read. > >>> Does anyone know the way to tell gcc that libc headers are not at >>> /usr/include but somewhere else? > > I think this helps: > > '--sysroot=DIR' > Use DIR as the logical root directory for headers and libraries. > For example, if the compiler normally searches for headers in > '/usr/include' and libraries in '/usr/lib', it instead searches > 'DIR/usr/include' and 'DIR/usr/lib'. > > but you shouldn't need it. Just configure your GCC with > --with-sysroot=/foo and it should just work. --sysroot helps for native compiler but does not for the cross compiler. Anyway, I tried Markus's patch, now assert.h generates just warnings which I can successfully suppress. Cool, thanks everyone :) -- Alexey