* [Qemu-devel] build error
@ 2008-01-07 11:27 Edgar E. Iglesias
2008-01-07 23:59 ` Rob Landley
0 siblings, 1 reply; 5+ messages in thread
From: Edgar E. Iglesias @ 2008-01-07 11:27 UTC (permalink / raw)
To: qemu-devel
Hello,
I needed this or similar to build recent qemu's with gcc-4.
Best regards
--
Edgar E. Iglesias
Axis Communications AB
diff --git a/linux-user/main.c b/linux-user/main.c
index e3a2374..164fdb9 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -53,7 +53,8 @@ asm(".globl __preinit_array_start\n"
"__init_array_end:\n"
"__fini_array_start:\n"
"__fini_array_end:\n"
- ".long 0\n");
+ ".long 0\n"
+ ".previous\n");
#endif
/* XXX: on x86 MAP_GROWSDOWN only works if ESP <= address + 32, so
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] build error
2008-01-07 11:27 [Qemu-devel] build error Edgar E. Iglesias
@ 2008-01-07 23:59 ` Rob Landley
2008-01-08 10:42 ` Edgar E. Iglesias
2008-01-08 14:43 ` Andreas Färber
0 siblings, 2 replies; 5+ messages in thread
From: Rob Landley @ 2008-01-07 23:59 UTC (permalink / raw)
To: qemu-devel; +Cc: Edgar E. Iglesias
On Monday 07 January 2008 05:27:19 Edgar E. Iglesias wrote:
> Hello,
>
> I needed this or similar to build recent qemu's with gcc-4.
>
> Best regards
Is that all you needed, and did the result work?
The 0.9.1 build I did yesterday grabbed gcc 3.4 during the ./configure stage,
which is only installed for qemu...
Rob
--
"One of my most productive days was throwing away 1000 lines of code."
- Ken Thompson.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] build error
2008-01-07 23:59 ` Rob Landley
@ 2008-01-08 10:42 ` Edgar E. Iglesias
2008-01-08 14:43 ` Andreas Färber
1 sibling, 0 replies; 5+ messages in thread
From: Edgar E. Iglesias @ 2008-01-08 10:42 UTC (permalink / raw)
To: Rob Landley, qemu-devel
On Mon, Jan 07, 2008 at 05:59:24PM -0600, Rob Landley wrote:
> On Monday 07 January 2008 05:27:19 Edgar E. Iglesias wrote:
> > Hello,
> >
> > I needed this or similar to build recent qemu's with gcc-4.
> >
> > Best regards
>
> Is that all you needed, and did the result work?
>
> The 0.9.1 build I did yesterday grabbed gcc 3.4 during the ./configure stage,
> which is only installed for qemu...
I haven't done very extensive testing but the CRIS linux-user simulator builds and runs it's testsuite as expected. Maybe I'll run into trouble later...
# Configured with: ../qemu/configure --disable-gcc-check --target-list=cris-linux-user
% gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.1.2/work/gcc-4.1.2/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.1.2 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.2 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.2/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.2/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --disable-nls --with-system-zlib --disable-checking --disable-werror --enable-secureplt --disable-libunwind-exceptions --disable-multilib --enable-libmudflap --disable-libssp --disable-libgcj --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 4.1.2 (Gentoo 4.1.2)
% objdump -s -j .comment cris-linux-user/qemu-cris
cris-linux-user/qemu-cris: file format elf32-i386
Contents of section .comment:
0000 00474343 3a202847 4e552920 342e312e .GCC: (GNU) 4.1.
0010 32202847 656e746f 6f20342e 312e3229 2 (Gentoo 4.1.2)
0020 00004743 433a2028 474e5529 20342e31 ..GCC: (GNU) 4.1
....
Best regards
--
Edgar E. Iglesias
Axis Communications AB
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] build error
2008-01-07 23:59 ` Rob Landley
2008-01-08 10:42 ` Edgar E. Iglesias
@ 2008-01-08 14:43 ` Andreas Färber
2008-01-08 16:53 ` Edgar E. Iglesias
1 sibling, 1 reply; 5+ messages in thread
From: Andreas Färber @ 2008-01-08 14:43 UTC (permalink / raw)
To: qemu-devel; +Cc: Edgar E. Iglesias
Hello,
Am 08.01.2008 um 00:59 schrieb Rob Landley:
> On Monday 07 January 2008 05:27:19 Edgar E. Iglesias wrote:
>> I needed this or similar to build recent qemu's with gcc-4.
>>
> Is that all you needed, and did the result work?
For system emulation on OSX/ppc I only needed a fix for always_inline
(as suggested by Alexander Graf as part of his OSX x86_64 patch), then
sparc-softmmu compiles and runs fine for several hours on OSX Leopard.
It seems Leopard's system headers are incompatible with gcc-3.3, and
using a different -sdkroot does not work. So GCC4 is becoming a
necessity there, too (in addition to any OSX/i386).
Is there anything specific to watch out for with GCC4 at this time?
What does this ".previous" addition fix?
Andreas
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] build error
2008-01-08 14:43 ` Andreas Färber
@ 2008-01-08 16:53 ` Edgar E. Iglesias
0 siblings, 0 replies; 5+ messages in thread
From: Edgar E. Iglesias @ 2008-01-08 16:53 UTC (permalink / raw)
To: qemu-devel, Andreas Färber
On Tue, Jan 08, 2008 at 03:43:34PM +0100, Andreas Färber wrote:
> Hello,
>
> Am 08.01.2008 um 00:59 schrieb Rob Landley:
>
>> On Monday 07 January 2008 05:27:19 Edgar E. Iglesias wrote:
>>> I needed this or similar to build recent qemu's with gcc-4.
>>>
>> Is that all you needed, and did the result work?
>
> For system emulation on OSX/ppc I only needed a fix for always_inline (as
> suggested by Alexander Graf as part of his OSX x86_64 patch), then
> sparc-softmmu compiles and runs fine for several hours on OSX Leopard.
>
> It seems Leopard's system headers are incompatible with gcc-3.3, and using
> a different -sdkroot does not work. So GCC4 is becoming a necessity there,
> too (in addition to any OSX/i386).
>
> Is there anything specific to watch out for with GCC4 at this time? What
> does this ".previous" addition fix?
The workaround in linux-user/main.c for recent libc's switches the current section to .rodata but does not switch it back. The .previous makes sure it is restored to it's previous section.
It's not really gcc4 related but on my system gcc 4 failed while gcc-3.4.6 didn't.
Best regards
--
Edgar E. Iglesias
Axis Communications AB
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-01-08 14:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-07 11:27 [Qemu-devel] build error Edgar E. Iglesias
2008-01-07 23:59 ` Rob Landley
2008-01-08 10:42 ` Edgar E. Iglesias
2008-01-08 14:43 ` Andreas Färber
2008-01-08 16:53 ` Edgar E. Iglesias
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).