Re: Compiling kernel with gcc43 [SOLVED]

2010-04-02 Thread Mario Lobo
On Thursday 01 April 2010 16:53:36 Pegasus Mc Cleaft wrote:
 On Thursday 01 April 2010 15:27:41 Oliver Fromme wrote:
  Mario Lobo l...@bsd.com.br wrote:
[...]
It's compiling right now.
   
I'll post my findings and impressions on results and performance right
after the next reboot.
 
  So, how is it going?  Any benchmarks yet?  I'm curious
  if the new gcc version will really make a significant
  difference.
 
   I would love to see the /etc/make.conf,  /etc/src.conf and
 /etc/libmap.conf files that were used for the build. I have tried compiling
  in VBox a current kernel and world, but it usually just bombs out for me.
  I would like to give this a go as well.
 
 Peg
 

Well, to tell the truth I wasn't that thrilled with the results. I didn't 
benchmark anything by my impressions were that at least disk access was a bit 
slower not only during booting but it was more noticeable to me particularly  
on a burning DVD session. Of course this is ultra abstract. 

In all previous experiences I had in burning CD/DVD with k3b, I recollect that 
during burning, the software buffer and device buffer gouges were always 100%, 
with the software buffer gouge dropping down occasionally to 89/92%.

After recompiling the kernel with gcc43, the software buffer was always empty 
and the device buffer rarely reached 40/50%. I think (if not mistaken) this 
means that the device is asking where is my data?? and the OS is not 
providing it fast enough.

I could not get world to build with gcc43 so I gave that up. Then I moved on 
to VirtualBox. I managed to have it compiled and running. After long trial and 
error sessions, I could pin point what was breaking compilation and fixed it. 
Here are the steps:

--

Compiling vbox/vbox-devel with gcc43

1) /usr/include/cam/cam.h needed #include stdio.h for FILE define, 
complained by: 

 
work/VirtualBox-3.1.51.r27657_OSE/src/VBox/Main/freebsd/HostHardwareFreeBSD.cpp:47:
 /usr/include/cam/cam.h:246: error: 'FILE' has not been declared

2)/usr/ports/emulators/virtualbox-
ose/work/VirtualBox-3.1.6_OSE/src/VBox/Main/generic/NetIf-generic.cpp 
  needed #include stdio.h because of popen() (this step is ONLY for 
virtualbox-ose)

3)/usr/ports/emulators/virtualbox-ose(-
devel)/work/VirtualBox-3.1.6_OSE/src/VBox/Main/freebsd/NetIf-freebsd.cpp 
  needed #include stdlib.h because of malloc()/free()

4) Config.kmk needed some tweaks:

  a) line 1750 - $(APPEND) '$@' 'VBOX_GCC_mtune-generic ?= $(call 
VBOX_GCC_CHECK_CC,-mtune=amdfam10 -D__FreeBSD_cc_version=0,)' 
 to use instructions closer to Phenom and avoid cc complains.
  b) took out all references to -fformat-extensions and -fno_format-
extensions
  c) Preceeded all relevant locations of /usr/lib \ with 
/usr/local/lib/gcc43 \ so kbuild searched there for libraries first.
(except TEMPLATE_VBOXQT4GUIEXE_LIBPATH !)

  d) You can use the same Config.kmk for building kmods as well

5) took out -fformat-extensions from src/sys/conf/kern.mk

And I left /etc/libmap.conf 

libgcc_s.so.1   gcc43/libgcc_s.so.1
libgomp.so.1gcc43/libgomp.so.1
libobjc.so.3gcc43/libobjc.so.2
libssp.so.0 gcc43/libssp.so.0
libstdc++.so.6  gcc43/libstdc++.so.6

/etc/make.conf 

CC=/usr/local/bin/gcc43
CXX=/usr/local/bin/g++43
CPP=/usr/local/bin/cpp43
CFLAGS+=-mssse3 -D__FreeBSD_cc_version=0
CXXFLAGS+=-D__FreeBSD_cc_version=0
CPUTYPE=amdfam10
#MAKEOPTS+= -j4


and /etc/src.conf

NO_WERROR=
WERROR=


--

New problems started to come when I tried to extend this to other ports, 
breaking a lot of them, to point of making me revert everything back to what 
it was. In fact I am still in this process right now, and reving a lot of 
problems to rebuild kde4.

This is it for now, guys. If you find anything new, please post.

Best of luck,

-- 
Mario Lobo
http://www.mallavoodoo.com.br
FreeBSD since version 2.2.8 [not Pro-Audio YET!!] (99,7% winfoes FREE)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Compiling kernel with gcc43 [SOLVED] -ADDENDUM

2010-04-02 Thread Mario Lobo
Well, to tell the truth I wasn't that thrilled with the results. I didn't 

[snip]
--

Compiling vbox/vbox-devel with gcc43

