Skip to content

Commit e07a859

Browse files
committed
Merge branch 'make-cflags' of https://github.com/phlax/liburing
* 'make-cflags' of https://github.com/phlax/liburing: build: Pass env CFLAGS through to make
2 parents c4f38cd + 9b8fe84 commit e07a859

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

configure

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,9 @@ print_config() {
120120
}
121121

122122
# Default CFLAGS
123-
CFLAGS="-D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -include config-host.h"
124-
BUILD_CFLAGS=""
123+
ENV_CFLAGS="${CFLAGS}"
124+
CFLAGS="${CFLAGS:+$CFLAGS }-D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -include config-host.h"
125+
BUILD_CFLAGS="${ENV_CFLAGS}"
125126

126127
# Print configure header at the top of $config_host_h
127128
echo "/*" > $config_host_h
@@ -588,6 +589,7 @@ fi
588589
echo "CC=$cc" >> $config_host_mak
589590
print_config "CC" "$cc"
590591
echo "CXX=$cxx" >> $config_host_mak
592+
echo "BUILD_CFLAGS=$BUILD_CFLAGS" >> $config_host_mak
591593
print_config "CXX" "$cxx"
592594

593595
# generate io_uring_version.h

src/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ override CPPFLAGS += -D_GNU_SOURCE \
1313
CFLAGS ?= -O3 -Wall -Wextra -fno-stack-protector
1414
override CFLAGS += -Wno-unused-parameter \
1515
-DLIBURING_INTERNAL \
16+
$(BUILD_CFLAGS) \
1617
$(LIBURING_CFLAGS)
1718
SO_CFLAGS=-fPIC $(CFLAGS)
1819
L_CFLAGS=$(CFLAGS)

0 commit comments

Comments
 (0)