All of lore.kernel.org
 help / color / mirror / Atom feed
* [uml-devel] Re: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC 3.3.3 similarities to 2.6.6!?
       [not found] <007701c44be9$e4d7d630$dd02a8c0@ferraro>
@ 2004-06-06 18:22 ` roland
  2004-06-06 20:04   ` uml
  0 siblings, 1 reply; 16+ messages in thread
From: roland @ 2004-06-06 18:22 UTC (permalink / raw)
  To: uml, uml-user; +Cc: user-mode-linux-devel

hi!
> As well, I encountered the same memory problems -- it wouldn't recognize
> more than 32M!
> 
> Can anyone else confirm?  (Roland?)
i can at least confirm that 2.4 uml kernel has O1/O2 compile issues too -
got the same hang at "Init 3...." on suse9/9.1 as in 2.6.6.

afaik, these symptoms are known "compile issues":
- hang after "Checking for /proc/mm..." 
- hang after "Init...."
- command line options not being recognized (mem is no more than 32M,umid 
  not being recognized....)
- terminal being unusable after shutdown/halt - needs "reset"
- uml processes left running after shutdown/halt
- further...?

as -O2 Options break down  into:

-fforce-mem  -foptimize-sibling-calls  -fstrength-reduce 
-fcse-follow-jumps  -fcse-skip-blocks  -frerun-cse-after-loop 
-frerun-loop-opt -fgcse  -fgcse-lm  -fgcse-sm 
-fdelete-null-pointer-checks  -fexpensive-optimizations  -fregmov 
-fschedule-insns  -fschedule-insns2  -fsched-interblock  -fsched-spec 
-fcaller-saves  -fpeephole2  -freorder-blocks  -freorder-functions 
-fstrict-aliasing  -falign-functions  -falign-jumps  -falign-loops 
-falign-labels

just someone needs to dig into that, which of these optimizations result in a 
"corrupt" uml binary. maybe it's only one - maybe several ones.
does someone have a compile farm to "trial and error" this very quickly ? ;)

regards
roland


----- Original Message ----- 
From: "uml" <uml@dot1q.net>
To: "uml-user" <user-mode-linux-user@lists.sourceforge.net>
Sent: Sunday, June 06, 2004 7:15 PM
Subject: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC 3.3.3 similarities to 2.6.6!?


> For the sake of discussion/argument/curiosity, I decided to compile 2.4.26
> on SuSE9.1 with a slackware root_fs (9.1)...
> 
> Guess what I encountered that was similar to the 2.6.6 kernel compilation??
> 
> I had to replace every instance of -O2 with -O1 in order for it to run.  I
> am beginning to question the compiler rather than  UML now.  I'm using GCC
> 3.3.3 (default).
> 
> As well, I encountered the same memory problems -- it wouldn't recognize
> more than 32M!
> 
> Can anyone else confirm?  (Roland?)
> 
> The host is SMP, but UML is NOT compiled for SMP support.
> 
> Here's the total procedure I used:
> ---8<---
> #!/bin/sh
> cd /tmp
> wget http://www.kernel.org/pub/linux/kernel/v2.4/linux-2.4.26.tar.bz2
> wget
> http://umn.dl.sourceforge.net/sourceforge/user-mode-linux/uml-patch-2.4.26-1.bz2
> tar -xjvf linux-2.4.26.tar.bz2
> cd linux-2.4.26
> bzcat /tmp/uml-patch-2.4.26-1.bz2 | patch -p1
> make menuconfig ARCH=um  [turn on COW support -- but that's the only change
> from default!]
> perl -e 's/-O2/-O1/gi' -p -i.bak Makefile arch/um/Makefile
> make linux modules ARCH=um
> strip linux
> cp linux ../linux-2.4.26
> cd ..
> ./linux-2.4.26 ubd0=slack91.cow,slack91.img mem=128M eth0=tuntap,tap2
> umid=slack91test
> ---8<---
> 
> Without the 'perl -e 's/-O2/-O1/gi' -p -i.bak Makefile arch/um/Makefile'
> substitutions, it will compile, but I experience the same issues I do with
> 2.6.6.
> 
> Ideas?
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by the new InstallShield X.
> From Windows to Linux, servers to mobile, InstallShield X is the one
> installation-authoring solution that does it all. Learn more and
> evaluate today! http://www.installshield.com/Dev2Dev/0504
> _______________________________________________
> User-mode-linux-user mailing list
> User-mode-linux-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user
> 


