mirror of
https://github.com/openwrt/packages.git
synced 2025-01-31 03:41:44 +00:00
ac62437099
ipvsadm build fails on macos due to libipvs Makefiles uses system `ar` that is not compatible with the objectes generated by OpenWrt GCC Toolchain. This commit adds patch to allow ar redefining This commit modifes an old patch (removing CC=gcc is not required due to it is redefinable) Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
55 lines
1.4 KiB
Diff
55 lines
1.4 KiB
Diff
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -35,7 +35,7 @@ ARCH = $(shell uname -m)
|
|
RPMSOURCEDIR = $(shell rpm --eval '%_sourcedir')
|
|
RPMSPECDIR = $(shell rpm --eval '%_specdir')
|
|
|
|
-CC = gcc
|
|
+BUILD_ROOT = $(DESTDIR)
|
|
INCLUDE =
|
|
SBIN = $(BUILD_ROOT)/sbin
|
|
MANDIR = usr/man
|
|
@@ -46,9 +46,9 @@ INSTALL = install
|
|
STATIC_LIBS = libipvs/libipvs.a
|
|
|
|
ifeq "${ARCH}" "sparc64"
|
|
- CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -m64 -pipe -mcpu=ultrasparc -mcmodel=medlow
|
|
+ CFLAGS += -Wall -Wunused -Wstrict-prototypes -g -m64 -pipe -mcpu=ultrasparc -mcmodel=medlow
|
|
else
|
|
- CFLAGS = -Wall -Wunused -Wstrict-prototypes -g
|
|
+ CFLAGS += -Wall -Wunused -Wstrict-prototypes -g
|
|
endif
|
|
|
|
|
|
@@ -83,8 +83,9 @@ DEFINES += $(shell if [ ! -f ../ip_vs.h
|
|
|
|
all: libs ipvsadm
|
|
|
|
+$(STATIC_LIBS): libs
|
|
libs:
|
|
- make -C libipvs
|
|
+ $(MAKE) -C libipvs
|
|
|
|
ipvsadm: $(OBJS) $(STATIC_LIBS)
|
|
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
|
|
@@ -106,7 +107,7 @@ clean:
|
|
rm -rf debian/tmp
|
|
find . -name '*.[ao]' -o -name "*~" -o -name "*.orig" \
|
|
-o -name "*.rej" -o -name core | xargs rm -f
|
|
- make -C libipvs clean
|
|
+ $(MAKE) -C libipvs clean
|
|
|
|
distclean: clean
|
|
|
|
--- a/libipvs/Makefile
|
|
+++ b/libipvs/Makefile
|
|
@@ -1,7 +1,7 @@
|
|
# Makefile for libipvs
|
|
|
|
CC = gcc
|
|
-CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -fPIC
|
|
+CFLAGS += -Wall -Wunused -Wstrict-prototypes -g -fPIC
|
|
ifneq (0,$(HAVE_NL))
|
|
CFLAGS += -DLIBIPVS_USE_NL
|
|
CFLAGS += $(shell \
|