diff options
author | Jens Axboe <axboe@kernel.dk> | 2019-12-23 21:34:03 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-12-23 21:34:03 -0700 |
commit | 4332433754e872d54d612b35f329adfe5c70a969 (patch) | |
tree | 569c24b1e3bd191d84bd1aae74ed19f03ad0e974 | |
parent | 32fcace197a93b060001c90dbc0936bfa38ec294 (diff) | |
download | liburing-4332433754e872d54d612b35f329adfe5c70a969.tar.gz liburing-4332433754e872d54d612b35f329adfe5c70a969.tar.bz2 |
configure: allow to set host CC
Use ./configure --cc=whatever to set the compiler.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rwxr-xr-x | configure | 4 | ||||
-rw-r--r-- | examples/Makefile | 4 | ||||
-rw-r--r-- | src/Makefile | 4 | ||||
-rw-r--r-- | test/Makefile | 4 |
4 files changed, 16 insertions, 0 deletions
@@ -26,6 +26,8 @@ for opt do ;; --datadir=*) datadir="$optarg" ;; + --cc=*) cc="$optarg" + ;; *) echo "ERROR: unkown option $opt" echo "Try '$0 --help' for more information" @@ -215,3 +217,5 @@ fi if test "$__kernel_timespec" = "yes"; then output_sym "CONFIG_HAVE_KERNEL_TIMESPEC" fi + +echo "CC=$cc" >> $config_host_mak diff --git a/examples/Makefile b/examples/Makefile index 5896b45..28456a9 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -4,6 +4,10 @@ override CFLAGS += -Wall -D_GNU_SOURCE -L../src/ -I../src/include/ include ../Makefile.quiet +ifneq ($(MAKECMDGOALS),clean) +include ../config-host.mak +endif + all_targets += io_uring-test io_uring-cp link-cp ucontext-cp all: $(all_targets) diff --git a/src/Makefile b/src/Makefile index 07adf6e..88ca597 100644 --- a/src/Makefile +++ b/src/Makefile @@ -22,6 +22,10 @@ endif include ../Makefile.quiet +ifneq ($(MAKECMDGOALS),clean) +include ../config-host.mak +endif + all: $(all_targets) liburing_srcs := setup.c queue.c syscall.c register.c diff --git a/test/Makefile b/test/Makefile index 38217ab..1710c8b 100644 --- a/test/Makefile +++ b/test/Makefile @@ -22,6 +22,10 @@ all_targets += poll poll-cancel ring-leak fsync io_uring_setup io_uring_register include ../Makefile.quiet +ifneq ($(MAKECMDGOALS),clean) +include ../config-host.mak +endif + all: $(all_targets) %: %.c |