Roger Pau Monné
2011-Dec-22 17:03 UTC
Stubdom build problem in 4.1.2 but not in xen-unstable
Hello, I''ve found the following problem while building Xen 4.1.2 stubdoms: gcc -DCONFIG_QEMU -mno-red-zone -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -mno-red-zone -fno-reorder-blocks -fno-asynchronous-unwind-tables -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement -Wno-unused-but-set-variable -nopie -fno-stack-protector -fno-exceptions -fno-builtin -Wall -Werror -Wredundant-decls -Wno-format -Wno-redundant-decls -fno-stack-protector -fgnu89-inline -Wstrict-prototypes -Wnested-externs -Wpointer-arith -Winline -g -DGNT_DEBUG -DGNTMAP_DEBUG -D__INSIDE_MINIOS__ -m64 -mno-red-zone -fno-reorder-blocks -fno-asynchronous-unwind-tables -Os -fomit-frame-pointer -isystem /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/../extras/mini-os/include -D__MINIOS__ -DHAVE_LIBC -isystem /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/../extras/mini-os/include/posix -isystem /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/../tools/xenstore -isystem /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/../extras/mini-os/include/x86 -isystem /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/../extras/mini-os/include/x86/x86_64 -U __linux__ -U __FreeBSD__ -U __sun__ -nostdinc -isystem /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/../extras/mini-os/include/posix -isystem /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/cross-root-x86_64/x86_64-xen-elf/include -isystem /usr/lib/gcc/x86_64-alpine-linux-uclibc/4.6.2/include -isystem /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/lwip-x86_64/src/include -isystem /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/lwip-x86_64/src/include/ipv4 -I/home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/include -I/home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/../xen/include -isystem /home/royger/aports/testing/xen/src/xen-4.1.2/extras/mini-os/../../extras/mini-os/include -D__MINIOS__ -DHAVE_LIBC -isystem /home/royger/aports/testing/xen/src/xen-4.1.2/extras/mini-os/../../extras/mini-os/include/posix -isystem /home/royger/aports/testing/xen/src/xen-4.1.2/extras/mini-os/../../tools/xenstore -DHAVE_LWIP -isystem /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/lwip-x86_64/src/include -isystem /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/lwip-x86_64/src/include/ipv4 -D__XEN_INTERFACE_VERSION__=0x00030205 -isystem /home/royger/aports/testing/xen/src/xen-4.1.2/extras/mini-os/../../extras/mini-os/include/x86 -isystem /home/royger/aports/testing/xen/src/xen-4.1.2/extras/mini-os/../../extras/mini-os/include/x86/x86_64 -c console/xencons_ring.c -o /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/mini-os-x86_64-ioemu/console/xencons_ring.o console/xencons_ring.c: In function ''xencons_ring_send_no_notify'': console/xencons_ring.c:26:41: error: inlining failed in call to ''xencons_interface'': call is unlikely and code size would grow [-Werror=inline] console/xencons_ring.c:38:18: error: called from here [-Werror=inline] cc1: all warnings being treated as errors Although I can build xen-unstable without any problems on the same machine. I''ve been trying to find the patch that solved this on unstable, but so far I haven''t found it. Anyone know which patch fixed it? I would like to have it backported to xen-4.1. Info about the system: Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-alpine-linux-uclibc/4.6.2/lto-wrapper Target: x86_64-alpine-linux-uclibc Configured with: /home/buildozer/aports/main/gcc/src/gcc-4.6.2/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --build=x86_64-alpine-linux-uclibc --host=x86_64-alpine-linux-uclibc --target=x86_64-alpine-linux-uclibc --with-pkgversion=''Alpine 4.6.2-r1'' --disable-altivec --disable-checking --disable-fixed-point --disable-libssp --disable-libstdcxx-pch --disable-multilib --disable-nls --disable-werror --enable-__cxa_atexit --enable-cld --enable-esp --enable-cloog-backend --enable-languages=c,c++,objc,java,go --enable-shared --enable-target-optspace --enable-tls --enable-threads --with-dynamic-linker=ld64-uClibc.so.0.9.32 --with-dynamic-linker-prefix=/lib --with-system-zlib --without-system-libunwind Thread model: posix gcc version 4.6.2 (Alpine 4.6.2-r1) Thanks, Roger!
Jan Beulich
2011-Dec-23 08:29 UTC
Re: Stubdom build problem in 4.1.2 but not in xen-unstable
>>> On 22.12.11 at 18:03, Roger Pau Monné<roger.pau@entel.upc.edu> wrote: > Hello, > > I've found the following problem while building Xen 4.1.2 stubdoms: > > gcc -DCONFIG_QEMU -mno-red-zone -O1 -fno-omit-frame-pointer > -fno-optimize-sibling-calls -m64 -mno-red-zone -fno-reorder-blocks > -fno-asynchronous-unwind-tables -m64 -g -fno-strict-aliasing > -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value > -Wdeclaration-after-statement -Wno-unused-but-set-variable -nopie > -fno-stack-protector -fno-exceptions -fno-builtin -Wall -Werror > -Wredundant-decls -Wno-format -Wno-redundant-decls > -fno-stack-protector -fgnu89-inline -Wstrict-prototypes > -Wnested-externs -Wpointer-arith -Winline -g -DGNT_DEBUG > -DGNTMAP_DEBUG -D__INSIDE_MINIOS__ -m64 -mno-red-zone > -fno-reorder-blocks -fno-asynchronous-unwind-tables -Os > -fomit-frame-pointer -isystem > /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/../extras/mini-os/includ > e > -D__MINIOS__ -DHAVE_LIBC -isystem > /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/../extras/mini-os/includ > e/posix > -isystem > /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/../tools/xenstore > -isystem > /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/../extras/mini-os/inc > lude/x86 > -isystem > /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/../extras/mini-os/inc > lude/x86/x86_64 > -U __linux__ -U __FreeBSD__ -U __sun__ -nostdinc -isystem > /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/../extras/mini-os/includ > e/posix > -isystem > /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/cross-root-x86_64/x8 > 6_64-xen-elf/include > -isystem /usr/lib/gcc/x86_64-alpine-linux-uclibc/4.6.2/include > -isystem > /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/lwip-x86_64/src/inclu > de > -isystem > /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/lwip-x86_64/src/inclu > de/ipv4 > -I/home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/include > -I/home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/../xen/include > -isystem > /home/royger/aports/testing/xen/src/xen-4.1.2/extras/mini-os/../../extras/m > ini-os/include > -D__MINIOS__ -DHAVE_LIBC -isystem > /home/royger/aports/testing/xen/src/xen-4.1.2/extras/mini-os/../../extras/mini- > os/include/posix > -isystem > /home/royger/aports/testing/xen/src/xen-4.1.2/extras/mini-os/../../tools/xe > nstore > -DHAVE_LWIP -isystem > /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/lwip-x86_64/src/include > -isystem > /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/lwip-x86_64/src/inclu > de/ipv4 > -D__XEN_INTERFACE_VERSION__=0x00030205 -isystem > /home/royger/aports/testing/xen/src/xen-4.1.2/extras/mini-os/../../extras/mini- > os/include/x86 > -isystem > /home/royger/aports/testing/xen/src/xen-4.1.2/extras/mini-os/../../extras/m > ini-os/include/x86/x86_64 > -c console/xencons_ring.c -o > /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/mini-os-x86_64-ioemu/conso > le/xencons_ring.o > console/xencons_ring.c: In function 'xencons_ring_send_no_notify': > console/xencons_ring.c:26:41: error: inlining failed in call to > 'xencons_interface': call is unlikely and code size would grow > [-Werror=inline] > console/xencons_ring.c:38:18: error: called from here [-Werror=inline] > cc1: all warnings being treated as errors > > Although I can build xen-unstable without any problems on the same > machine. I've been trying to find the patch that solved this on > unstable, but so far I haven't found it. Anyone know which patch fixed > it? I would like to have it backported to xen-4.1.It may well be that there is no such changeset, but the compiler just decides to evaluate the likelihoods differently. I'm assuming that the build problem would go away by removing -Winline from extras/mini-os/minios.mk:DEF_CFLAGS (which is questionable in conjunction with the -Werror forced there too - a more reasonably approach would seem to be -Winline -Wno-error=inline, apparently available since gcc 4.2.x). Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Roger Pau Monné
2011-Dec-23 08:39 UTC
Re: Stubdom build problem in 4.1.2 but not in xen-unstable
2011/12/23 Jan Beulich <JBeulich@suse.com>:>>>> On 22.12.11 at 18:03, Roger Pau Monné<roger.pau@entel.upc.edu> wrote: >> Hello, >> >> I've found the following problem while building Xen 4.1.2 stubdoms: >> >> gcc -DCONFIG_QEMU -mno-red-zone -O1 -fno-omit-frame-pointer >> -fno-optimize-sibling-calls -m64 -mno-red-zone -fno-reorder-blocks >> -fno-asynchronous-unwind-tables -m64 -g -fno-strict-aliasing >> -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value >> -Wdeclaration-after-statement -Wno-unused-but-set-variable -nopie >> -fno-stack-protector -fno-exceptions -fno-builtin -Wall -Werror >> -Wredundant-decls -Wno-format -Wno-redundant-decls >> -fno-stack-protector -fgnu89-inline -Wstrict-prototypes >> -Wnested-externs -Wpointer-arith -Winline -g -DGNT_DEBUG >> -DGNTMAP_DEBUG -D__INSIDE_MINIOS__ -m64 -mno-red-zone >> -fno-reorder-blocks -fno-asynchronous-unwind-tables -Os >> -fomit-frame-pointer -isystem >> /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/../extras/mini-os/includ >> e >> -D__MINIOS__ -DHAVE_LIBC -isystem >> /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/../extras/mini-os/includ >> e/posix >> -isystem >> /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/../tools/xenstore >> -isystem >> /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/../extras/mini-os/inc >> lude/x86 >> -isystem >> /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/../extras/mini-os/inc >> lude/x86/x86_64 >> -U __linux__ -U __FreeBSD__ -U __sun__ -nostdinc -isystem >> /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/../extras/mini-os/includ >> e/posix >> -isystem >> /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/cross-root-x86_64/x8 >> 6_64-xen-elf/include >> -isystem /usr/lib/gcc/x86_64-alpine-linux-uclibc/4.6.2/include >> -isystem >> /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/lwip-x86_64/src/inclu >> de >> -isystem >> /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/lwip-x86_64/src/inclu >> de/ipv4 >> -I/home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/include >> -I/home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/../xen/include >> -isystem >> /home/royger/aports/testing/xen/src/xen-4.1.2/extras/mini-os/../../extras/m >> ini-os/include >> -D__MINIOS__ -DHAVE_LIBC -isystem >> /home/royger/aports/testing/xen/src/xen-4.1.2/extras/mini-os/../../extras/mini- >> os/include/posix >> -isystem >> /home/royger/aports/testing/xen/src/xen-4.1.2/extras/mini-os/../../tools/xe >> nstore >> -DHAVE_LWIP -isystem >> /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/lwip-x86_64/src/include >> -isystem >> /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/lwip-x86_64/src/inclu >> de/ipv4 >> -D__XEN_INTERFACE_VERSION__=0x00030205 -isystem >> /home/royger/aports/testing/xen/src/xen-4.1.2/extras/mini-os/../../extras/mini- >> os/include/x86 >> -isystem >> /home/royger/aports/testing/xen/src/xen-4.1.2/extras/mini-os/../../extras/m >> ini-os/include/x86/x86_64 >> -c console/xencons_ring.c -o >> /home/royger/aports/testing/xen/src/xen-4.1.2/stubdom/mini-os-x86_64-ioemu/conso >> le/xencons_ring.o >> console/xencons_ring.c: In function 'xencons_ring_send_no_notify': >> console/xencons_ring.c:26:41: error: inlining failed in call to >> 'xencons_interface': call is unlikely and code size would grow >> [-Werror=inline] >> console/xencons_ring.c:38:18: error: called from here [-Werror=inline] >> cc1: all warnings being treated as errors >> >> Although I can build xen-unstable without any problems on the same >> machine. I've been trying to find the patch that solved this on >> unstable, but so far I haven't found it. Anyone know which patch fixed >> it? I would like to have it backported to xen-4.1. > > It may well be that there is no such changeset, but the compiler just > decides to evaluate the likelihoods differently. I'm assuming that the > build problem would go away by removing -Winline from > extras/mini-os/minios.mk:DEF_CFLAGS (which is questionable in > conjunction with the -Werror forced there too - a more reasonably > approach would seem to be -Winline -Wno-error=inline, apparently > available since gcc 4.2.x).I've ended up removing -Werror from all the Makefiles: find -name '*.mk' -o -name 'Make*' | xargs sed -i -e 's/-Werror//g' Not the prettiest solution but it works... _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Campbell
2011-Dec-23 09:25 UTC
Re: Stubdom build problem in 4.1.2 but not in xen-unstable
On Fri, 2011-12-23 at 08:29 +0000, Jan Beulich wrote:> >>> On 22.12.11 at 18:03, Roger Pau Monné<roger.pau@entel.upc.edu> wrote: > > console/xencons_ring.c: In function 'xencons_ring_send_no_notify': > > console/xencons_ring.c:26:41: error: inlining failed in call to > > 'xencons_interface': call is unlikely and code size would grow > > [-Werror=inline] > > console/xencons_ring.c:38:18: error: called from here [-Werror=inline] > > cc1: all warnings being treated as errors > > > > Although I can build xen-unstable without any problems on the same > > machine. I've been trying to find the patch that solved this on > > unstable, but so far I haven't found it. Anyone know which patch fixed > > it? I would like to have it backported to xen-4.1. > > It may well be that there is no such changeset, but the compiler just > decides to evaluate the likelihoods differently. I'm assuming that the > build problem would go away by removing -Winline from > extras/mini-os/minios.mk:DEF_CFLAGS (which is questionable in > conjunction with the -Werror forced there too - a more reasonably > approach would seem to be -Winline -Wno-error=inline, apparently > available since gcc 4.2.x).Although in this specific case (and likely in many cases) the use of inline on xencons_interface seems unnecessary -- lets just leave it up to the compiler. I thought "inline" was just a hint so it seems odd that gcc would error out. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jan Beulich
2011-Dec-23 09:32 UTC
Re: Stubdom build problem in 4.1.2 but not in xen-unstable
>>> On 23.12.11 at 10:25, Ian Campbell <Ian.Campbell@citrix.com> wrote: > I thought "inline" was just a hint so it seems odd that gcc would error > out.That''s what -Winline is for - to tell you that your intention to have a function inlined wasn''t fulfilled. If one asks for this warning, occasionally having the compiler emit it is the result. The question to me is what the purpose was to enable that warning in the first place. Jan
Ian Campbell
2011-Dec-23 09:43 UTC
Re: Stubdom build problem in 4.1.2 but not in xen-unstable
On Fri, 2011-12-23 at 09:32 +0000, Jan Beulich wrote:> >>> On 23.12.11 at 10:25, Ian Campbell <Ian.Campbell@citrix.com> wrote: > > I thought "inline" was just a hint so it seems odd that gcc would error > > out. > > That''s what -Winline is for - to tell you that your intention to have a > function inlined wasn''t fulfilled. If one asks for this warning, > occasionally having the compiler emit it is the result. The question to > me is what the purpose was to enable that warning in the first place.It seems to be only extras/mini-os which uses it and it came from the first changeset, copy Samuel in case he remembers why. Whatever the reason this specific instance is surely not worth force inlining. Linux uses __attribute__((always_inline)) and various similar constructs, presumably to work around varying behaviours across gcc''s. Ian.
Samuel Thibault
2011-Dec-23 11:03 UTC
Re: Stubdom build problem in 4.1.2 but not in xen-unstable
Ian Campbell, le Fri 23 Dec 2011 09:43:17 +0000, a écrit :> On Fri, 2011-12-23 at 09:32 +0000, Jan Beulich wrote: > > >>> On 23.12.11 at 10:25, Ian Campbell <Ian.Campbell@citrix.com> wrote: > > > I thought "inline" was just a hint so it seems odd that gcc would error > > > out. > > > > That''s what -Winline is for - to tell you that your intention to have a > > function inlined wasn''t fulfilled. If one asks for this warning, > > occasionally having the compiler emit it is the result. The question to > > me is what the purpose was to enable that warning in the first place. > > It seems to be only extras/mini-os which uses it and it came from the > first changeset, copy Samuel in case he remembers why.Well, I didn''t even know Xen at the time :) Sun Jan 25 03:00:54 2004 From Kip Macy, we now are stricter when compiling the mini os. So I don''t think there is any particular reason, and it''s probably not worth the trouble keeping it. Samuel
Ian Campbell
2011-Dec-23 11:09 UTC
Re: Stubdom build problem in 4.1.2 but not in xen-unstable
On Fri, 2011-12-23 at 11:03 +0000, Samuel Thibault wrote:> Ian Campbell, le Fri 23 Dec 2011 09:43:17 +0000, a écrit : > > On Fri, 2011-12-23 at 09:32 +0000, Jan Beulich wrote: > > > >>> On 23.12.11 at 10:25, Ian Campbell <Ian.Campbell@citrix.com> wrote: > > > > I thought "inline" was just a hint so it seems odd that gcc would error > > > > out. > > > > > > That's what -Winline is for - to tell you that your intention to have a > > > function inlined wasn't fulfilled. If one asks for this warning, > > > occasionally having the compiler emit it is the result. The question to > > > me is what the purpose was to enable that warning in the first place. > > > > It seems to be only extras/mini-os which uses it and it came from the > > first changeset, copy Samuel in case he remembers why. > > Well, I didn't even know Xen at the time :)Sorry, I forgot that stubdoms != minios.> > Sun Jan 25 03:00:54 2004 > From Kip Macy, we now are stricter when compiling the mini os. > > So I don't think there is any particular reason, and it's probably not > worth the trouble keeping it. > > Samuel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel