Skip to contentSkip to conversation

build with correct CFLAGS on Solaris

PATCH New John Levon 1 participant 1 message Oct 18, 2006

lore
Share & tools
lore

John Levon

author
#0 lore raw

PATCH 1/1 build with correct CFLAGS on Solaris

# HG changeset patch
# User [email protected]
# Date 1161189563 25200
# Node ID f86a41c2fd4c90223a40a526b4b4c6e977cf9ce6
# Parent 9896b7c861815d0939ef9915904002bc97797386
Many of the tools use C99 features such as bool, or expect certain functions. Fix the CFLAGS to enable these on Solaris.

Also make sure the correct $CC is passed to Python.

config/SunOS.mk +2 -1
@@ -33,4 +33,5 @@ CFLAGS ?= -O1 -fno-omit-frame-pointer
 CFLAGS ?= -O1 -fno-omit-frame-pointer
 endif
 
-CFLAGS += -Wa,--divide
+CFLAGS += -Wa,--divide -D_POSIX_C_SOURCE=200112L -D__EXTENSIONS__
+
tools/python/Makefile +3 -3
@@ -6,15 +6,15 @@ all: build
 
 .PHONY: build
 build:
-	CFLAGS="$(CFLAGS)" python setup.py build
+	CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py build
 
 .PHONY: install
 ifndef XEN_PYTHON_NATIVE_INSTALL
 install: all
-	CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --prefix="" --force
+	CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --prefix="" --force
 else
 install: all
-	CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)" --force
+	CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)" --force
 endif
 
 .PHONY: test