aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2021-02-15 19:45:13 +0200
committerLasse Collin <lasse.collin@tukaani.org>2021-02-15 19:46:09 +0200
commitd8a12bc0c61282b38439ee76b05dbde0200002e1 (patch)
tree379121c41022926c02030155cb60e7058c27966d
parentef038b9db55bba73e2574ae451d62e16ce9c0ef9 (diff)
downloadxz-embedded-d8a12bc0c61282b38439ee76b05dbde0200002e1.tar.gz
userspace/Makefile: Add a comment about -std=gnu89 and add -Wno-long-long.
gcc -std=gnu89 -pedantic warns about the ULL integer constant suffix in xz_crc64.c so silence it with -Wno-long-long. clang -std=gnu89 -pedantic is noisy about C99 features and language extensions. Omitting either option silences all these warnings, so mention this in a comment.
-rw-r--r--userspace/Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/userspace/Makefile b/userspace/Makefile
index 8bfb98b..d39d041 100644
--- a/userspace/Makefile
+++ b/userspace/Makefile
@@ -7,11 +7,14 @@
# You can do whatever you want with this file.
#
+# gcc -std=gnu89 is used because Linux uses it. It is fine to omit it as
+# the code is also C99/C11 compatible. With clang you may wish to omit
+# either -std=gnu89 or -pedantic as having both gives quite a few warnings.
CC = gcc -std=gnu89
BCJ_CPPFLAGS = -DXZ_DEC_X86 -DXZ_DEC_POWERPC -DXZ_DEC_IA64 \
-DXZ_DEC_ARM -DXZ_DEC_ARMTHUMB -DXZ_DEC_SPARC
CPPFLAGS = -DXZ_USE_CRC64 -DXZ_DEC_ANY_CHECK
-CFLAGS = -ggdb3 -O2 -pedantic -Wall -Wextra
+CFLAGS = -ggdb3 -O2 -pedantic -Wall -Wextra -Wno-long-long
RM = rm -f
VPATH = ../linux/include/linux ../linux/lib/xz
COMMON_SRCS = xz_crc32.c xz_crc64.c xz_dec_stream.c xz_dec_lzma2.c xz_dec_bcj.c