Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 06 Sep 2015 21:09:42 +0930
From:      Shane Ambler <FreeBSD@ShaneWare.Biz>
To:        "William A. Mahaffey III" <wam@hiwaay.net>,  "FreeBSD Questions !!!!" <freebsd-questions@freebsd.org>
Subject:   Re: GCC question
Message-ID:  <55EC25FE.4070802@ShaneWare.Biz>
In-Reply-To: <55EAF922.2020906@hiwaay.net>
References:  <55EAEE19.2060807@hiwaay.net> <55EAF922.2020906@hiwaay.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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/

> 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 12.0.3.174 Build 20110309
> Copyright (C) 1985-2011 Intel Corporation.  All rights reserved.
> FOR NON-COMMERCIAL USE ONLY
>
> 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

-- 
FreeBSD - the place to B...Software Developing

Shane Ambler




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55EC25FE.4070802>