Skip to contentSkip to conversation

btrfs-progs: allow CFLAGS specification in new build

PATCH In review Eric Sandeen 1 participant 2 messages Feb 5, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs-progs: allow CFLAGS specification in new build

Disclaimer: I am not an auto$FOO expert by any means.

But I could find no way to specify additional CFLAGS, and I think that this is because they are hard-coded in configure.ac.

The below works for me, but I don't know if it's the right solution...

---

Makefile.in +1 -0
index 93b6a3c..4a36f6a 100644
@@ -12,6 +12,7 @@ DISABLE_BTRFSCONVERT = @DISABLE_BTRFSCONVERT@
 
 # Non-static compilation flags
 CFLAGS = @CFLAGS@ \
+	 -g -O1 \
 	 -include config.h -Wall \
 	 -D_FILE_OFFSET_BITS=64 -DBTRFS_FLAT_INCLUDES \
 	 -D_XOPEN_SOURCE=700  \
configure.ac +0 -2
index cbad099..f6ebb7d 100644
@@ -8,8 +8,6 @@ LIBBTRFS_MAJOR=0
 LIBBTRFS_MINOR=1
 LIBBTRFS_PATCHLEVEL=1
 
-CFLAGS="-g -O1"
-
 AC_PREREQ([2.60])
 
 AC_CONFIG_AUX_DIR([config])
#1 lore raw
Quoted 6 lines · Eric Sandeen

Disclaimer: I am not an auto$FOO expert by any means.

But I could find no way to specify additional CFLAGS, and I think that this is because they are hard-coded in configure.ac.

The below works for me, but I don't know if it's the right solution...

gah, looking at the wrong branch in git. Never mind.

-Eric