-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [uml-devel] Re: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC 3.3.3 similarities to 2.6.6!?
@ 2004-06-06 18:54 roland
  2004-06-06 21:33 ` uml
  0 siblings, 1 reply; 16+ messages in thread
From: roland @ 2004-06-06 18:54 UTC (permalink / raw)
  To: uml, uml-user; +Cc: user-mode-linux-devel, Jeff Dike, blaisorblade_spam

answering myself:

via google i found:
>Two different xterms emulators dumping core ... I'd be concerned a
>wee bit. One note, do not compile with excessive optimizations and
>especially -fschedule-insns and -fschedule-insns2 is the right way  <- !!!
>to produce faulty code with all gcc / egcs releases since 2.8.0     <- !!!
>on I86 machines. Not that it would make much sense with a terminal
>emulator anyway, but even so.

and:
>linked to the Pentium Pro Blas single processor library. If -fschedule-insns 
>is included four examples - 06, 07, 09 and 30 fail, 06 and 09 with segmentation  <-- !!! 
>fault and 09 and 30 with a message that "SCALAR MECHINES SHOULD NOT CALL JKGNMV". 
>The performance is sometimes better and sometimes worse over the 31 examples, but 
>these are really too small for a proper bennch mark. 

and:
> ..so I guess the problem is not the classic --fschedule-insns bug.

and:
http://www.linux-mips.org/archives/linux-mips/2004-03/msg00032.html

could please someone try putting -fno-schedule-insns (and maybe -fno-schedule-insns2)
into the Makefile(s) and try again ?

regards
roland


----- Original Message ----- 
From: "roland" <for_spam@gmx.de>
To: "uml" <uml@dot1q.net>; "uml-user" <user-mode-linux-user@lists.sourceforge.net>
Cc: <user-mode-linux-devel@lists.sourceforge.net>
Sent: Sunday, June 06, 2004 8:22 PM
Subject: Re: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC 3.3.3 similarities to 2.6.6!?


> hi!
> > As well, I encountered the same memory problems -- it wouldn't recognize
> > more than 32M!
> > 
> > Can anyone else confirm?  (Roland?)
> i can at least confirm that 2.4 uml kernel has O1/O2 compile issues too -
> got the same hang at "Init 3...." on suse9/9.1 as in 2.6.6.
> 
> afaik, these symptoms are known "compile issues":
> - hang after "Checking for /proc/mm..." 
> - hang after "Init...."
> - command line options not being recognized (mem is no more than 32M,umid 
>   not being recognized....)
> - terminal being unusable after shutdown/halt - needs "reset"
> - uml processes left running after shutdown/halt
> - further...?
> 
> as -O2 Options break down  into:
> 
> -fforce-mem  -foptimize-sibling-calls  -fstrength-reduce 
> -fcse-follow-jumps  -fcse-skip-blocks  -frerun-cse-after-loop 
> -frerun-loop-opt -fgcse  -fgcse-lm  -fgcse-sm 
> -fdelete-null-pointer-checks  -fexpensive-optimizations  -fregmov 
> -fschedule-insns  -fschedule-insns2  -fsched-interblock  -fsched-spec 
> -fcaller-saves  -fpeephole2  -freorder-blocks  -freorder-functions 
> -fstrict-aliasing  -falign-functions  -falign-jumps  -falign-loops 
> -falign-labels
> 
> just someone needs to dig into that, which of these optimizations result in a 
> "corrupt" uml binary. maybe it's only one - maybe several ones.
> does someone have a compile farm to "trial and error" this very quickly ? ;)
> 
> regards
> roland
> 
> 
> ----- Original Message ----- 
> From: "uml" <uml@dot1q.net>
> To: "uml-user" <user-mode-linux-user@lists.sourceforge.net>
> Sent: Sunday, June 06, 2004 7:15 PM
> Subject: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC 3.3.3 similarities to 2.6.6!?
> 
> 
> > For the sake of discussion/argument/curiosity, I decided to compile 2.4.26
> > on SuSE9.1 with a slackware root_fs (9.1)...
> > 
> > Guess what I encountered that was similar to the 2.6.6 kernel compilation??
> > 
> > I had to replace every instance of -O2 with -O1 in order for it to run.  I
> > am beginning to question the compiler rather than  UML now.  I'm using GCC
> > 3.3.3 (default).
> > 
> > As well, I encountered the same memory problems -- it wouldn't recognize
> > more than 32M!
> > 
> > Can anyone else confirm?  (Roland?)
> > 
> > The host is SMP, but UML is NOT compiled for SMP support.
> > 
> > Here's the total procedure I used:
> > ---8<---
> > #!/bin/sh
> > cd /tmp
> > wget http://www.kernel.org/pub/linux/kernel/v2.4/linux-2.4.26.tar.bz2
> > wget
> > http://umn.dl.sourceforge.net/sourceforge/user-mode-linux/uml-patch-2.4.26-1.bz2
> > tar -xjvf linux-2.4.26.tar.bz2
> > cd linux-2.4.26
> > bzcat /tmp/uml-patch-2.4.26-1.bz2 | patch -p1
> > make menuconfig ARCH=um  [turn on COW support -- but that's the only change
> > from default!]
> > perl -e 's/-O2/-O1/gi' -p -i.bak Makefile arch/um/Makefile
> > make linux modules ARCH=um
> > strip linux
> > cp linux ../linux-2.4.26
> > cd ..
> > ./linux-2.4.26 ubd0=slack91.cow,slack91.img mem=128M eth0=tuntap,tap2
> > umid=slack91test
> > ---8<---
> > 
> > Without the 'perl -e 's/-O2/-O1/gi' -p -i.bak Makefile arch/um/Makefile'
> > substitutions, it will compile, but I experience the same issues I do with
> > 2.6.6.
> > 
> > Ideas?
> > 
> > 
> > 
> > -------------------------------------------------------
> > This SF.Net email is sponsored by the new InstallShield X.
> > From Windows to Linux, servers to mobile, InstallShield X is the one
> > installation-authoring solution that does it all. Learn more and
> > evaluate today! http://www.installshield.com/Dev2Dev/0504
> > _______________________________________________
> > User-mode-linux-user mailing list
> > User-mode-linux-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user
> >


-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [uml-devel] Re: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC 3.3.3 similarities to 2.6.6!?
  2004-06-06 18:22 ` roland
