summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlviro Iskandar Setiawan <alviro.iskandar@gnuweeb.org>2022-02-23 00:43:33 +0700
committerAmmar Faizi <ammarfaizi2@gnuweeb.org>2022-02-23 11:46:05 +0700
commit2cd9452658b6420e0211ed0a0e1440bed50bdbf7 (patch)
tree15dd0030a230a6d9bf032c4137c0375d8b828a21
parent3472a5887fe4423664c21136471807bd7f9a99bf (diff)
downloadliburing-2cd9452658b6420e0211ed0a0e1440bed50bdbf7.tar.gz
liburing-2cd9452658b6420e0211ed0a0e1440bed50bdbf7.tar.bz2
configure: Fix clang-12 warning `-Wdeprecated`
``` clang-12: warning: treating 'c' input as 'c++' when in C++ mode, this \ behvior is deprecated [-Wdeprecated] ``` The target compile is C++ but the file extension is ".c". Got the above warning from clang. Fix it by creating a temporary file with ".cpp" extension and use it. Introduced by commit d9f953770708ad ("configure: test for presence of C++ compiler"). Fixes: d9f953770708ad6893140dc2d11258223ba7abfd ("configure: test for presence of C++ compiler") Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Alviro Iskandar Setiawan <alviro.iskandar@gnuweeb.org> Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
-rwxr-xr-xconfigure7
1 files changed, 4 insertions, 3 deletions
diff --git a/configure b/configure
index b8ecb7b..512a556 100755
--- a/configure
+++ b/configure
@@ -81,10 +81,11 @@ fi
TMP_DIRECTORY="$(mktemp -d)"
TMPC="$TMP_DIRECTORY/liburing-conf.c"
TMPC2="$TMP_DIRECTORY/liburing-conf-2.c"
+TMPCXX="$TMP_DIRECTORY/liburing-conf-2.cpp"
TMPO="$TMP_DIRECTORY/liburing-conf.o"
TMPE="$TMP_DIRECTORY/liburing-conf.exe"
-touch $TMPC $TMPC2 $TMPO $TMPE
+touch $TMPC $TMPC2 $TMPCXX $TMPO $TMPE
# NB: do not call "exit" in the trap handler; this is buggy with some shells;
# see <1285349658-3122-1-git-send-email-loic.minier@linaro.org>
@@ -171,7 +172,7 @@ compile_prog_cxx() {
local_cflags="$1"
local_ldflags="$2 $LIBS"
echo "Compiling test case $3" >> config.log
- do_cxx $CFLAGS $local_cflags -o $TMPE $TMPC $LDFLAGS $local_ldflags
+ do_cxx $CFLAGS $local_cflags -o $TMPE $TMPCXX $LDFLAGS $local_ldflags
}
has() {
@@ -334,7 +335,7 @@ print_config "glibc_statx" "$glibc_statx"
##########################################
# check for C++
has_cxx="no"
-cat > $TMPC << EOF
+cat > $TMPCXX << EOF
#include <iostream>
int main(int argc, char **argv)
{