GCD in FreeBSD with gcc
Hi, I try to play with GCD in FreeBSD. Compilation through clang is fine. However when i use the gcc from base for code with dispatch_async i got warning: implicit declaration of function 'dispatch_async' The existing file /usr/local/include/dispatch/queue.h contains the following constructions: #ifdef __BLOCKS__ __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_4_0) DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_NOTHROW void dispatch_async(dispatch_queue_t queue, dispatch_block_t block); #endif It sets some restriction on a number of platforms. Concerning FreeBSD, dispatch_async - it is not ready or these records weren't corrected for FreeBSD ? PS: FreeBSD 9.0-RC3, /usr/ports/devel/libdispatch 210_1 Sample file test.c: -- #include stdio.h #include stdlib.h #include dispatch/dispatch.h #include dispatch/queue.h void say_hello(__unused void *arg) { printf(Hi.\n); exit(0); } int main(int argc, char *argv[]) { dispatch_queue_t q; q = dispatch_get_main_queue(); dispatch_async(q, say_hello); printf(Im Here\n); dispatch_main(); } -- gcc -Wall -Werror -I/usr/local/include -L/usr/local/lib -o test test.c - ldispatch ___ 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 FreeBSD with GCC 4.3+
Hi David, On Monday 20 April 2009 21:48:39 David Naylor wrote: There has been an article recently published by phoronix (http://www.phoronix.com/scan.php?page=articleitem=pcbsd_vs_kubuntunum=1) that compares PC-BSD to Kubuntu. Kubuntu uses GCC 4.3.3 compared to FreeBSD's GCC 4.2.2. There is a considerable performance difference between the two OS's, the article contributes this difference to the compiler. Nice shot in the dark, since except the calculations a lot of these are influenced by journaled FS vs stock UFS. In order to check if this is so (and to get the speed improvements of GCC 4.3+) one needs to compile the ports (and preferable world/kernel as well) with GCC 4.3+. It's license is incompatible with world/kernel. That said, install lang/gcc43 and set CC/CXX for ports. World/kernel would be a lot harder. Maybe setting WITHOUT_GCC in /etc/src.conf and setting CC/CXX would work, but there's quite a few modifications to gcc that aren't in ports lang/gcc, so I have my doubts. Is there an easy way to set this up and does anyone know the compatibility of world/kernel/ports with GCC 4.3+? Also has anyone tried this and benchmarked the result? Not me, but be sure to stick around for the new non-gcc compiler coming to a FreeBSD near you. And with the work done by Marcel Molenaar on gpart, hopefully we can have ZFS and gjournal as choices in the installer. -- Mel ___ 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 FreeBSD with GCC 4.3+
On Tuesday 21 April 2009 10:32:04 Mel Flynn wrote: Hi David, On Monday 20 April 2009 21:48:39 David Naylor wrote: There has been an article recently published by phoronix (http://www.phoronix.com/scan.php?page=articleitem=pcbsd_vs_kubuntunum= 1) that compares PC-BSD to Kubuntu. Kubuntu uses GCC 4.3.3 compared to FreeBSD's GCC 4.2.2. There is a considerable performance difference between the two OS's, the article contributes this difference to the compiler. Nice shot in the dark, since except the calculations a lot of these are influenced by journaled FS vs stock UFS. I know, benchmarking anything but the simplest things are influenced by too many factors. Pity it doesn't provide an unbiased comparison of FreeBSD and Linux. In order to check if this is so (and to get the speed improvements of GCC 4.3+) one needs to compile the ports (and preferable world/kernel as well) with GCC 4.3+. It's license is incompatible with world/kernel. What type of incompatibility. I know FreeBSD has reservations about GPLv3 (I personally don't understand why everyone cannot be friends and use BSD Licenses). So is this a policy incompatibility or a legal one (i.e. would it be 'illegal' for me to use GCC 4.3+ to compile world/kernel, as an end-user/consumer of FreeBSD). I assume the same discussion applies to binutils. That said, install lang/gcc43 and set CC/CXX for ports. World/kernel would be a lot harder. Maybe setting WITHOUT_GCC in /etc/src.conf and setting CC/CXX would work, but there's quite a few modifications to gcc that aren't in ports lang/gcc, so I have my doubts. I suppose it would be nice if there was an easy way to use an out-of-source compiler in FreeBSD. Like set PORTS_COMPILER=gcc43 and the port will installed and used... One may have dreams. Is there an easy way to set this up and does anyone know the compatibility of world/kernel/ports with GCC 4.3+? Also has anyone tried this and benchmarked the result? Not me, but be sure to stick around for the new non-gcc compiler coming to a FreeBSD near you. And with the work done by Marcel Molenaar on gpart, hopefully we can have ZFS and gjournal as choices in the installer. You mean llvm, waiting patiently. I suppose my suggestion above will become even more important (at least for compiling ports) since it will be a while till llvm has decent c++ support. Thanks for your reply signature.asc Description: This is a digitally signed message part.
Re: Compiling FreeBSD with GCC 4.3+
On Tuesday 21 April 2009 17:37:50 David Naylor wrote: On Tuesday 21 April 2009 10:32:04 Mel Flynn wrote: Hi David, On Monday 20 April 2009 21:48:39 David Naylor wrote: There has been an article recently published by phoronix (http://www.phoronix.com/scan.php?page=articleitem=pcbsd_vs_kubuntunu m= 1) that compares PC-BSD to Kubuntu. Kubuntu uses GCC 4.3.3 compared to FreeBSD's GCC 4.2.2. There is a considerable performance difference between the two OS's, the article contributes this difference to the compiler. Nice shot in the dark, since except the calculations a lot of these are influenced by journaled FS vs stock UFS. I know, benchmarking anything but the simplest things are influenced by too many factors. Pity it doesn't provide an unbiased comparison of FreeBSD and Linux. That and comparing apples and pears as default configured fruit, don't usually work well. Of course it appeals to the end user which fruit is healthier. In order to check if this is so (and to get the speed improvements of GCC 4.3+) one needs to compile the ports (and preferable world/kernel as well) with GCC 4.3+. It's license is incompatible with world/kernel. What type of incompatibility. I know FreeBSD has reservations about GPLv3 (I personally don't understand why everyone cannot be friends and use BSD Licenses). So is this a policy incompatibility or a legal one (i.e. would it be 'illegal' for me to use GCC 4.3+ to compile world/kernel, as an end-user/consumer of FreeBSD). I assume the same discussion applies to binutils. Policy. Only legal issue in FreeBSD for the end user is WITH_IDEA. That said, install lang/gcc43 and set CC/CXX for ports. World/kernel would be a lot harder. Maybe setting WITHOUT_GCC in /etc/src.conf and setting CC/CXX would work, but there's quite a few modifications to gcc that aren't in ports lang/gcc, so I have my doubts. I suppose it would be nice if there was an easy way to use an out-of-source compiler in FreeBSD. Like set PORTS_COMPILER=gcc43 and the port will installed and used... One may have dreams. cat 'EOF' /etc/make.conf .if !empty(.CURDIR:M/usr/ports/*) CC=/usr/local/bin/gcc43 CXX=/usr/local/bin/g++43 .endif EOF Pretty close, huh? Is there an easy way to set this up and does anyone know the compatibility of world/kernel/ports with GCC 4.3+? Also has anyone tried this and benchmarked the result? Not me, but be sure to stick around for the new non-gcc compiler coming to a FreeBSD near you. And with the work done by Marcel Molenaar on gpart, hopefully we can have ZFS and gjournal as choices in the installer. You mean llvm, waiting patiently. I suppose my suggestion above will become even more important (at least for compiling ports) since it will be a while till llvm has decent c++ support. Yeah, I don't know how that's gonna work if llvm is ready for base, but no c++. I guess we'll have to sit out g++ 4.2 for a while. If you're in the position to do so, I'd do their benchmarks with ZFS and see how much difference that already makes. -- Mel ___ 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 FreeBSD with GCC 4.3+
On Tuesday 21 April 2009 17:58:15 Mel Flynn wrote: On Tuesday 21 April 2009 17:37:50 David Naylor wrote: On Tuesday 21 April 2009 10:32:04 Mel Flynn wrote: Hi David, On Monday 20 April 2009 21:48:39 David Naylor wrote: There has been an article recently published by phoronix (http://www.phoronix.com/scan.php?page=articleitem=pcbsd_vs_kubuntu; nu m= 1) that compares PC-BSD to Kubuntu. Kubuntu uses GCC 4.3.3 compared to FreeBSD's GCC 4.2.2. There is a considerable performance difference between the two OS's, the article contributes this difference to the compiler. Nice shot in the dark, since except the calculations a lot of these are influenced by journaled FS vs stock UFS. I know, benchmarking anything but the simplest things are influenced by too many factors. Pity it doesn't provide an unbiased comparison of FreeBSD and Linux. That and comparing apples and pears as default configured fruit, don't usually work well. Of course it appeals to the end user which fruit is healthier. :-) In order to check if this is so (and to get the speed improvements of GCC 4.3+) one needs to compile the ports (and preferable world/kernel as well) with GCC 4.3+. It's license is incompatible with world/kernel. What type of incompatibility. I know FreeBSD has reservations about GPLv3 (I personally don't understand why everyone cannot be friends and use BSD Licenses). So is this a policy incompatibility or a legal one (i.e. would it be 'illegal' for me to use GCC 4.3+ to compile world/kernel, as an end-user/consumer of FreeBSD). I assume the same discussion applies to binutils. Policy. Only legal issue in FreeBSD for the end user is WITH_IDEA. Thanks for sorting that out. Good news for me. That said, install lang/gcc43 and set CC/CXX for ports. World/kernel would be a lot harder. Maybe setting WITHOUT_GCC in /etc/src.conf and setting CC/CXX would work, but there's quite a few modifications to gcc that aren't in ports lang/gcc, so I have my doubts. I suppose it would be nice if there was an easy way to use an out-of-source compiler in FreeBSD. Like set PORTS_COMPILER=gcc43 and the port will installed and used... One may have dreams. cat 'EOF' /etc/make.conf .if !empty(.CURDIR:M/usr/ports/*) CC=/usr/local/bin/gcc43 CXX=/usr/local/bin/g++43 .endif EOF Pretty close, huh? Kinda, it is what I was thinking about (or just symlinking cc, cxx to the proper programs). Of course if this is implemented 'properly' in ports then auto-dependencies and all that will be added. I was actually thinking about replacing the standard compiler by a) not installing gcc 4.2.2 (i think WITHOUT_GCC, as mentioned by yourself) b) installing latest gcc: # make -C /usr/ports/lang/gcc43 install DESTDIR=/new/freebsd/system PREFIX=/usr -DWITHOUT_JAVA [ With symlinks from gcc43 - gcc, etc] c) Hoping this works Well something like that (with extra hope) Is there an easy way to set this up and does anyone know the compatibility of world/kernel/ports with GCC 4.3+? Also has anyone tried this and benchmarked the result? Not me, but be sure to stick around for the new non-gcc compiler coming to a FreeBSD near you. And with the work done by Marcel Molenaar on gpart, hopefully we can have ZFS and gjournal as choices in the installer. You mean llvm, waiting patiently. I suppose my suggestion above will become even more important (at least for compiling ports) since it will be a while till llvm has decent c++ support. Yeah, I don't know how that's gonna work if llvm is ready for base, but no c++. I guess we'll have to sit out g++ 4.2 for a while. If you're in the position to do so, I'd do their benchmarks with ZFS and see how much difference that already makes. Well, llvm does support C++ (with the gcc frontend) so that shouldn't be too much of a problem. clang is more of the issue but I suppose we could always have llvm-clang for C and llvm-gcc for C++ (until clang gets full C++ support). signature.asc Description: This is a digitally signed message part.
Compiling FreeBSD with GCC 4.3+
Hi, There has been an article recently published by phoronix (http://www.phoronix.com/scan.php?page=articleitem=pcbsd_vs_kubuntunum=1) that compares PC-BSD to Kubuntu. Kubuntu uses GCC 4.3.3 compared to FreeBSD's GCC 4.2.2. There is a considerable performance difference between the two OS's, the article contributes this difference to the compiler. In order to check if this is so (and to get the speed improvements of GCC 4.3+) one needs to compile the ports (and preferable world/kernel as well) with GCC 4.3+. Is there an easy way to set this up and does anyone know the compatibility of world/kernel/ports with GCC 4.3+? Also has anyone tried this and benchmarked the result? Regards, David signature.asc Description: This is a digitally signed message part.
FreeBSD and GCC
Hi All, I'm not to familiar with what goes on behind the scenes during the FreeBSD install process. So please forgive me if this is a dumb question. Is there any way to install FreeBSD without gcc and later build from the ports tree, to enable me to keep upto date with the gcc project releases. Like I said, I don't know if this is possible, but any replies are gratefully accepted. Mick Walker NAAFI Finance International ** This email and any files transmitted with it are confidential, and may be subject to legal privilege, and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error or think you may have done so, you may not peruse, use, disseminate, distribute or copy this message. Please notify the sender immediately and delete the original e-mail from your system. Computer viruses can be transmitted by e-mail. Recipients should check this e-mail for the presence of viruses. The Capita Group and its subsidiaries accept no liability for any damage caused by any virus transmitted by this e-mail. *** ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: FreeBSD and GCC
On Wed, 20 Oct 2004 09:01:07 +0100, Walker, Michael wrote Hi All, I'm not to familiar with what goes on behind the scenes during the FreeBSD install process. So please forgive me if this is a dumb question. Is there any way to install FreeBSD without gcc and later build from the ports tree, to enable me to keep upto date with the gcc project releases. Like I said, I don't know if this is possible, but any replies are gratefully accepted. Mick Walker NAAFI Finance International As far as I know, FreeBSD maintains their own version of GCC. They patch it theirselves while making sure it maintains its compatibility with the ports- tree. And no, you can't install FreeBSD without a compiler (correct me if I'm wrong) . It's just part of the OS. That is why you're way better off with the versions that come with original installation then one from the GCC project page. Your question could easily apply to Linux though, but FreeBSD is not like that. Cheers, Jorn. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: FreeBSD and GCC
Nopes its not possible. However you can very well use the gcc present in the port and use the knob to overwirte the system compiler although that is not recommended. Regards S. On Wed, 20 Oct 2004 09:01:07 +0100, Walker, Michael [EMAIL PROTECTED] wrote: Hi All, I'm not to familiar with what goes on behind the scenes during the FreeBSD install process. So please forgive me if this is a dumb question. Is there any way to install FreeBSD without gcc and later build from the ports tree, to enable me to keep upto date with the gcc project releases. Like I said, I don't know if this is possible, but any replies are gratefully accepted. Mick Walker NAAFI Finance International ** This email and any files transmitted with it are confidential, and may be subject to legal privilege, and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error or think you may have done so, you may not peruse, use, disseminate, distribute or copy this message. Please notify the sender immediately and delete the original e-mail from your system. Computer viruses can be transmitted by e-mail. Recipients should check this e-mail for the presence of viruses. The Capita Group and its subsidiaries accept no liability for any damage caused by any virus transmitted by this e-mail. *** ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] -- Subhro Sankha Kar School of Information Technology Block AQ-13/1 Sector V ZIP 700091 India ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: FreeBSD and GCC
On 2004-10-20 13:52, Subhro [EMAIL PROTECTED] wrote: On Wed, 20 Oct 2004 09:01:07 +0100, Michael Walker wrote: I'm not to familiar with what goes on behind the scenes during the FreeBSD install process. So please forgive me if this is a dumb question. Is there any way to install FreeBSD without gcc and later build from the ports tree, to enable me to keep upto date with the gcc project releases. Like I said, I don't know if this is possible, but any replies are gratefully accepted. Nopes its not possible. However you can very well use the gcc present in the port and use the knob to overwirte the system compiler although that is not recommended. It's possible to install the gcc-3.5 port under /usr/local and then set CC appropriately in your environment. This will let select programs build with the newer gcc but will keep the system compiler unchanged. Overwriting the system compiler might be a serious problem, especially if the newly installed proves to be buggy and in need of a replacement but is unable to complete a full buildworld cycle. You would then have to reinstall the entire system from the original installation media! P.S.: Please do not top-post and trim the quoted material to a 'reasonable' length without losing important context of the original post :-) ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: FreeBSD and GCC
On Wed, Oct 20, 2004 at 12:42:59PM +0300, Giorgos Keramidas wrote: On 2004-10-20 13:52, Subhro [EMAIL PROTECTED] wrote: On Wed, 20 Oct 2004 09:01:07 +0100, Michael Walker wrote: I'm not to familiar with what goes on behind the scenes during the FreeBSD install process. So please forgive me if this is a dumb question. Is there any way to install FreeBSD without gcc and later build from the ports tree, to enable me to keep upto date with the gcc project releases. Like I said, I don't know if this is possible, but any replies are gratefully accepted. Nopes its not possible. However you can very well use the gcc present in the port and use the knob to overwirte the system compiler although that is not recommended. It's possible to install the gcc-3.5 port under /usr/local and then set CC appropriately in your environment. This will let select programs build with the newer gcc but will keep the system compiler unchanged. Overwriting the system compiler might be a serious problem, especially if the newly installed proves to be buggy and in need of a replacement but is unable to complete a full buildworld cycle. You would then have to reinstall the entire system from the original installation media! Moreover, you usually can't build FreeBSD with a non-system version of the gcc compiler. Kris pgpNE1zdqt8TC.pgp Description: PGP signature