@ 2004-06-06 20:04   ` uml
  0 siblings, 0 replies; 16+ messages in thread
From: uml @ 2004-06-06 20:04 UTC (permalink / raw)
  To: uml-user; +Cc: user-mode-linux-devel

I did this a while back... here's what I gleaned at that point:

---8<---
here's the modification I made to both the root Makefile and
arch/um/Makefile that caused it not to compile, the others may have
triggered a few complaints, but still worked -- I've no idea why -O2 didn't
generate this error upon compilation, nor why -fschedule-insns2 doesn't
generate it as I'm no kernel or C expert.

:%s/-O2/-O1 -fschedule-insns/g  (vi substitution regex)

---8<---
  HOSTCC  scripts/sumversion.o
scripts/sumversion.c: In function `parse_source_files':
scripts/sumversion.c:405: error: unable to find a register to spill in class
`AREG'
scripts/sumversion.c:405: error: this is the insn:
(insn:HI 280 279 294 16 0x4049e0b0 (parallel [
            (set (reg:SI 2 ecx [118])
                (unspec:SI [
                        (mem:BLK (reg/v/f:SI 64 [ dir ]) [0 A8])
                        (reg:QI 103)
                        (const_int 1 [0x1])
                        (reg:SI 102)
                    ] 20))
            (use (reg:SI 19 dirflag))
            (clobber (reg/f:SI 5 edi [orig:120 dir ] [120]))
            (clobber (reg:CC 17 flags))
        ]) 473 {strlenqi_1} (insn_list 279 (insn_list:REG_DEP_ANTI 271
(nil)))
    (expr_list:REG_DEAD (reg:SI 19 dirflag)
        (expr_list:REG_UNUSED (reg:CC 17 flags)
            (expr_list:REG_UNUSED (reg/f:SI 5 edi [orig:120 dir ] [120])
                (expr_list:REG_EQUAL (unspec:SI [
                            (mem:BLK (reg/v/f:SI 64 [ dir ]) [0 A8])
                            (reg:QI 103)
                            (const_int 1 [0x1])
                            (reg:SI 102)
                        ] 20)
                    (nil))))))
scripts/sumversion.c:405: confused by earlier errors, bailing out
make[1]: *** [scripts/sumversion.o] Error 1
make: *** [scripts] Error 2
---8<---

Here's the line I used elsewhere that worked: (vi substitution regex)
:%s/-O2/-O1 -fforce-mem -foptimize-sibling-calls -fstrength-reduce -fcse-fol
low-jumps -fcse-skip-blocks -frerun-cse-after-loop -frerun-loop-opt -fgcse -
fgcse-lm -fgcse-sm -fdelete-null-pointer-checks -fexpensive-optimizations -f
regmove -fschedule-insns2 -fsched-interblock -fsched-spec -fcaller-saves -fp
eephole2 -freorder-blocks -freorder-functions -fstrict-aliasing -falign-func
tions -falign-jumps -falign-loops -falign-labels/g

I don't know what to make of this, but if you want to compile with nearly
all of the O2 options, you can just leave that one out I believe, YMMV.

---8<---

----- Original Message ----- 
From: "roland" <for_spam@gmx.de>
To: "uml" <uml@dot1q.net>; "uml-user"
<user-mode-linux-user@lists.sourceforge.net>
Cc: <user-mode-linux-devel@lists.sourceforge.net>
Sent: Sunday, June 06, 2004 2.22 PM
Subject: Re: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC 3.3.3
similarities to 2.6.6!?


> hi!
> > As well, I encountered the same memory problems -- it wouldn't recognize
> > more than 32M!
> >
> > Can anyone else confirm?  (Roland?)
> i can at least confirm that 2.4 uml kernel has O1/O2 compile issues too -
> got the same hang at "Init 3...." on suse9/9.1 as in 2.6.6.
>
> afaik, these symptoms are known "compile issues":
> - hang after "Checking for /proc/mm..."
> - hang after "Init...."
> - command line options not being recognized (mem is no more than 32M,umid
>   not being recognized....)
> - terminal being unusable after shutdown/halt - needs "reset"
> - uml processes left running after shutdown/halt
> - further...?
>
> as -O2 Options break down  into:
>
> -fforce-mem  -foptimize-sibling-calls  -fstrength-reduce
> -fcse-follow-jumps  -fcse-skip-blocks  -frerun-cse-after-loop
> -frerun-loop-opt -fgcse  -fgcse-lm  -fgcse-sm
> -fdelete-null-pointer-checks  -fexpensive-optimizations  -fregmov
> -fschedule-insns  -fschedule-insns2  -fsched-interblock  -fsched-spec
> -fcaller-saves  -fpeephole2  -freorder-blocks  -freorder-functions
> -fstrict-aliasing  -falign-functions  -falign-jumps  -falign-loops
> -falign-labels
>
> just someone needs to dig into that, which of these optimizations result
in a
> "corrupt" uml binary. maybe it's only one - maybe several ones.
> does someone have a compile farm to "trial and error" this very quickly ?
;)
>
> regards
> roland
>
>
> ----- Original Message ----- 
> From: "uml" <uml@dot1q.net>
> To: "uml-user" <user-mode-linux-user@lists.sourceforge.net>
> Sent: Sunday, June 06, 2004 7:15 PM
> Subject: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC 3.3.3 similarities
to 2.6.6!?
>
>
> > For the sake of discussion/argument/curiosity, I decided to compile
2.4.26
> > on SuSE9.1 with a slackware root_fs (9.1)...
> >
> > Guess what I encountered that was similar to the 2.6.6 kernel
compilation??
> >
> > I had to replace every instance of -O2 with -O1 in order for it to run.
I
> > am beginning to question the compiler rather than  UML now.  I'm using
GCC
> > 3.3.3 (default).
> >
> > As well, I encountered the same memory problems -- it wouldn't recognize
> > more than 32M!
> >
> > Can anyone else confirm?  (Roland?)
> >
> > The host is SMP, but UML is NOT compiled for SMP support.
> >
> > Here's the total procedure I used:
> > ---8<---
> > #!/bin/sh
> > cd /tmp
> > wget http://www.kernel.org/pub/linux/kernel/v2.4/linux-2.4.26.tar.bz2
> > wget
> >
http://umn.dl.sourceforge.net/sourceforge/user-mode-linux/uml-patch-2.4.26-1.bz2
> > tar -xjvf linux-2.4.26.tar.bz2
> > cd linux-2.4.26
> > bzcat /tmp/uml-patch-2.4.26-1.bz2 | patch -p1
> > make menuconfig ARCH=um  [turn on COW support -- but that's the only
change
> > from default!]
> > perl -e 's/-O2/-O1/gi' -p -i.bak Makefile arch/um/Makefile
> > make linux modules ARCH=um
> > strip linux
> > cp linux ../linux-2.4.26
> > cd ..
> > ./linux-2.4.26 ubd0=slack91.cow,slack91.img mem=128M eth0=tuntap,tap2
> > umid=slack91test
> > ---8<---
> >
> > Without the 'perl -e 's/-O2/-O1/gi' -p -i.bak Makefile arch/um/Makefile'
> > substitutions, it will compile, but I experience the same issues I do
with
> > 2.6.6.
> >
> > Ideas?
> >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by the new InstallShield X.
> > From Windows to Linux, servers to mobile, InstallShield X is the one
> > installation-authoring solution that does it all. Learn more and
> > evaluate today! http://www.installshield.com/Dev2Dev/0504
> > _______________________________________________
> > User-mode-linux-user mailing list
> > User-mode-linux-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user
> >
>



-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [uml-devel] Re: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC 3.3.3 similarities to 2.6.6!?
  2004-06-06 18:54 [uml-devel] Re: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC 3.3.3 similarities to 2.6.6!? roland
@ 2004-06-06 21:33 ` uml
  2004-06-07  3:37   ` uml
  0 siblings, 1 reply; 16+ messages in thread
From: uml @ 2004-06-06 21:33 UTC (permalink / raw)
  To: uml-user; +Cc: user-mode-linux-devel

> answering myself:
>
> via google i found:
> >Two different xterms emulators dumping core ... I'd be concerned a
> >wee bit. One note, do not compile with excessive optimizations and
> >especially -fschedule-insns and -fschedule-insns2 is the right way  <-
!!!
> >to produce faulty code with all gcc / egcs releases since 2.8.0     <-
!!!
> >on I86 machines. Not that it would make much sense with a terminal
> >emulator anyway, but even so.
>
> and:
> >linked to the Pentium Pro Blas single processor library.
If -fschedule-insns
> >is included four examples - 06, 07, 09 and 30 fail, 06 and 09 with
segmentation  <-- !!!
> >fault and 09 and 30 with a message that "SCALAR MECHINES SHOULD NOT CALL
JKGNMV".
> >The performance is sometimes better and sometimes worse over the 31
examples, but
> >these are really too small for a proper bennch mark.
>
> and:
> > ..so I guess the problem is not the classic --fschedule-insns bug.
That's the option I found several weeks ago that gave me issues.

> and:
> http://www.linux-mips.org/archives/linux-mips/2004-03/msg00032.html
>
> could please someone try putting -fno-schedule-insns (and
maybe -fno-schedule-insns2)
> into the Makefile(s) and try again ?
I'm having issues with at least -fno-schedule-insns -- where in the
arch/um/Makefile do I make the change as well (or do I?)


So I tried the following combos:
perl -e 's/-O2/-O2 -fno-schedule-insns/g' -p -i.bak Makefile
arch/um/Makefile
perl -e 's/-O2/-O2 -fno-schedule-insns2/g' -p -i.bak Makefile
arch/um/Makefile
perl -e 's/-O2/-O2 -fno-schedule-insns -fno-schedule-insns2/g' -p -i.bak
Makefile arch/um/Makefile

No dice on any of them.

I don't believe there is a -O2 in arch/um/Makefile as there is in 2.6.6 -- 
should I make a change to the CFLAGS there?



-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [uml-devel] Re: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC 3.3.3 similarities to 2.6.6!?
  2004-06-06 21:33 ` uml