1) /usr/include/cam/cam.h needed #include stdio.h for FILE define, 
complained by: 

[snip]

and /etc/src.conf

NO_WERROR=
WERROR=


--

New problems started to come when I tried to extend this to other ports, 

[snip]


You have to:

1) make patch
2) apply the mods
3) make


Best of luck, again

-- 
Mario Lobo
http://www.mallavoodoo.com.br
FreeBSD since version 2.2.8 [not Pro-Audio YET!!] (99,7% winfoes FREE)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Compiling kernel with gcc43 [SOLVED]

2010-04-01 Thread Oliver Fromme
Mario Lobo l...@bsd.com.br wrote:
  [...]
  It's compiling right now.
  
  I'll post my findings and impressions on results and performance right after 
  the next reboot.

So, how is it going?  Any benchmarks yet?  I'm curious
if the new gcc version will really make a significant
difference.

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH  Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

UNIX was not designed to stop you from doing stupid things,
because that would also stop you from doing clever things.
-- Doug Gwyn
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Compiling kernel with gcc43 [SOLVED]

2010-04-01 Thread Pegasus Mc Cleaft
On Thursday 01 April 2010 15:27:41 Oliver Fromme wrote:
 Mario Lobo l...@bsd.com.br wrote:
   [...]
   It's compiling right now.
  
   I'll post my findings and impressions on results and performance right
   after the next reboot.
 
 So, how is it going?  Any benchmarks yet?  I'm curious
 if the new gcc version will really make a significant
 difference.

I would love to see the /etc/make.conf,  /etc/src.conf and 
/etc/libmap.conf files that were used for the build. I have tried compiling in 
VBox a current kernel and world, but it usually just bombs out for me. I would 
like to give this a go as well. 

Peg
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Compiling kernel with gcc43 [SOLVED]

2010-04-01 Thread Vlad Galu
On Thu, Apr 1, 2010 at 6:27 PM, Oliver Fromme o...@lurza.secnetix.de wrote:
 Mario Lobo l...@bsd.com.br wrote:
   [...]
   It's compiling right now.
  
   I'll post my findings and impressions on results and performance right 
 after
   the next reboot.

 So, how is it going?  Any benchmarks yet?  I'm curious
 if the new gcc version will really make a significant
 difference.


I'm not as worried about performance as I am about compatibilty.
Various software suites have started using newer GCCisms in their
code. One example I can give from the top of my head is Wt
(www.webtoolkit.eu), which compiles with 4.4, but not with 4.2. I
shamefully haven't dug any deeper to check which particular
syntactical construct offended 4.2.

Yes, one might say, after all it's the upstream developers who ought
to make sure their software compiles on FreeBSD, but some aditional
overhead on the shoulders of our port maintainers should be expected.

 Best regards
   Oliver

 --
 Oliver Fromme, secnetix GmbH  Co. KG, Marktplatz 29, 85567 Grafing b. M.
 Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
 secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
 chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

 FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

 UNIX was not designed to stop you from doing stupid things,
 because that would also stop you from doing clever things.
        -- Doug Gwyn
 ___
 freebsd-hack...@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org




-- 
Good, fast  cheap. Pick any two.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Compiling kernel with gcc43 [SOLVED]

2010-03-25 Thread Mario Lobo
On Thursday 25 March 2010 19:12:09 Edward Tomasz Napierała wrote:
 Wiadomość napisana przez Mario Lobo w dniu 2010-03-25, o godz. 17:24:
  2010/3/24 Mario Lobo l...@bsd.com.br
 
  Anyway,my question boils down to: Is there a way to build the kernel
  with gcc43, with minimal tweaking? Am i attempting something out of my
  league?
 
 This is what I use to compile kernel on 9.0-CURRENT/amd64:
 
 CC=/usr/local/bin/gcc44
 CXX=   /usr/local/bin/g++44
 CWARNFLAGS=-Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes
  \ -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
  -Wno-pointer-sign -D__FreeBSD_cc_version=0 \
-Wno-unused-function -Wno-inline -Wno-format \
-Wno-uninitialized -Wno-array-bounds -Wno-missing-prototypes
 
 Note that this is GCC 4.4.4, installed from ports.  Also, this will not
 compile the world - only the kernel.  Also, they were a few fixes to make
 this work; they were not MFC-ed, iirc; removing -Werror altogether should
 work around these problems.
 
 --
 If you cut off my head, what would I say?  Me and my head, or me and my
  body?
 

Adding 

NO_WERROR=
WERROR=

to src.conf did it. It's compiling right now.

I'll post my findings and impressions on results and performance right after 
the next reboot.

Thanks for all the help and info, Guys !!

-- 
Mario Lobo
http://www.mallavoodoo.com.br
FreeBSD since version 2.2.8 [not Pro-Audio YET!!] (99,7% winfoes FREE)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org