Skip to content

Commit

Permalink
Modify WITH_TIRPC variable for consistency with WITH_LIBELF and WITH_…
Browse files Browse the repository at this point in the history
…SECCOMP

"yes" means linking to system libtirpc, "no" means building libtirpc from source.

Signed-off-by: Jakub Klinkovský <[email protected]>
  • Loading branch information
lahwaacz committed Apr 14, 2024
1 parent b7bf5ec commit d59a46c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ else
LIB_LDLIBS_STATIC += -l:libelf.a
endif
ifeq ($(WITH_TIRPC), yes)
LIB_CPPFLAGS += -DWITH_TIRPC $(shell pkg-config --cflags libtirpc)
LIB_LDLIBS_SHARED += -lpthread $(shell pkg-config --libs libtirpc)
else
LIB_CPPFLAGS += -isystem $(DEPS_DIR)$(includedir)/tirpc -DWITH_TIRPC
LIB_LDLIBS_STATIC += -l:libtirpc.a
LIB_LDLIBS_SHARED += -lpthread
Expand Down Expand Up @@ -269,7 +272,7 @@ endif
ifeq ($(WITH_LIBELF), no)
$(MAKE) -f $(MAKE_DIR)/elftoolchain.mk DESTDIR=$(DEPS_DIR) install
endif
ifeq ($(WITH_TIRPC), yes)
ifeq ($(WITH_TIRPC), no)
$(MAKE) -f $(MAKE_DIR)/libtirpc.mk DESTDIR=$(DEPS_DIR) install
endif

Expand Down Expand Up @@ -332,7 +335,7 @@ endif
ifeq ($(WITH_LIBELF), no)
-$(MAKE) -f $(MAKE_DIR)/elftoolchain.mk clean
endif
ifeq ($(WITH_TIRPC), yes)
ifeq ($(WITH_TIRPC), no)
-$(MAKE) -f $(MAKE_DIR)/libtirpc.mk clean
endif

Expand Down
4 changes: 1 addition & 3 deletions mk/docker.mk
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ docker-amd64-verify: $(patsubst %, %-verify, $(AMD64_TARGETS)) \

# private centos target with overrides
--centos%: OS := centos
--centos%: WITH_TIRPC = yes
--centos%: WITH_LIBELF = yes
--centos8%: BASEIMAGE = quay.io/centos/centos:stream8

Expand All @@ -139,8 +138,7 @@ docker-amd64-verify: $(patsubst %, %-verify, $(AMD64_TARGETS)) \
--rhel%: OS := centos
--rhel%: VERSION = $(patsubst rhel%-$(ARCH),%,$(TARGET_PLATFORM))
--rhel%: ARTIFACTS_DIR = $(DIST_DIR)/rhel$(VERSION)/$(ARCH)
--rhel8%: CFLAGS := -I/usr/include/tirpc
--rhel8%: LDLIBS := -ltirpc
--rhel%: WITH_TIRPC = yes
--rhel8%: BASEIMAGE = quay.io/centos/centos:stream8

--verify-rhel%: OS := centos
Expand Down

0 comments on commit d59a46c

Please sign in to comment.