@ 2004-06-07  3:37   ` uml
  2004-06-13 21:58     ` Nix
  0 siblings, 1 reply; 16+ messages in thread
From: uml @ 2004-06-07  3:37 UTC (permalink / raw)
  To: uml-user; +Cc: user-mode-linux-devel

After much testing and compiling, I have some results.

These optimizations cause problems, ranging from memory not being correctly
passed, to the UMID not being recognized to the console being unusable
(until reset), to just failure to boot:
-fgcse
-fgcse-lm
-fgcse-sm
-fschedule-insns
-fschedule-insns2

---8<---
Switch differences between -O1 and -O2 on GCC 3.3.3:
-fforce-mem
-foptimize-sibling-calls
-fstrength-reduce
-fcse-follow-jumps
-fcse-skip-blocks
-frerun-cse-after-loop
-frerun-loop-opt
-fgcse
-fgcse-lm
-fgcse-sm
-fdelete-null-pointer-checks
-fexpensive-optimizations
-fregmove
-fschedule-insns
-fschedule-insns2
-fsched-interblock
-fsched-spec
-fcaller-saves
-fpeephole2
-freorder-blocks
-freorder-functions
-fstrict-aliasing
-falign-functions
-falign-jumps
-falign-loops
-falign-labels

---8<---
-fforce-mem -foptimize-sibling-calls -fstrength-reduce -fcse-follow-jumps -f
cse-skip-blocks -frerun-cse-after-loop -frerun-loop-opt -fexpensive-optimiza
tions -fregmove -fsched-interblock -fsched-spec -fcaller-saves -fpeephole2 -
freorder-blocks -freorder-functions -fstrict-aliasing -falign-functions -fal
ign-jumps -falign-loops -falign-labels -fgcse -fgcse-lm -fgcse-sm
RESULT: Hangs on 'Mounted devfs on /dev'; killall -9 linux-2.4.26; reset;

-fforce-mem -foptimize-sibling-calls -fstrength-reduce -fcse-follow-jumps -f
cse-skip-blocks -frerun-cse-after-loop -frerun-loop-opt -fexpensive-optimiza
tions -fregmove -fsched-interblock -fsched-spec -fcaller-saves -fpeephole2 -
freorder-blocks -freorder-functions -fstrict-aliasing -falign-functions -fal
ign-jumps -falign-loops -falign-labels -fschedule-insns -fschedule-insns2
RESULT: Hangs on 'Mounted devfs on /dev'; killall -9 linux-2.4.26; reset;
---8<---

Perhaps someone can refine this?

----- Original Message ----- 
From: "uml" <uml@dot1q.net>
To: "uml-user" <user-mode-linux-user@lists.sourceforge.net>
Cc: <user-mode-linux-devel@lists.sourceforge.net>
Sent: Sunday, June 06, 2004 5.33 PM
Subject: Re: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC 3.3.3
similarities to 2.6.6!?


> > answering myself:
> >
> > via google i found:
> > >Two different xterms emulators dumping core ... I'd be concerned a
> > >wee bit. One note, do not compile with excessive optimizations and
> > >especially -fschedule-insns and -fschedule-insns2 is the right way  <-
> !!!
> > >to produce faulty code with all gcc / egcs releases since 2.8.0     <-
> !!!
> > >on I86 machines. Not that it would make much sense with a terminal
> > >emulator anyway, but even so.
> >
> > and:
> > >linked to the Pentium Pro Blas single processor library.
> If -fschedule-insns
> > >is included four examples - 06, 07, 09 and 30 fail, 06 and 09 with
> segmentation  <-- !!!
> > >fault and 09 and 30 with a message that "SCALAR MECHINES SHOULD NOT
CALL
> JKGNMV".
> > >The performance is sometimes better and sometimes worse over the 31
> examples, but
> > >these are really too small for a proper bennch mark.
> >
> > and:
> > > ..so I guess the problem is not the classic --fschedule-insns bug.
> That's the option I found several weeks ago that gave me issues.
>
> > and:
> > http://www.linux-mips.org/archives/linux-mips/2004-03/msg00032.html
> >
> > could please someone try putting -fno-schedule-insns (and
> maybe -fno-schedule-insns2)
> > into the Makefile(s) and try again ?
> I'm having issues with at least -fno-schedule-insns -- where in the
> arch/um/Makefile do I make the change as well (or do I?)
>
>
> So I tried the following combos:
> perl -e 's/-O2/-O2 -fno-schedule-insns/g' -p -i.bak Makefile
> arch/um/Makefile
> perl -e 's/-O2/-O2 -fno-schedule-insns2/g' -p -i.bak Makefile
> arch/um/Makefile
> perl -e 's/-O2/-O2 -fno-schedule-insns -fno-schedule-insns2/g' -p -i.bak
> Makefile arch/um/Makefile
>
> No dice on any of them.
>
> I don't believe there is a -O2 in arch/um/Makefile as there is in 2.6.6 -- 
> should I make a change to the CFLAGS there?
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by the new InstallShield X.
> From Windows to Linux, servers to mobile, InstallShield X is the one
> installation-authoring solution that does it all. Learn more and
> evaluate today! http://www.installshield.com/Dev2Dev/0504
> _______________________________________________
> User-mode-linux-user mailing list
> User-mode-linux-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user
>



