From owner-freebsd-questions@freebsd.org Sat Sep 5 16:10:31 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 D55B89CA580 for ; Sat, 5 Sep 2015 16:10:31 +0000 (UTC) (envelope-from carlj@peak.org) Received: from filter01.peakinternet.com (filter01.peakinternet.com [207.55.16.92]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADBD56BD for ; Sat, 5 Sep 2015 16:10:31 +0000 (UTC) (envelope-from carlj@peak.org) Received: from zmail-mta02.peak.org ([207.55.16.112]) by filter01.peakinternet.com ({e1c81c21-e4c4-4528-aa90-7a27869c545a}) via TCP (outbound) with ESMTPS id 20150905160703559_0000 for ; Sat, 05 Sep 2015 09:07:03 -0700 X-RC-FROM: X-RC-RCPT: Received: from zmail-mta02.peak.org (localhost [127.0.0.1]) by zmail-mta02.peak.org (Postfix) with ESMTPS id 5AB984E015 for ; Sat, 5 Sep 2015 09:07:02 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zmail-mta02.peak.org (Postfix) with ESMTP id 425624DE78 for ; Sat, 5 Sep 2015 09:07:02 -0700 (PDT) Received: from zmail-mta02.peak.org ([127.0.0.1]) by localhost (zmail-mta02.peak.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id NxkcdvNqp4Pw for ; Sat, 5 Sep 2015 09:07:02 -0700 (PDT) Received: from mailproxy-lb-05.peak.org (mailproxy-lb-05.peak.org [207.55.17.95]) by zmail-mta02.peak.org (Postfix) with ESMTP id 0EE4E4E015 for ; Sat, 5 Sep 2015 09:07:02 -0700 (PDT) Received: from carlj by elk.localnet with local (Exim 4.80) (envelope-from ) id 1ZYFzY-0007D4-WC for freebsd-questions@freebsd.org; Sat, 05 Sep 2015 09:07:01 -0700 From: Carl Johnson To: freebsd-questions@freebsd.org Subject: Re: GCC question References: <55EAEE19.2060807@hiwaay.net> <20150905140658.GA790@ozzmosis.com> <55EAF9BA.3080700@hiwaay.net> Mail-Followup-To: freebsd-questions@freebsd.org X-Clacks-Overhead: GNU Terry Pratchett Date: Sat, 05 Sep 2015 09:07:00 -0700 In-Reply-To: <55EAF9BA.3080700@hiwaay.net> (William A. Mahaffey, III's message of "Sat, 5 Sep 2015 09:24:04 -0453.75") Message-ID: <87oahg97ff.fsf@elk.localnet> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MAG-OUTBOUND: peakinternet.redcondor.net@207.55.16/22 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: Sat, 05 Sep 2015 16:10:31 -0000 "William A. Mahaffey III" writes: > On 09/05/15 09:13, andrew clarke wrote: >> On Sat 2015-09-05 08:34:27 UTC-0453, William A. Mahaffey III (wam@hiwaay.net) 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, I need >>> to tweek some of my app-specific header files. I have poked around the >>> (*COPIOUS* !!!!) GCC man page & I couldn't find (or missed) either how >>> to get it to regurgitate its default compiler-defines or a tabulation of >>> those defines, so I can use them to conditionally include system headers >>> in my own header files. Where is this info :-) ? TIA & have a nice >>> (long) weekend. >> You probably want: >> >> gcc -dM -E - < /dev/null >> >> Ordinarily to detect FreeBSD you'd use: >> >> #ifdef __FreeBSD__ >> ... >> #endif >> > > *Booooyah* !!!! Both worked AOK. I haven't used gcc in a while, so > there may be a few more noob-ish questions to follow :-/ .... Thanks > again & have a nice weekend. As long as this came up, does anybody know of a similar incantation to show the defined rules and symbols for make? I remember seeing something like that years ago, but I haven't been able to find it since. Thanks. -- Carl Johnson carlj@peak.org