The latest Xcode has hijacked /usr/bin/gcc and made it mean:
$ /usr/bin/gcc --version
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Now every source file of my favorite project, which compiled cleanly with real gcc last week, throws a warning:
warning: illegal character encoding in string literal [-Winvalid-source-encoding]
The source files are encoded in ISO 8859-9. (The execution charset is the same btw.) How can I tell Apple's faux gcc that? In spite of its name, it evidently doesn't understand gcc's -finput-charset flag:
clang: error: unknown argument: '-finput-charset=ISO8859-9' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
Grateful for all hints.
Ah! The "Xcode command line tools" provide a real gcc. I ran
xcode-select --install
to install them, and I'm back in business.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With