-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [uml-devel] Re: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC 3.3.3 similarities to 2.6.6!?
  2004-06-07  3:37   ` uml
@ 2004-06-13 21:58     ` Nix
  2004-06-14 19:09       ` BlaisorBlade
  0 siblings, 1 reply; 16+ messages in thread
From: Nix @ 2004-06-13 21:58 UTC (permalink / raw)
  To: uml; +Cc: uml-user, user-mode-linux-devel

On Sun, 06 Jun 2004, uml@dot1q.net stipulated:
> Switch differences between -O1 and -O2 on GCC 3.3.3:

Note: -O{n} are *not* the equivalent of groups of -f switches:
they turn those switches on, but other things inside the compiler
are directly triggered by the optimization level.

-- 
`If you believe in strong AI, then death is no longer a mystery,
 but merely a lack of adequate backups.' --- Steven McDougall


-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the
one installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [uml-devel] Re: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC 3.3.3 similarities to 2.6.6!?
  2004-06-13 21:58     ` Nix
@ 2004-06-14 19:09       ` BlaisorBlade
  2004-06-15  6:20         ` Nix
  0 siblings, 1 reply; 16+ messages in thread
From: BlaisorBlade @ 2004-06-14 19:09 UTC (permalink / raw)
  To: Nix, uml, roland; +Cc: uml-user, user-mode-linux-devel

Alle 23:58, domenica 13 giugno 2004, Nix ha scritto:
> On Sun, 06 Jun 2004, uml@dot1q.net stipulated:
> > Switch differences between -O1 and -O2 on GCC 3.3.3:
>
> Note: -O{n} are *not* the equivalent of groups of -f switches:
> they turn those switches on, but other things inside the compiler
> are directly triggered by the optimization level.

I expected that SuSE 9.1 shipped a buggy gcc, but I didn't found any confirm 
to this (I remember they did such things in the past). However the fact that 
the compiler output that dump is anyway a compiler bug...

Well, ok, more hints, the first possible answer to this one seems to be that 
SuSE enables -funit-at-a-time:

http://www.google.com/search?q=%22SuSE+9.1%22+bug+gcc&sourceid=opera&num=25&ie=utf-8&oe=utf-8

I checked the first hit (read the whole thread):

http://gcc.gnu.org/ml/gcc-bugs/2004-05/msg01912.html

And this is interesting enough:

(they indeed speak about SuSE 9.1)

"This is a dup of bug 14911, well it looks like *SUSE turns on 
-funit-at-a-time at -O2 for their 3.3.3*, so 
using the same method as mentioned in the other bug except change the 
"__GNUC_MINOR__ >=4" to 
be "__GNUC_MINOR__ >= 3" and it will work."

Here is bug 14911:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14911

This is the trick:
"#define ATTRIBUTE_USED
#if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >=4)
#undef ATTRIBUTE_USED
#define ATTRIBUTE_USED __attribute__((used))
#endif
static const int hello ATTRIBUTE_USED  = 56;
int main()
{
        asm(
        "mov hello, %eax\n"
        );
        return 0;
}"
-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729



-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [uml-devel] Re: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC 3.3.3 similarities to 2.6.6!?
  2004-06-14 19:09       ` BlaisorBlade
@ 2004-06-15  6:20         ` Nix
  2004-06-16 19:09           ` BlaisorBlade
  0 siblings, 1 reply; 16+ messages in thread
From: Nix @ 2004-06-15  6:20 UTC (permalink / raw)
  To: BlaisorBlade; +Cc: uml, roland, uml-user, user-mode-linux-devel

On Mon, 14 Jun 2004, BlaisorBlade mused:
> Alle 23:58, domenica 13 giugno 2004, Nix ha scritto:
>> On Sun, 06 Jun 2004, uml@dot1q.net stipulated:
>> > Switch differences between -O1 and -O2 on GCC 3.3.3:
>>
>> Note: -O{n} are *not* the equivalent of groups of -f switches:
>> they turn those switches on, but other things inside the compiler
>> are directly triggered by the optimization level.
> 
> I expected that SuSE 9.1 shipped a buggy gcc, but I didn't found any confirm 
> to this (I remember they did such things in the past). However the fact that 
> the compiler output that dump is anyway a compiler bug...

Oh, yes, certainly.

> Well, ok, more hints, the first possible answer to this one seems to be that 
> SuSE enables -funit-at-a-time:

(unsurprising, given that -funit-at-a-time's primary author is jh@suse ;} )

> http://www.google.com/search?q=%22SuSE+9.1%22+bug+gcc&sourceid=opera&num=25&ie=utf-8&oe=utf-8
> 
> I checked the first hit (read the whole thread):
> 
> http://gcc.gnu.org/ml/gcc-bugs/2004-05/msg01912.html

Yep, -funit-at-a-time will definitely break kernels that aren't
expecting it, both because of elision of unused statics and because some
arches depend on emission of asm's at the top level to emit stuff in the
same order in generated code, and with -funit-at-a-time this just
doesn't happen anymore. (I don't think i386 is such an architecture,
though.)

-funit-at-a-time is enabled by default for C and C++ in GCC 3.4.

> This is the trick:
> "#define ATTRIBUTE_USED
> #if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >=4)
> #undef ATTRIBUTE_USED
> #define ATTRIBUTE_USED __attribute__((used))
> #endif

The sort of thing you want to stash away in a header file and never lay
eyes on again. :)

