Skip to content

Commit 24fd838

Browse files
committed
Modify WITH_TIRPC variable for consistency with WITH_LIBELF and WITH_SECCOMP
"yes" means linking to system libtirpc, "no" means building libtirpc from source.
1 parent 2253788 commit 24fd838

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,9 @@ else
163163
LIB_LDLIBS_STATIC += -l:libelf.a
164164
endif
165165
ifeq ($(WITH_TIRPC), yes)
166+
LIB_CPPFLAGS += -DWITH_TIRPC $(shell pkg-config --cflags libtirpc)
167+
LIB_LDLIBS_SHARED += -lpthread $(shell pkg-config --libs libtirpc)
168+
else
166169
LIB_CPPFLAGS += -isystem $(DEPS_DIR)$(includedir)/tirpc -DWITH_TIRPC
167170
LIB_LDLIBS_STATIC += -l:libtirpc.a
168171
LIB_LDLIBS_SHARED += -lpthread
@@ -269,7 +272,7 @@ endif
269272
ifeq ($(WITH_LIBELF), no)
270273
$(MAKE) -f $(MAKE_DIR)/elftoolchain.mk DESTDIR=$(DEPS_DIR) install
271274
endif
272-
ifeq ($(WITH_TIRPC), yes)
275+
ifeq ($(WITH_TIRPC), no)
273276
$(MAKE) -f $(MAKE_DIR)/libtirpc.mk DESTDIR=$(DEPS_DIR) install
274277
endif
275278

@@ -332,7 +335,7 @@ endif
332335
ifeq ($(WITH_LIBELF), no)
333336
-$(MAKE) -f $(MAKE_DIR)/elftoolchain.mk clean
334337
endif
335-
ifeq ($(WITH_TIRPC), yes)
338+
ifeq ($(WITH_TIRPC), no)
336339
-$(MAKE) -f $(MAKE_DIR)/libtirpc.mk clean
337340
endif
338341

mk/docker.mk

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ docker-amd64-verify: $(patsubst %, %-verify, $(AMD64_TARGETS)) \
127127

128128
# private centos target with overrides
129129
--centos%: OS := centos
130-
--centos%: WITH_TIRPC = yes
131130
--centos%: WITH_LIBELF = yes
132131
--centos8%: BASEIMAGE = quay.io/centos/centos:stream8
133132

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

146144
--verify-rhel%: OS := centos

0 commit comments

Comments
 (0)