void-packages/srcpkgs/proot/patches/makefile-fix-vars.patch

39 lines
1.1 KiB
Diff

--- src/GNUmakefile
+++ src/GNUmakefile
@@ -8,11 +8,11 @@
GIT = git
RM = rm
INSTALL = install
-CC = $(CROSS_COMPILE)gcc
+CC ?= $(CROSS_COMPILE)gcc
LD = $(CC)
-STRIP = $(CROSS_COMPILE)strip
-OBJCOPY = $(CROSS_COMPILE)objcopy
-OBJDUMP = $(CROSS_COMPILE)objdump
+STRIP = :
+OBJCOPY ?= $(CROSS_COMPILE)objcopy
+OBJDUMP ?= $(CROSS_COMPILE)objdump
CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -I. -I$(VPATH)
CFLAGS += -Wall -Wextra -O2
@@ -86,7 +86,7 @@
quiet_LD = @echo " LD $@"; $(LD)
quiet_INSTALL = @echo " INSTALL $?"; $(INSTALL)
-V = 0
+V = 1
ifeq ($(V), 0)
quiet = quiet_
Q = @
@@ -140,8 +140,8 @@
OBJIFY = $($(quiet)GEN) \
$(OBJCOPY) \
- --input binary \
- --output `env LANG=C $(OBJDUMP) -f cli/cli.o | \
+ --input-target binary \
+ --output-target `env LANG=C $(OBJDUMP) -f cli/cli.o | \
grep 'file format' | awk '{print $$4}'` \
--binary-architecture `env LANG=C $(OBJDUMP) -f cli/cli.o | \
grep architecture | cut -f 1 -d , | awk '{print $$2}'` \