> static const int hello ATTRIBUTE_USED  = 56;
> 
> int main()
> {
>         asm(
>         "mov hello, %eax\n"
>         );

Well, in this *specific* case, hello should be marked as clobbered,
which will also stop the compiler eliding it. But this *was* a contrived
testcase...

-- 
`We in no way believe that this Christ was a space alien.'
                    --- A creationist website goes completely bonkers


-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [uml-devel] Re: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC 3.3.3 similarities to 2.6.6!?
  2004-06-15  6:20         ` Nix
@ 2004-06-16 19:09           ` BlaisorBlade
  2004-06-17 15:35             ` uml
  2004-06-17 18:52             ` [uml-devel] Re: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC 3.3.3 similarities to 2.6.6!? Nix
  0 siblings, 2 replies; 16+ messages in thread
From: BlaisorBlade @ 2004-06-16 19:09 UTC (permalink / raw)
  To: Nix; +Cc: uml, roland, uml-user, user-mode-linux-devel

Alle 08:20, martedì 15 giugno 2004, Nix ha scritto:
> On Mon, 14 Jun 2004, BlaisorBlade mused:

> > Well, ok, more hints, the first possible answer to this one seems to be
> > that SuSE enables -funit-at-a-time:
>
> (unsurprising, given that -funit-at-a-time's primary author is jh@suse ;} )

Well, someone following gcc development! Compliments! Do you think, too that 
SuSE gcc is a pre-release or heavily patched?

> Yep, -funit-at-a-time will definitely break kernels that aren't
> expecting it, both because of elision of unused statics and because some
> arches depend on emission of asm's at the top level to emit stuff in the
> same order in generated code, and with -funit-at-a-time this just
> doesn't happen anymore. (I don't think i386 is such an architecture,
> though.)

However, I would like to see a successful test-case with -fno-unit-at-a-time, 
plus understanding what are the faulting declaration (i.e. adding 
attribute_used where needed), before saying this bug is over.

> -funit-at-a-time is enabled by default for C and C++ in GCC 3.4.
>
> > This is the trick:
> The sort of thing you want to stash away in a header file and never lay
> eyes on again. :)

Well, this is already done, in the kernel: see the definition of 
attribute_used in linux/compiler-gcc*.h.

> > static const int hello ATTRIBUTE_USED  = 56;
> >
> > int main()
> > {
> >         asm(
> >         "mov hello, %eax\n"
> >         );
>
> Well, in this *specific* case, hello should be marked as clobbered,

If you mean should be marked by the coder, ok (gcc is not smart).

> which will also stop the compiler eliding it. But this *was* a contrived
> testcase...

Bye!
-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729



-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [uml-devel] Re: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC 3.3.3 similarities to 2.6.6!?
  2004-06-16 19:09           ` BlaisorBlade
@ 2004-06-17 15:35             ` uml
  2004-06-17 17:25               ` BlaisorBlade
  2004-06-17 18:52             ` [uml-devel] Re: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC 3.3.3 similarities to 2.6.6!? Nix
  1 sibling, 1 reply; 16+ messages in thread
From: uml @ 2004-06-17 15:35 UTC (permalink / raw)
  To: uml-user, user-mode-linux-devel; +Cc: roland

Oops, I tried this the other day at the beginning of this thread -- it
worked great for me.

I'm afraid I just don't know enough about lower level compiling options or
gcc have ever diagnosed this myself; however, I don't mind recompiling a
kernel 100 times to see what works -- or doesn't. (=

Thanks!


----- Original Message ----- 
From: "BlaisorBlade" <blaisorblade_spam@yahoo.it>
To: "Nix" <nix@esperi.org.uk>
Cc: "uml" <uml@dot1q.net>; "roland" <for_spam@gmx.de>; "uml-user"
<user-mode-linux-user@lists.sourceforge.net>;
<user-mode-linux-devel@lists.sourceforge.net>
Sent: Wednesday, June 16, 2004 3.09 PM
Subject: Re: [uml-devel] Re: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC
3.3.3 similarities to 2.6.6!?


Alle 08:20, martedì 15 giugno 2004, Nix ha scritto:
> On Mon, 14 Jun 2004, BlaisorBlade mused:

> > Well, ok, more hints, the first possible answer to this one seems to be
> > that SuSE enables -funit-at-a-time:
>
> (unsurprising, given that -funit-at-a-time's primary author is jh@suse
;} )

Well, someone following gcc development! Compliments! Do you think, too that
SuSE gcc is a pre-release or heavily patched?

> Yep, -funit-at-a-time will definitely break kernels that aren't
> expecting it, both because of elision of unused statics and because some
> arches depend on emission of asm's at the top level to emit stuff in the
> same order in generated code, and with -funit-at-a-time this just
> doesn't happen anymore. (I don't think i386 is such an architecture,
> though.)

However, I would like to see a successful test-case
with -fno-unit-at-a-time,
plus understanding what are the faulting declaration (i.e. adding
attribute_used where needed), before saying this bug is over.

> -funit-at-a-time is enabled by default for C and C++ in GCC 3.4.
>
> > This is the trick:
> The sort of thing you want to stash away in a header file and never lay
> eyes on again. :)

Well, this is already done, in the kernel: see the definition of
attribute_used in linux/compiler-gcc*.h.

> > static const int hello ATTRIBUTE_USED  = 56;
> >
> > int main()
> > {
> >         asm(
> >         "mov hello, %eax\n"
> >         );
>
> Well, in this *specific* case, hello should be marked as clobbered,

If you mean should be marked by the coder, ok (gcc is not smart).

> which will also stop the compiler eliding it. But this *was* a contrived
> testcase...

Bye!
-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729



-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user




-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [uml-devel] Re: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC 3.3.3 similarities to 2.6.6!?
  2004-06-17 15:35             ` uml
@ 2004-06-17 17:25               ` BlaisorBlade
  2004-06-17 18:10                 ` uml
  0 siblings, 1 reply; 16+ messages in thread
From: BlaisorBlade @ 2004-06-17 17:25 UTC (permalink / raw)
  To: uml, uml-user, user-mode-linux-devel; +Cc: roland

Alle 17:35, giovedì 17 giugno 2004, uml ha scritto:
> Oops, I tried this the other day at the beginning of this thread -- it
> worked great for me.

Sorry for the silly question, but I was speaking about a *lot* of things, so 
what did you try?

-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729



-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [uml-devel] Re: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC 3.3.3 similarities to 2.6.6!?
  2004-06-17 17:25               ` BlaisorBlade
@ 2004-06-17 18:10                 ` uml
  2004-06-17 18:46                   ` BlaisorBlade
  0 siblings, 1 reply; 16+ messages in thread
From: uml @ 2004-06-17 18:10 UTC (permalink / raw)
  To: BlaisorBlade, uml-user, user-mode-linux-devel; +Cc: roland

Ah, I only tried adding the -fno-unit-at-a-time switch to -O2.. it seemed to
work quite cleanly, and as well as expected by simply replacing the -O2
with -O1 as I was previously doing.

I'm really unsure about the attribute_used declaration, but if you can tell
me how or what to test, I'm more than willing to give it a few dozen
recompiles.

----- Original Message ----- 
From: "BlaisorBlade" <blaisorblade_spam@yahoo.it>
To: "uml" <uml@dot1q.net>; "uml-user"
<user-mode-linux-user@lists.sourceforge.net>;
<user-mode-linux-devel@lists.sourceforge.net>
Cc: "roland" <for_spam@gmx.de>
Sent: Thursday, June 17, 2004 1.25 PM
Subject: Re: [uml-devel] Re: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC
3.3.3 similarities to 2.6.6!?


Alle 17:35, giovedì 17 giugno 2004, uml ha scritto:
> Oops, I tried this the other day at the beginning of this thread -- it
> worked great for me.

Sorry for the silly question, but I was speaking about a *lot* of things, so
what did you try?

-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729



-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user




-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [uml-devel] Re: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC 3.3.3 similarities to 2.6.6!?
  2004-06-17 18:10                 ` uml
@ 2004-06-17 18:46                   ` BlaisorBlade
  2004-06-17 20:00                     ` uml
  0 siblings, 1 reply; 16+ messages in thread
From: BlaisorBlade @ 2004-06-17 18:46 UTC (permalink / raw)
  To: uml, uml-user, user-mode-linux-devel; +Cc: roland

Alle 20:10, giovedì 17 giugno 2004, hai scritto:
> Ah, I only tried adding the -fno-unit-at-a-time switch to -O2.. it seemed
> to work quite cleanly, and as well as expected by simply replacing the -O2
> with -O1 as I was previously doing.

Wow! Now we know what to do... thanks a lot!

> I'm really unsure about the attribute_used declaration, but if you can tell
> me how or what to test, I'm more than willing to give it a few dozen
> recompiles.

Well, thanks a lot for your effort and availability... but the attribute_used 
thing will be a series of little code changes, adding attribute_used to a lot 
of "static" simbols which gcc is somehow deleting. However, I cannot test 
anything since I haven't the buggy gcc. Since you have, take a broken binary 
and a working one (the only difference must be the -fno-unit-at-a-time switch 
in the right places) and run:

nm broken > list1
nm working > list2
diff -u list1 list2 > theChanges

and send me "theChanges" (I don't need nor want list1 or list2 for now, they 
are too big maybe for a 56k modem to download). With that at hand, it will 
take probably ten minutes for the fix.

Bye
-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729




-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [uml-devel] Re: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC 3.3.3 similarities to 2.6.6!?
  2004-06-16 19:09           ` BlaisorBlade
  2004-06-17 15:35             ` uml
@ 2004-06-17 18:52             ` Nix
  1 sibling, 0 replies; 16+ messages in thread
From: Nix @ 2004-06-17 18:52 UTC (permalink / raw)
  To: BlaisorBlade; +Cc: uml, roland, uml-user, user-mode-linux-devel

On Wed, 16 Jun 2004, BlaisorBlade stated:
> Alle 08:20, martedì 15 giugno 2004, Nix ha scritto:
>> On Mon, 14 Jun 2004, BlaisorBlade mused:
> 
>> > Well, ok, more hints, the first possible answer to this one seems to be
>> > that SuSE enables -funit-at-a-time:
>>
>> (unsurprising, given that -funit-at-a-time's primary author is jh@suse ;} )
> 
> Well, someone following gcc development! Compliments! Do you think, too that 
> SuSE gcc is a pre-release or heavily patched?

I think SuSE are using the `hammer branch' of GCC (described at
<http://gcc.gnu.org/cvs.html#devbranches>) with a few local patches.
unit-at-a-time was first implemented in this branch.

(hammer is a branch of GCC 3.3, and will eventually die: there are no
plans to forward-port it. Forward porting it to 3.5 would be horrible
anyway.)

>> Yep, -funit-at-a-time will definitely break kernels that aren't
>> expecting it, both because of elision of unused statics and because some
>> arches depend on emission of asm's at the top level to emit stuff in the
>> same order in generated code, and with -funit-at-a-time this just
>> doesn't happen anymore. (I don't think i386 is such an architecture,
>> though.)
> 
> However, I would like to see a successful test-case with
> -fno-unit-at-a-time, plus understanding what are the faulting
> declaration (i.e. adding attribute_used where needed), before saying
> this bug is over.

