<commit_before>PREFIX	?= /usr
EXEC_PREFIX ?= $(PREFIX)
LIBDIR	?= $(PREFIX)/lib64
DATADIR	?= $(PREFIX)/share
MANDIR	?= $(DATADIR)/man
INCLUDEDIR ?= $(PREFIX)/include
BINDIR	?= $(EXEC_PREFIX)/bin
PCDIR	?= $(LIBDIR)/pkgconfig
DESTDIR	?=
PKGS	?=

CROSS_COMPILE	?=
COMPILER 	?= gcc
ifeq ($(origin CC),command line)
override COMPILER := $(CC)
override CC := $(CROSS_COMPILE)$(COMPILER)
endif
$(call set-if-undefined,CC,$(CROSS_COMPILE)$(COMPILER))
$(call set-if-undefined,CCLD,$(CC))
$(call set-if-undefined,HOSTCC,$(COMPILER))
$(call set-if-undefined,HOSTCCLD,$(HOSTCC))

# temporary, see https://sourceware.org/bugzilla/show_bug.cgi?id=28264
#OPTIMIZE_GCC = -flto
OPTIMIZE_GCC =
OPTIMIZE ?= -Og $(call family,OPTIMIZE)
DEBUGINFO ?= -g3
WARNINGS_GCC ?=
WARNINGS_CCC_ANALYZER ?= $(WARNINGS_GCC)
WARNINGS ?= -Wall -Wextra $(call family,WARNINGS)
ERRORS_GCC ?=
ERRORS ?= -Werror $(call family,ERRORS)
CPPFLAGS ?=
override _CPPFLAGS := $(CPPFLAGS)
override CPPFLAGS = $(_CPPFLAGS) -DLIBEFIVAR_VERSION=$(VERSION) \
	    -D_GNU_SOURCE \
	    -I$(TOPDIR)/src/include/
CFLAGS ?= $(OPTIMIZE) $(DEBUGINFO) $(WARNINGS) $(ERRORS)
CFLAGS_GCC ?= -specs=$(TOPDIR)/src/include/gcc.specs \
	      -fno-merge-constants
override _CFLAGS := $(CFLAGS)
override CFLAGS = $(_CFLAGS) \
		  -std=gnu11 \
		  -funsigned-char \
		  -fvisibility=hidden \
		  $(call family,CFLAGS) \
		  $(call pkg-config-cflags)
LDFLAGS_CLANG ?= -rtlib=compiler-rt
CCLDFLAGS ?=
LDFLAGS ?=
override _CCLDFLAGS := $(CCLDFLAGS)
override _LDFLAGS := $(LDFLAGS)
override LDFLAGS = $(CFLAGS) -L. $(_LDFLAGS) $(_CCLDFLAGS) \
		   -Wl,--add-needed \
		   -Wl,--build-id \
		   -Wl,--no-allow-shlib-undefined \
		   -Wl,--no-undefined-version \
		   -Wl,-z,now \
		   -Wl,-z,muldefs \
		   -Wl,-z,relro \
		   -Wl,--fatal-warnings \
		   $(call family,LDFLAGS) $(call family,CCLDFLAGS) \
		   $(call pkg-config-ccldflags)
override CCLDFLAGS = $(LDFLAGS)
SOFLAGS_GCC =
SOFLAGS_CLANG =
SOFLAGS ?=
override _SOFLAGS := $(SOFLAGS)
override SOFLAGS = $(_SOFLAGS) \
		   -shared -Wl,-soname,$@.1 \
		   -Wl,--version-script=$(MAP) \
		   $(call family,SOFLAGS)

HOST_ARCH=$(shell uname -m)
ifneq ($(HOST_ARCH),ia64)
	HOST_MARCH=-march=native
