From owner-freebsd-questions@freebsd.org Sun Sep 6 14:39:35 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBE5E9C5E1D for ; Sun, 6 Sep 2015 14:39:35 +0000 (UTC) (envelope-from wam@hiwaay.net) Received: from fly.hiwaay.net (fly.hiwaay.net [216.180.54.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC2CC286 for ; Sun, 6 Sep 2015 14:39:34 +0000 (UTC) (envelope-from wam@hiwaay.net) Received: from kabini1.local (dynamic-216-186-222-143.knology.net [216.186.222.143] (may be forged)) (authenticated bits=0) by fly.hiwaay.net (8.13.8/8.13.8/fly) with ESMTP id t86EdQIN018654 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Sun, 6 Sep 2015 09:39:27 -0500 Subject: Re: GCC question To: FreeBSD Questions !!!! References: <55EAEE19.2060807@hiwaay.net> <55EAF922.2020906@hiwaay.net> <55EC25FE.4070802@ShaneWare.Biz> From: "William A. Mahaffey III" Message-ID: <55EC501E.10403@hiwaay.net> Date: Sun, 6 Sep 2015 09:44:56 -0453.75 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <55EC25FE.4070802@ShaneWare.Biz> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Sep 2015 14:39:36 -0000 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 , 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 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.