Skip to content

Commit

Permalink
libselinux: use PCRE2 by default
Browse files Browse the repository at this point in the history
Quoting pcre.org:

    There are two major versions of the PCRE library. The current
    version, PCRE2, released in 2015, is now at version 10.39.

    The older, but still widely deployed PCRE library, originally
    released in 1997, is at version 8.45. This version of PCRE is now at
    end of life, and is no longer being actively maintained. Version
    8.45 is expected to be the final release of the older PCRE library,
    and new projects should use PCRE2 instead.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
  • Loading branch information
cgzones authored and jwcart2 committed Dec 9, 2021
1 parent 647909c commit e0da140
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion libselinux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ifeq ($(DISABLE_X11),y)
endif
export DISABLE_SETRANS DISABLE_RPM DISABLE_FLAGS ANDROID_HOST DISABLE_X11 LABEL_BACKEND_ANDROID

USE_PCRE2 ?= n
USE_PCRE2 ?= y
ifeq ($(USE_PCRE2),y)
PCRE_MODULE := libpcre2-8
PCRE_CFLAGS := -DUSE_PCRE2 -DPCRE2_CODE_UNIT_WIDTH=8
Expand Down
1 change: 0 additions & 1 deletion libselinux/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ override LDFLAGS += -L/opt/local/lib -undefined dynamic_lookup
LD_SONAME_FLAGS=-install_name,$(LIBSO)
endif

PCRE_LDLIBS ?= -lpcre
# override with -lfts when building on Musl libc to use fts-standalone
FTS_LDLIBS ?=

Expand Down
1 change: 0 additions & 1 deletion libselinux/utils/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ endif
override CFLAGS += -I../include -D_GNU_SOURCE $(DISABLE_FLAGS) $(PCRE_CFLAGS)
override LDFLAGS += -L../src
override LDLIBS += -lselinux $(FTS_LDLIBS)
PCRE_LDLIBS ?= -lpcre

ifeq ($(ANDROID_HOST),y)
TARGETS=sefcontext_compile
Expand Down

0 comments on commit e0da140

Please sign in to comment.