else<commit_msg>Fix the -march issue for riscv64<commit_after>PREFIX	?= /usr
EXEC_PREFIX ?= $(PREFIX)
LIBDIR	?= $(PREFIX)/lib64
DATADIR	?= $(PREFIX)/share
MANDIR	?= $(DATADIR)/man
INCLUDEDIR ?= $(PREFIX)/include
BINDIR	?= $(EXEC_PREFIX)/bin
PCDIR	?= $(LIBDIR)/pkgconfig
DESTDIR	?=
PKGS	?=

CROSS_COMPILE	?=
COMPILER 	?= gcc
ifeq ($(origin CC),command line)
override COMPILER := $(CC)
override CC := $(CROSS_COMPILE)$(COMPILER)
endif
$(call set-if-undefined,CC,$(CROSS_COMPILE)$(COMPILER))
$(call set-if-undefined,CCLD,$(CC))
$(call set-if-undefined,HOSTCC,$(COMPILER))
$(call set-if-undefined,HOSTCCLD,$(HOSTCC))

# temporary, see https://sourceware.org/bugzilla/show_bug.cgi?id=28264
#OPTIMIZE_GCC = -flto
OPTIMIZE_GCC =
OPTIMIZE ?= -Og $(call family,OPTIMIZE)
DEBUGINFO ?= -g3
WARNINGS_GCC ?=
WARNINGS_CCC_ANALYZER ?= $(WARNINGS_GCC)
WARNINGS ?= -Wall -Wextra $(call family,WARNINGS)
ERRORS_GCC ?=
ERRORS ?= -Werror $(call family,ERRORS)
CPPFLAGS ?=
override _CPPFLAGS := $(CPPFLAGS)
override CPPFLAGS = $(_CPPFLAGS) -DLIBEFIVAR_VERSION=$(VERSION) \
	    -D_GNU_SOURCE \
	    -I$(TOPDIR)/src/include/
CFLAGS ?= $(OPTIMIZE) $(DEBUGINFO) $(WARNINGS) $(ERRORS)
CFLAGS_GCC ?= -specs=$(TOPDIR)/src/include/gcc.specs \
	      -fno-merge-constants
override _CFLAGS := $(CFLAGS)
override CFLAGS = $(_CFLAGS) \
		  -std=gnu11 \
		  -funsigned-char \
		  -fvisibility=hidden \
		  $(call family,CFLAGS) \
		  $(call pkg-config-cflags)
LDFLAGS_CLANG ?= -rtlib=compiler-rt
CCLDFLAGS ?=
LDFLAGS ?=
override _CCLDFLAGS := $(CCLDFLAGS)
override _LDFLAGS := $(LDFLAGS)
override LDFLAGS = $(CFLAGS) -L. $(_LDFLAGS) $(_CCLDFLAGS) \
		   -Wl,--add-needed \
		   -Wl,--build-id \
		   -Wl,--no-allow-shlib-undefined \
		   -Wl,--no-undefined-version \
		   -Wl,-z,now \
		   -Wl,-z,muldefs \
		   -Wl,-z,relro \
		   -Wl,--fatal-warnings \
		   $(call family,LDFLAGS) $(call family,CCLDFLAGS) \
		   $(call pkg-config-ccldflags)
override CCLDFLAGS = $(LDFLAGS)
SOFLAGS_GCC =
SOFLAGS_CLANG =
SOFLAGS ?=
override _SOFLAGS := $(SOFLAGS)
override SOFLAGS = $(_SOFLAGS) \
		   -shared -Wl,-soname,$@.1 \
		   -Wl,--version-script=$(MAP) \
		   $(call family,SOFLAGS)

HOST_ARCH=$(shell uname -m)
ifneq ($(HOST_ARCH),ia64)
ifneq ($(HOST_ARCH),riscv64)
	HOST_MARCH=-march=native
else
	HOST_MARCH=
endif
else
{'fraction_non_alphanumeric': 0.18071748878923766, 'fraction_numerical': 0.006726457399103139, 'mean_word_length': 4.075085324232082, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '321199', 'n_tokens_mistral': 1934, 'n_tokens_neox': 1770, 'n_words': 309}