SOUND support in DOS | Piotr | HDA (Developers)
> Oh yes, I idiot should do it at the beginning instead of messing with gcc
> version packages. When I changed -O2 to -Os in MAKEFILE.DJ it works fine.
This means it is doing something extra with -O2 but not -Os. And in fact they are (allegedly) very similar. Normally I would blindly guess something like -fno-strength-reduce or -fno-strict-aliasing (or whatever) would fix it, but I'm not sure here.
Anyways, GCC 4.6.2's online docs says this:
-Os
Optimize for size. -Os enables all -O2 optimizations that do not typically increase code size. It also performs further optimizations designed to reduce code size.
-Os disables the following optimization flags:
-falign-functions -falign-jumps -falign-loops
-falign-labels -freorder-blocks -freorder-blocks-and-partition
-fprefetch-loop-arrays -ftree-vect-loop-version
But it's true, a lot of code sometimes fails with different optimizations or different GCC versions, sadly. A lot is just regressions (as GCC is quite complex and presumably hard to maintain for a billion targets while also being optimizing). Sometimes it really is good to test with "older" (classic) GCCs, but that's not always possible (e.g. C++).
> New gcc is much more aggressive in opt. I also faced the same problem in my
> code and was unable to fix it on source level so I applied selective
> optimization for that problematic function via
> __attribute__((optimize(0))). As my problem function is not time
> critical I don't care it's not optimized but all the rest of code is.
> It would be good if someone will isolate such problem function in judas
> and make it selective-unoptimized this way.
Indeed, sounds good, but even that attribute (IIRC) only works with GCC 4.4.0 on up. But I guess once you isolate the function, you could snip it out into its own .c file and "gcc -O0" that separately. Presumably it's just some silly bug (yeah, it happens).
Complete thread:
- SOUND support in DOS | Piotr | HDA - DOS386, 14.12.2011, 08:26 (Developers)
![Open in board view [Board]](img/board_d.gif)
![Open in mix view [Mix]](img/mix_d.gif)
- SOUND support in DOS | Piotr | HDA - RayeR, 14.12.2011, 12:31
- SOUND support in DOS | Piotr | HDA - RayeR, 15.12.2011, 10:26
- ICH4 and CD audio not working - Doug, 15.12.2011, 16:19
- ICH4 and CD audio not working - Dex, 16.12.2011, 01:16
- It worked! - Doug, 16.12.2011, 03:06
- Dex - source code? - Doug, 19.12.2011, 20:36
- Dex - source code? - Dex, 20.12.2011, 04:02
- Many thanks.... - Doug, 20.12.2011, 18:04
- Dex - source code? - Dex, 20.12.2011, 04:02
- Dex - source code? - Doug, 19.12.2011, 20:36
- It worked! - Doug, 16.12.2011, 03:06
- ICH4 and CD audio not working - Dex, 16.12.2011, 01:16
- SOUND support in DOS | Piotr | HDA - Marton, 17.12.2011, 05:20
- SOUND support in DOS | Piotr | HDA - RayeR, 17.12.2011, 19:20
- SOUND support in DOS | Piotr | HDA - Marton, 18.12.2011, 02:04
- SOUND support in DOS | Piotr | HDA - RayeR, 18.12.2011, 05:35
- SOUND support in DOS | Piotr | HDA - RayeR, 18.12.2011, 14:16
- SOUND support in DOS | Piotr | HDA - Rugxulo, 18.12.2011, 18:12
- SOUND support in DOS | Piotr | HDA - RayeR, 18.12.2011, 19:08
- SOUND support in DOS | Piotr | HDA - Marton, 19.12.2011, 22:14
- SOUND support in DOS | Piotr | HDA - RayeR, 20.12.2011, 03:57
- SOUND support in DOS | Piotr | HDA - Marton, 20.12.2011, 06:59
- SOUND support in DOS | Piotr | HDA - Marton, 22.12.2011, 15:41
- SOUND support in DOS | Piotr | HDA - Rugxulo, 23.12.2011, 07:51
- SOUND support in DOS | Piotr | HDA - RayeR, 23.12.2011, 19:01
- SOUND support in DOS | Piotr | HDA - Rugxulo, 24.12.2011, 22:18
- SOUND support in DOS | Piotr | HDA - RayeR, 25.12.2011, 04:39
- SOUND support in DOS | Piotr | HDA - georgpotthast, 25.12.2011, 20:45
- SOUND support in DOS | Piotr | HDA - RayeR, 25.12.2011, 21:00
- SOUND support in DOS | Piotr | HDA - georgpotthast, 25.12.2011, 21:19
- SOUND support in DOS | Piotr | HDA - RayeR, 25.12.2011, 22:51
- SOUND support in DOS | Piotr | HDA - georgpotthast, 26.12.2011, 08:19
- SOUND support in DOS | Piotr | HDA - Dex, 26.12.2011, 17:57
- SOUND support in DOS | Piotr | HDA - RayeR, 27.12.2011, 01:54
- SOUND support in DOS | Piotr | HDA - RayeR, 25.12.2011, 22:51
- SOUND support in DOS | Piotr | HDA - georgpotthast, 25.12.2011, 21:19
- SOUND support in DOS | Piotr | HDA - RayeR, 25.12.2011, 21:00
- SOUND support in DOS | Piotr | HDA - Deniska, 26.12.2011, 23:51
- SOUND support in DOS | Piotr | HDA - Deniska, 26.12.2011, 23:55
- SOUND support in DOS | Piotr | HDA - RayeR, 27.12.2011, 01:44
- SOUND support in DOS | Piotr | HDA - Deniska, 26.12.2011, 23:55
- SOUND support in DOS | Piotr | HDA - Rugxulo, 27.12.2011, 21:39
- SOUND support in DOS | Piotr | HDA - RayeR, 28.12.2011, 03:27
- SOUND support in DOS | Piotr | HDA - Marton, 08.01.2012, 16:47
- SOUND support in DOS | Piotr | HDA - RayeR, 28.12.2011, 03:27
- SOUND support in DOS | Piotr | HDA - DOS386, 15.01.2012, 04:25
- SOUND support in DOS | Piotr | HDA - RayeR, 16.01.2012, 00:08
- SOUND support in DOS | Piotr | HDA | WAW output broken - DOS386, 16.01.2012, 06:35
- SOUND support in DOS | Piotr | HDA | WAW output broken - RayeR, 16.01.2012, 14:56
- SOUND support in DOS | Piotr | HDA | WAW output broken - Zyzzle, 01.02.2012, 01:50
- SOUND support in DOS | Piotr | HDA | WAW output broken - RayeR, 01.02.2012, 13:44
- Judas in Freepascal - Laaca, 27.02.2012, 09:48
- Judas in Freepascal - RayeR, 02.03.2012, 10:33
- Judas in Freepascal - Khusraw, 02.03.2012, 20:50
- Judas in Freepascal - RayeR, 02.03.2012, 10:33
- Judas in Freepascal - Laaca, 27.02.2012, 09:48
- SOUND support in DOS | Piotr | HDA | WAW output broken - RayeR, 01.02.2012, 13:44
- SOUND support in DOS | Piotr | HDA | WAW output broken - Zyzzle, 01.02.2012, 01:50
- SOUND support in DOS | Piotr | HDA | WAW output broken - RayeR, 16.01.2012, 14:56
- SOUND support in DOS | Piotr | HDA - Fabrizio, 03.03.2013, 23:21
- SOUND support in DOS | Piotr | HDA | WAW output broken - DOS386, 16.01.2012, 06:35
- SOUND support in DOS | Piotr | HDA - RayeR, 16.01.2012, 00:08
- SOUND support in DOS | Piotr | HDA - georgpotthast, 25.12.2011, 20:45
- SOUND support in DOS | Piotr | HDA - RayeR, 25.12.2011, 04:39
- SOUND support in DOS | Piotr | HDA - Rugxulo, 24.12.2011, 22:18
- SOUND support in DOS | Piotr | HDA - RayeR, 23.12.2011, 19:01
- SOUND support in DOS | Piotr | HDA - Rugxulo, 23.12.2011, 07:51
- SOUND support in DOS | Piotr | HDA - Marton, 22.12.2011, 15:41
- SOUND support in DOS | Piotr | HDA - Marton, 20.12.2011, 06:59
- SOUND support in DOS | Piotr | HDA - RayeR, 20.12.2011, 03:57
- SOUND support in DOS | Piotr | HDA - Marton, 19.12.2011, 22:14
- SOUND support in DOS | Piotr | HDA - RayeR, 18.12.2011, 19:08
- SOUND support in DOS | Piotr | HDA - Rugxulo, 18.12.2011, 18:12
- SOUND support in DOS | Piotr | HDA - RayeR, 18.12.2011, 14:16
- SOUND support in DOS | Piotr | HDA - RayeR, 18.12.2011, 05:35
- SOUND support in DOS | Piotr | HDA - Marton, 18.12.2011, 02:04
- SOUND support in DOS | Piotr | HDA - RayeR, 17.12.2011, 19:20
- SOUND support in DOS | Capturing PC speaker sound - TomCat, 08.10.2017, 00:03
- SOUND support in DOS | Capturing PC speaker sound - Laaca, 11.10.2017, 20:23
- SOUND support in DOS | Capturing PC speaker sound - TomCat, 29.10.2017, 02:53
- SOUND support in DOS | Capturing PC speaker sound - KormaX, 27.10.2017, 23:44
- SOUND support in DOS | Capturing PC speaker sound - KormaX, 28.10.2017, 12:08
- SOUND support in DOS | Capturing PC speaker sound - TomCat, 29.10.2017, 02:56
- SOUND support in DOS | Capturing PC speaker sound - KormaX, 30.10.2017, 16:26
- SOUND support in DOS | Capturing PC speaker sound - TomCat, 29.10.2017, 02:56
- SOUND support in DOS | Capturing PC speaker sound - Laaca, 11.10.2017, 20:23
- SOUND support in DOS | Piotr | HDA - RayeR, 14.12.2011, 12:31
Mix view