diff options
author | Peter Osterlund <petero2@telia.com> | 2003-12-03 00:20:33 +0100 |
---|---|---|
committer | Peter Osterlund <petero2@telia.com> | 2006-04-09 04:01:28 +0200 |
commit | 9bb7c8a065dcdc61a7c5e7a73be8c94bcb0a09aa (patch) | |
tree | 1657935767c0ebbccd893227047476da5d8d9473 /Makefile | |
parent | 60407d1e3d7f27dbe1a63e42499b889d2997ec1f (diff) |
Only use the -fno-merge-constants compiler flag if the
compiler understands it.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -27,7 +27,10 @@ PROTO_DEFINES = -DFUNCPROTO=15 -DNARROWPROTO STD_DEFINES = -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -DSHAPE -DXINPUT -DXKB -DLBX -DXAPPGROUP -DXCSECURITY -DTOGCUP -DDPMSExtension -DPIXPRIV -DPANORAMIX -DRENDER -DGCCUSESGAS -DAVOID_GLYPHBLT -DPIXPRIV -DSINGLEDEPTH -DXFreeXDGA -DXvExtension -DXFree86LOADER -DXFree86Server -DXF86VIDMODE -DSMART_SCHEDULE -DBUILDDEBUG -DX_BYTE_ORDER=X_LITTLE_ENDIAN -DNDEBUG ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(MODULE_DEFINES) -CCOPTIONS = -pedantic -Wall -Wpointer-arith -fno-merge-constants +check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;) + +CCOPTIONS = -pedantic -Wall -Wpointer-arith +CCOPTIONS += $(call check_gcc,-fno-merge-constants,) CDEBUGFLAGS = -O2 CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES) CFLAGSCLIENT = $(CDEBUGFLAGS) $(CCOPTIONS) -I$(INSTALLED_X)/include |