GCC question

William A. Mahaffey III wam at hiwaay.net
Sun Sep 6 14:39:36 UTC 2015

On 09/06/15 06:45, Shane Ambler wrote:
> On 05/09/2015 23:44, William A. Mahaffey III wrote:
>>> I have some code which was originally SGI native, then moved to Linux
>>> (FC14 x86_64 & CentOS 5). I am now interested in getting it going
>>> under FreeBSD 9.3R. Due to differences in system header file includes,
> Two points of reference -
> https://www.freebsd.org/doc/en/books/developers-handbook/
> and
> https://www.freebsd.org/doc/en/books/porters-handbook/

*Thanks*, both good references, I bookmarked them & will refer back 
often until I get up to speed.

>> i.e. my little test program includes 1 of my specific header files,
>> which in turn includes <math.h>, which defines pow, log, etc. Since gcc
>> apparently only reports some random text location, I am having trouble
>> figuring out WTF is going on here. I normnally compile this code on a
>> CentOS 5 VM on another box using the Intel compiler suite, version:
>> Intel(R) C Intel(R) 64 Compiler XE for applications running on Intel(R)
>> 64, Version Build 20110309
>> Copyright (C) 1985-2011 Intel Corporation.  All rights reserved.
>> I haven't used GCC in years. I determined (some years back) that the
>> Intel compiler produces noticably better code (executes 25 - 50% faster
>> than GCC-compiled code, gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-54)) &
>> is otherwise interoperable w/ GCC, so I have been using it ever since.
> You may also want to look at clang. While 9.3 has gcc 4.2 in base, from
> 10.0 only clang is included in the base freebsd install. gcc will still
> be available in ports.
> Another point to note is that from 10.0 freebsd also started using the
> llvm libc++ instead of gcc's libstdc++ which may need changes.
> You can #include <sys/param.h> and test __FreeBSD_version to handle
> variations between system versions. see 12.4 in porters handbook.
> If you are after omp support then clang 3.7RC is now in ports with omp
> support. devel/llvm37

While this is still the topic, is there a way to tell GCC to only talk 
about x86_64 options in the man page (or in its CLI online help), rather 
than *ALL* supported architectures ? TIA & have a good one.


	William A. Mahaffey III


	"The M1 Garand is without doubt the finest implement of war
	 ever devised by man."
                            -- Gen. George S. Patton Jr.

More information about the freebsd-questions mailing list