UpstandingHackers / hammer

Parser combinators for binary formats, in C. Yes, in C. What? Don't look at me like that.
GNU General Public License v2.0
431 stars 40 forks source link

Fix SConstruct for darwin. #188

Open schulze opened 6 years ago

schulze commented 6 years ago

This fixes the build to respect CC=gcc on darwin and to ignore a warning that breaks the build with xcodes's clang on my system.

prashantbarca commented 6 years ago

@schulze -Wno-unknown-pragmas sufficed for me to get it to work with clang!

schulze commented 6 years ago

@prashantbarca -Wno-unknown-pragmas does not suffice on this system:

clang -o build/opt/src/backends/regex.os -c -std=gnu99 -Wall -Wextra -Werror -Wno-unused-parameter -Wno-attributes -Wno-unused-variable -Wno-unknown-pragmas -O3 -fPIC 
build/opt/src/backends/regex.c
build/opt/src/backends/regex.c:229:32: error: unknown warning group '-Wclobbered', ignored
  [-Werror,-Wunknown-warning-option]
#pragma GCC diagnostic ignored "-Wclobbered"
                           ^
1 error generated.

Mac OS X is not my native habitat, so it might well be that I am missing something here. Xcode should be up to date.

schulze commented 6 years ago

As the error message say, the problem here is not a unknown pragma, but the unknown warning that is introduced by the pragma.