clang: error: unsupported option '-static-libgcc' on Mac OSX Mavericks

11,674

Solution 1

The command called gcc is not really GCC on Mavericks. It's just a copy of Clang:

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix

That means it doesn't support GCC-only flags like -static-libgcc. Find out what part of your build system is generating that flag and get rid of it.

Solution 2

You can fix this by putting this line in your gluegen.properties file (which should be in your Users/yourname directory):

gcc.compat.compiler=clang

This tells the JOGL build system that it's using Clang. Otherwise, it thinks it's using gcc, and tries to use gcc-specific options. This fails on Mavericks because gcc is now just a link to Clang.

Share:
11,674
Jagan Veeraraghavan
Author by

Jagan Veeraraghavan

Updated on June 18, 2022

Comments

  • Jagan Veeraraghavan
    Jagan Veeraraghavan almost 2 years

    I am trying to compile jogl from source on my Mac Mini with Mac OSX mavericks, but getting
    clang: error: unsupported option '-static-libgcc' on Mac OSX Mavericks I have XCode 5.0.1 (5A2053) and installed the Command line tools for OSX Mavericks Any hints on how to fix this issue

  • Jagan Veeraraghavan
    Jagan Veeraraghavan over 10 years
    Thanks Carl. That seems to have fixed the compilation problem. Though i dont know how it will impact the output. ( I am a Java dev and completely new to C & GCC )
  • Andrei
    Andrei about 10 years
    This didn't help me, so I did as @Carl Norum advises and removed -static-libgcc from Makefiles
  • kirikoumath
    kirikoumath almost 10 years
    Where/How can I find this?
  • kirikoumath
    kirikoumath almost 10 years
    My error is the following: clang: error: unsupported option '-dumpspecs' clang: error: no input files
  • Carl Norum
    Carl Norum almost 10 years
    @user5503 how can you find what?