Skip to contentSkip to conversation

Fix compiler flags when CFLAGS is set in the environment

PATCH In review Luiz Augusto von Dentz 2 participants 2 messages Dec 9, 2010

Subsystems (2)
lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH v2 1/1 Fix compiler flags when CFLAGS is set in the environment

From: Luiz Augusto von Dentz <[email protected]>

D_FILE_OFFSET_BITS need to be set even if CFLAGS is not empty

---
 Makefile.am  |    2 +-
 acinclude.m4 |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Makefile.am +1 -1
index 175747c..a317556 100644
@@ -123,7 +123,7 @@ service_DATA = $(service_in_files:.service.in=.service)
 
 AM_CFLAGS = @OPENOBEX_CFLAGS@ @BLUEZ_CFLAGS@ @EBOOK_CFLAGS@ \
 			@GTHREAD_CFLAGS@ @GLIB_CFLAGS@ @DBUS_CFLAGS@ \
-			@LIBICAL_CFLAGS@ \
+			@LIBICAL_CFLAGS@ -D_FILE_OFFSET_BITS=64 \
 			-DOBEX_PLUGIN_BUILTIN -DPLUGINDIR=\""$(plugindir)"\"
 
 INCLUDES = -I$(builddir)/src -I$(srcdir)/src -I$(srcdir)/plugins \
acinclude.m4 +1 -1
index 3d1f511..4594073 100644
@@ -12,7 +12,7 @@ AC_DEFUN([AC_PROG_CC_PIE], [
 
 AC_DEFUN([COMPILER_FLAGS], [
 	if (test "${CFLAGS}" = ""); then
-		CFLAGS="-Wall -O2 -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64"
+		CFLAGS="-Wall -O2 -D_FORTIFY_SOURCE=2"
 	fi
 	if (test "$USE_MAINTAINER_MODE" = "yes"); then
 		CFLAGS+=" -Werror -Wextra"
Signature · 1 line
1.7.1
#1 lore raw

Hi Luiz,

Quoted 5 lines · Luiz Augusto von Dentz

D_FILE_OFFSET_BITS need to be set even if CFLAGS is not empty

---
 Makefile.am  |    2 +-
 acinclude.m4 |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Pushed upstream. Thanks.

Johan