Wireshark-bugs: [Wireshark-bugs] [Bug 5878] gcc unrecognized option during build in OS X
Date: Tue, 4 Sep 2012 03:27:07 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5878

Andras Salamon <andras@xxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andras@xxxxxxx

--- Comment #7 from Andras Salamon <andras@xxxxxxx> 2012-09-04 03:27:06 PDT ---
I'm getting bitten by this also.

I am trying to build wireshark with GNU gcc 4.6.3 on a Mac.  The configure.ac
snippet highlighted in this bug assumes that any Mac will be using an Apple
gcc.  This assumption is wrong.

Several packages appear to detect "real" gcc vs. XCode pseudo-gcc in their
autoconf macros.  Doing so would be a better solution than hardcoding flags for
the compiler based on the operating system.  I do not know the canonical way to
do this.

As an interim solution, it would be better to use the output of gcc --version
as suggested by Jeff Morriss, in preference to the existing snippet that uses
$host_os.  As another data point, the first line of output of gcc --version for
my GNU gcc:
gcc (GCC) 4.6.3
while for my Apple gcc this is:
i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493)

So it should work to distinguish the compilers based on a regular expression
like /apple-.*-gcc/ in the first line of gcc --version output, as suggested by
Tony Trinh.

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are watching all bug changes.