Skip to content

cmd/cgo: problem with clang on os x #6133

@rsc

Description

@rsc
---------- Forwarded message ----------
From: james4k <sslice@gmail.com>
Date: Mon, Aug 12, 2013 at 5:30 PM
Subject: [golang-dev] cgo and guessKind() on darwin (10.8)
To: golang-dev@googlegroups.com


Hello,

On tip I am receiving a cgo error on the package github.com/go-gl/gl, while it works
fine on 1.1; the output is "gcc produced no output". This error comes from the
guessKind() method in src/cmd/cgo/gcc.go and appears to have started when clang was made
the default CC for darwin. Testing this with CC=gcc seems to confirm this (builds
successfully). I have not tested this with any other versions of clang or on linux, but
it looks like guessKind() is a very GCC specific routine that will need to be adapted to
support other compilers like clang, but I have limited knowledge on this.

Not sure whether or not to submit an actual issue as non-gcc support seemed to be a work
in progress, but posted here for your awareness.

$ clang -v
Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin12.4.0
Thread model: posix

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions