Date: Sun, 6 Sep 2015 09:44:56 -0453.75 From: "William A. Mahaffey III" <wam@hiwaay.net> To: FreeBSD Questions !!!! <freebsd-questions@freebsd.org> Subject: Re: GCC question Message-ID: <55EC501E.10403@hiwaay.net> In-Reply-To: <55EC25FE.4070802@ShaneWare.Biz> References: <55EAEE19.2060807@hiwaay.net> <55EAF922.2020906@hiwaay.net> <55EC25FE.4070802@ShaneWare.Biz>
next in thread | previous in thread | raw e-mail | index | archive | help
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 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 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55EC501E.10403>