Yep; just because there's one problem doesn't mean there aren't others
hiding underneath it.

>> > static const int hello ATTRIBUTE_USED  = 56;
>> >
>> > int main()
>> > {
>> >         asm(
>> >         "mov hello, %eax\n"
>> >         );
>>
>> Well, in this *specific* case, hello should be marked as clobbered,
> 
> If you mean should be marked by the coder, ok (gcc is not smart).

GCC knows nothing whatever about the string in asm statements, so yes,
you have to mark it yourself.

-- 
`We in no way believe that this Christ was a space alien.'
                    --- A creationist website goes completely bonkers


-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [uml-devel] Re: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC 3.3.3 similarities to 2.6.6!?
  2004-06-17 18:46                   ` BlaisorBlade
@ 2004-06-17 20:00                     ` uml
  2004-06-18 19:08                       ` [uml-devel] Re: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC 3.3.3 similarities to 2.6.6!? (2.6.7 additionally!) uml
  0 siblings, 1 reply; 16+ messages in thread
From: uml @ 2004-06-17 20:00 UTC (permalink / raw)
  To: uml-user, user-mode-linux-devel; +Cc: roland

OOps.. can't 'strip linux' before using nm... heh

It was 786K so I compressed it to 168K and it's available at
https://p0lar.dot1q.net/theChanges.bz2

I compiled both cleanly with the only change I made from the default config
was turning on module support for both.

Here's a quick transcript of the procedure:

cd /tmp
rm -rf /tmp/linux-2.6.6
tar -jxvf linux-2.6.6.tar.bz2
cd linux-2.6.6
bzcat ../uml-patch-2.6.6-1.bz2 | patch -p1
make menuconfig ARCH=um
perl -e 's/-O2/-O2 -fno-unit-at-a-time/' -p -i.bak Makefile arch/um/Makefile
make linux modules ARCH=um
cp linux ../uml/linux-2.6.6-working
cd /tmp
rm -rf /tmp/linux-2.6.6
tar -jxvf linux-2.6.6.tar.bz2
cd linux-2.6.6
bzcat ../uml-patch-2.6.6-1.bz2 | patch -p1
make menuconfig ARCH=um
make linux modules ARCH=um
cp linux ../uml/linux-2.6.6-broken
cd /tmp/uml
nm linux-2.6.6-broken > broken.list
nm linux-2.6.6-working > working.list
diff -u broken.list working.list > theChanges
bzip2 theChanges

Let me know if you need anything else!

----- Original Message ----- 
From: "BlaisorBlade" <blaisorblade_spam@yahoo.it>
To: "uml" <uml@dot1q.net>; "uml-user"
<user-mode-linux-user@lists.sourceforge.net>;
<user-mode-linux-devel@lists.sourceforge.net>
Cc: "roland" <for_spam@gmx.de>
Sent: Thursday, June 17, 2004 2.46 PM
Subject: Re: [uml-devel] Re: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC
3.3.3 similarities to 2.6.6!?


Alle 20:10, giovedì 17 giugno 2004, hai scritto:
> Ah, I only tried adding the -fno-unit-at-a-time switch to -O2.. it seemed
> to work quite cleanly, and as well as expected by simply replacing the -O2
> with -O1 as I was previously doing.

Wow! Now we know what to do... thanks a lot!

> I'm really unsure about the attribute_used declaration, but if you can
tell
> me how or what to test, I'm more than willing to give it a few dozen
> recompiles.

Well, thanks a lot for your effort and availability... but the
attribute_used
thing will be a series of little code changes, adding attribute_used to a
lot
of "static" simbols which gcc is somehow deleting. However, I cannot test
anything since I haven't the buggy gcc. Since you have, take a broken binary
and a working one (the only difference must be the -fno-unit-at-a-time
switch
in the right places) and run:

nm broken > list1
nm working > list2
diff -u list1 list2 > theChanges

and send me "theChanges" (I don't need nor want list1 or list2 for now, they
are too big maybe for a 56k modem to download). With that at hand, it will
take probably ten minutes for the fix.

Bye
-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729




-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user




-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [uml-devel] Re: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC 3.3.3 similarities to 2.6.6!? (2.6.7 additionally!)
  2004-06-17 20:00                     ` uml
@ 2004-06-18 19:08                       ` uml
  0 siblings, 0 replies; 16+ messages in thread
From: uml @ 2004-06-18 19:08 UTC (permalink / raw)
  To: uml-user, user-mode-linux-devel; +Cc: roland

O-k, I just ran the sam test on the 2.6.7 kernel with the same issues

The addition of -fno-unit-at-a-time to the -O2 switch seemed to resolve the
issues for it as well.

Here is a nm diff if you'd like it:
https://p0lar.dot1q.net/changes-2.6.7-broken-working.bz2


----- Original Message ----- 
From: "uml" <uml@dot1q.net>
To: "uml-user" <user-mode-linux-user@lists.sourceforge.net>;
<user-mode-linux-devel@lists.sourceforge.net>
Cc: "roland" <for_spam@gmx.de>
Sent: Thursday, June 17, 2004 4.00 PM
Subject: Re: [uml-devel] Re: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC
3.3.3 similarities to 2.6.6!?


OOps.. can't 'strip linux' before using nm... heh

It was 786K so I compressed it to 168K and it's available at
https://p0lar.dot1q.net/theChanges.bz2

I compiled both cleanly with the only change I made from the default config
was turning on module support for both.

Here's a quick transcript of the procedure:

cd /tmp
rm -rf /tmp/linux-2.6.6
tar -jxvf linux-2.6.6.tar.bz2
cd linux-2.6.6
bzcat ../uml-patch-2.6.6-1.bz2 | patch -p1
make menuconfig ARCH=um
perl -e 's/-O2/-O2 -fno-unit-at-a-time/' -p -i.bak Makefile arch/um/Makefile
make linux modules ARCH=um
cp linux ../uml/linux-2.6.6-working
cd /tmp
rm -rf /tmp/linux-2.6.6
tar -jxvf linux-2.6.6.tar.bz2
cd linux-2.6.6
bzcat ../uml-patch-2.6.6-1.bz2 | patch -p1
make menuconfig ARCH=um
make linux modules ARCH=um
cp linux ../uml/linux-2.6.6-broken
cd /tmp/uml
nm linux-2.6.6-broken > broken.list
nm linux-2.6.6-working > working.list
diff -u broken.list working.list > theChanges
bzip2 theChanges

Let me know if you need anything else!

----- Original Message ----- 
From: "BlaisorBlade" <blaisorblade_spam@yahoo.it>
To: "uml" <uml@dot1q.net>; "uml-user"
<user-mode-linux-user@lists.sourceforge.net>;
<user-mode-linux-devel@lists.sourceforge.net>
Cc: "roland" <for_spam@gmx.de>
Sent: Thursday, June 17, 2004 2.46 PM
Subject: Re: [uml-devel] Re: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC
3.3.3 similarities to 2.6.6!?


Alle 20:10, giovedì 17 giugno 2004, hai scritto:
> Ah, I only tried adding the -fno-unit-at-a-time switch to -O2.. it seemed
> to work quite cleanly, and as well as expected by simply replacing the -O2
> with -O1 as I was previously doing.

Wow! Now we know what to do... thanks a lot!

> I'm really unsure about the attribute_used declaration, but if you can
tell
> me how or what to test, I'm more than willing to give it a few dozen
> recompiles.

Well, thanks a lot for your effort and availability... but the
attribute_used
thing will be a series of little code changes, adding attribute_used to a
lot
of "static" simbols which gcc is somehow deleting. However, I cannot test
anything since I haven't the buggy gcc. Since you have, take a broken binary
and a working one (the only difference must be the -fno-unit-at-a-time
switch
in the right places) and run:

nm broken > list1
nm working > list2
diff -u list1 list2 > theChanges

and send me "theChanges" (I don't need nor want list1 or list2 for now, they
are too big maybe for a 56k modem to download). With that at hand, it will
take probably ten minutes for the fix.

Bye
-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729




-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user




-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user




-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2004-06-18 19:08 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-06 18:54 [uml-devel] Re: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC 3.3.3 similarities to 2.6.6!? roland
2004-06-06 21:33 ` uml
2004-06-07  3:37   ` uml
2004-06-13 21:58     ` Nix
2004-06-14 19:09       ` BlaisorBlade
2004-06-15  6:20         ` Nix
2004-06-16 19:09           ` BlaisorBlade
2004-06-17 15:35             ` uml
2004-06-17 17:25               ` BlaisorBlade
2004-06-17 18:10                 ` uml
2004-06-17 18:46                   ` BlaisorBlade
2004-06-17 20:00                     ` uml
2004-06-18 19:08                       ` [uml-devel] Re: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC 3.3.3 similarities to 2.6.6!? (2.6.7 additionally!) uml
2004-06-17 18:52             ` [uml-devel] Re: [uml-user] SuSE 9.1 host + 2.4.26 Kernel + GCC 3.3.3 similarities to 2.6.6!? Nix
     [not found] <007701c44be9$e4d7d630$dd02a8c0@ferraro>
2004-06-06 18:22 ` roland
2004-06-06 20:04   ` uml

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.