Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Automatic setting of CC on OS X #340

Closed
wants to merge 1 commit into from

2 participants

@tchajed

Avoids the need to set CC manually on OS X. This takes care of issue #308 without a workaround.

@PromyLOPh
Owner
@tchajed

Yes, since Lion (the oldest official supported release due to Apple's policies) it's no longer true that c99 generates 32-bit binaries by default on OS X. Modifying CFLAGS doesn't fix the actual issue on OS X, which is that c99 doesn't support the -M option to generate dependency files, while gcc does. This doesn't actually hinder building (the dependencies are not necessary for a first-time build), but it's not good for development since incremental recompilation can be incorrect and make generates unnecessary "unsupported option -- M" messages.

You can probably leave that note in the INSTALL, with the caveat that it's for Snow Leopard (I can't test that out, though).

@PromyLOPh PromyLOPh referenced this pull request from a commit
@tchajed tchajed Use gcc -std=c99 instead of c99 on OS X
Automatic checking in Makefile. Fixes #308 and #340.
4ebcb14
@PromyLOPh PromyLOPh referenced this pull request from a commit
@PromyLOPh Remove install note about OS X
Should work “out of the box” now. See #340.
efd4f39
@PromyLOPh
Owner
@PromyLOPh PromyLOPh closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 5, 2013
  1. @tchajed

    using gcc -std=c99 instead of c99 on OS X

    tchajed authored
    automatic checking in Makefile
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 1 deletion.
  1. +6 −1 Makefile
View
7 Makefile
@@ -12,7 +12,12 @@ ifeq (${CFLAGS},)
CFLAGS=-O2 -DNDEBUG
endif
ifeq (${CC},cc)
- CC=c99
+ OS := $(shell uname)
+ ifeq (${OS},Darwin)
+ CC=gcc -std=c99
+ else
+ CC=c99
+ endif
endif
PIANOBAR_DIR=src
Something went wrong with that request. Please try again.