From 301d7e4df13465a9da0abe205fa05d782b7005c3 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 14 Oct 2018 21:38:07 +0100 Subject: sys-kernel/linux-image-redcore-lts : fix pkg-config patch, avoid linker bans --- .../files/linux-pkg-config.patch | 90 ++++++++++++---------- .../linux-image-redcore-lts-4.14.65.exheres-0 | 2 +- 2 files changed, 52 insertions(+), 40 deletions(-) diff --git a/packages/sys-kernel/linux-image-redcore-lts/files/linux-pkg-config.patch b/packages/sys-kernel/linux-image-redcore-lts/files/linux-pkg-config.patch index 7ed4014..b4bf18b 100644 --- a/packages/sys-kernel/linux-image-redcore-lts/files/linux-pkg-config.patch +++ b/packages/sys-kernel/linux-image-redcore-lts/files/linux-pkg-config.patch @@ -1,14 +1,14 @@ diff -Nur a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh --- a/scripts/kconfig/lxdialog/check-lxdialog.sh 2018-08-18 09:48:00.000000000 +0100 -+++ b/scripts/kconfig/lxdialog/check-lxdialog.sh 2018-10-14 21:09:22.771609384 +0100 ++++ b/scripts/kconfig/lxdialog/check-lxdialog.sh 2018-10-14 21:29:13.467708635 +0100 @@ -5,8 +5,8 @@ # What library to link ldflags() { - pkg-config --libs ncursesw 2>/dev/null && exit - pkg-config --libs ncurses 2>/dev/null && exit -+ $(PKG-CONFIG) --libs ncursesw 2>/dev/null && exit -+ $(PKG-CONFIG) --libs ncurses 2>/dev/null && exit ++ x86_64-pc-linux-gnu-pkg-config --libs ncursesw 2>/dev/null && exit ++ x86_64-pc-linux-gnu-pkg-config --libs ncurses 2>/dev/null && exit for ext in so a dll.a dylib ; do for lib in ncursesw ncurses curses ; do $cc -print-file-name=lib${lib}.${ext} | grep -q / @@ -17,24 +17,24 @@ diff -Nur a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialo ccflags() { - if pkg-config --cflags ncursesw 2>/dev/null; then -+ if $(PKG-CONFIG) --cflags ncursesw 2>/dev/null; then ++ if x86_64-pc-linux-gnu-pkg-config --cflags ncursesw 2>/dev/null; then echo '-DCURSES_LOC="" -DNCURSES_WIDECHAR=1' - elif pkg-config --cflags ncurses 2>/dev/null; then -+ elif $(PKG-CONFIG) --cflags ncurses 2>/dev/null; then ++ elif x86_64-pc-linux-gnu-pkg-config --cflags ncurses 2>/dev/null; then echo '-DCURSES_LOC=""' elif [ -f /usr/include/ncursesw/curses.h ]; then echo '-I/usr/include/ncursesw -DCURSES_LOC=""' diff -Nur a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile --- a/scripts/kconfig/Makefile 2018-08-18 09:48:00.000000000 +0100 -+++ b/scripts/kconfig/Makefile 2018-10-14 21:10:09.702147539 +0100 ++++ b/scripts/kconfig/Makefile 2018-10-14 21:29:24.686077418 +0100 @@ -216,15 +216,15 @@ HOSTLOADLIBES_qconf = $(KC_QT_LIBS) HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS) -HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0` -HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \ -+HOSTLOADLIBES_gconf = `$(PKG-CONFIG) --libs gtk+-2.0 gmodule-2.0 libglade-2.0` -+HOSTCFLAGS_gconf.o = `$(PKG-CONFIG) --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \ ++HOSTLOADLIBES_gconf = `x86_64-pc-linux-gnu-pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0` ++HOSTCFLAGS_gconf.o = `x86_64-pc-linux-gnu-pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \ -Wno-missing-prototypes HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC)) @@ -42,8 +42,8 @@ diff -Nur a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile HOSTLOADLIBES_nconf = $(shell \ - pkg-config --libs menuw panelw ncursesw 2>/dev/null \ - || pkg-config --libs menu panel ncurses 2>/dev/null \ -+ $(PKG-CONFIG) --libs menuw panelw ncursesw 2>/dev/null \ -+ || $(PKG-CONFIG) --libs menu panel ncurses 2>/dev/null \ ++ x86_64-pc-linux-gnu-pkg-config --libs menuw panelw ncursesw 2>/dev/null \ ++ || x86_64-pc-linux-gnu-pkg-config --libs menu panel ncurses 2>/dev/null \ || echo "-lmenu -lpanel -lncurses" ) $(obj)/qconf.o: $(obj)/.tmp_qtcheck @@ -59,18 +59,18 @@ diff -Nur a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile - cflags=`pkg-config --cflags QtCore QtGui`; \ - libs=`pkg-config --libs QtCore QtGui`; \ - moc=`pkg-config --variable=moc_location QtCore`; \ -+ if $(PKG-CONFIG) --exists Qt5Core; then \ -+ cflags="-std=c++11 -fPIC `$(PKG-CONFIG) --cflags Qt5Core Qt5Gui Qt5Widgets`"; \ -+ libs=`$(PKG-CONFIG) --libs Qt5Core Qt5Gui Qt5Widgets`; \ -+ moc=`$(PKG-CONFIG) --variable=host_bins Qt5Core`/moc; \ -+ elif $(PKG-CONFIG) --exists QtCore; then \ -+ cflags=`$(PKG-CONFIG) --cflags QtCore QtGui`; \ -+ libs=`$(PKG-CONFIG) --libs QtCore QtGui`; \ -+ moc=`$(PKG-CONFIG) --variable=moc_location QtCore`; \ ++ if x86_64-pc-linux-gnu-pkg-config --exists Qt5Core; then \ ++ cflags="-std=c++11 -fPIC `x86_64-pc-linux-gnu-pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets`"; \ ++ libs=`x86_64-pc-linux-gnu-pkg-config --libs Qt5Core Qt5Gui Qt5Widgets`; \ ++ moc=`x86_64-pc-linux-gnu-pkg-config --variable=host_bins Qt5Core`/moc; \ ++ elif x86_64-pc-linux-gnu-pkg-config --exists QtCore; then \ ++ cflags=`x86_64-pc-linux-gnu-pkg-config --cflags QtCore QtGui`; \ ++ libs=`x86_64-pc-linux-gnu-pkg-config --libs QtCore QtGui`; \ ++ moc=`x86_64-pc-linux-gnu-pkg-config --variable=moc_location QtCore`; \ else \ echo >&2 "*"; \ - echo >&2 "* Could not find Qt via pkg-config."; \ -+ echo >&2 "* Could not find Qt via $(PKG-CONFIG)."; \ ++ echo >&2 "* Could not find Qt via x86_64-pc-linux-gnu-pkg-config."; \ echo >&2 "* Please install either Qt 4.8 or 5.x. and make sure it's in PKG_CONFIG_PATH"; \ echo >&2 "*"; \ exit 1; \ @@ -80,91 +80,103 @@ diff -Nur a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile $(obj)/.tmp_gtkcheck: - @if `pkg-config --exists gtk+-2.0 gmodule-2.0 libglade-2.0`; then \ - if `pkg-config --atleast-version=2.0.0 gtk+-2.0`; then \ -+ @if `$(PKG-CONFIG) --exists gtk+-2.0 gmodule-2.0 libglade-2.0`; then \ -+ if `$(PKG-CONFIG) --atleast-version=2.0.0 gtk+-2.0`; then \ ++ @if `x86_64-pc-linux-gnu-pkg-config --exists gtk+-2.0 gmodule-2.0 libglade-2.0`; then \ ++ if `x86_64-pc-linux-gnu-pkg-config --atleast-version=2.0.0 gtk+-2.0`; then \ touch $@; \ else \ echo >&2 "*"; \ diff -Nur a/tools/build/feature/Makefile b/tools/build/feature/Makefile --- a/tools/build/feature/Makefile 2018-08-18 09:48:00.000000000 +0100 -+++ b/tools/build/feature/Makefile 2018-10-14 21:10:22.198558244 +0100 ++++ b/tools/build/feature/Makefile 2018-10-14 21:29:33.110354352 +0100 @@ -57,7 +57,7 @@ CC ?= $(CROSS_COMPILE)gcc CXX ?= $(CROSS_COMPILE)g++ -PKG_CONFIG ?= $(CROSS_COMPILE)pkg-config -+PKG_CONFIG ?= $(CROSS_COMPILE)$(PKG-CONFIG) ++PKG_CONFIG ?= $(CROSS_COMPILE)x86_64-pc-linux-gnu-pkg-config LLVM_CONFIG ?= llvm-config all: $(FILES) diff -Nur a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf --- a/tools/perf/Makefile.perf 2018-08-18 09:48:00.000000000 +0100 -+++ b/tools/perf/Makefile.perf 2018-10-14 21:11:19.975457787 +0100 ++++ b/tools/perf/Makefile.perf 2018-10-14 21:30:34.871384703 +0100 @@ -156,7 +156,7 @@ HOSTLD ?= ld HOSTAR ?= ar -PKG_CONFIG = $(CROSS_COMPILE)pkg-config -+PKG_CONFIG = $(CROSS_COMPILE)$(PKG-CONFIG) ++PKG_CONFIG = $(CROSS_COMPILE)x86_64-pc-linux-gnu-pkg-config LLVM_CONFIG ?= llvm-config RM = rm -f diff -Nur a/tools/testing/selftests/memfd/Makefile b/tools/testing/selftests/memfd/Makefile --- a/tools/testing/selftests/memfd/Makefile 2018-08-18 09:48:00.000000000 +0100 -+++ b/tools/testing/selftests/memfd/Makefile 2018-10-14 21:11:09.398110027 +0100 ++++ b/tools/testing/selftests/memfd/Makefile 2018-10-14 21:30:25.358071953 +0100 @@ -8,8 +8,8 @@ TEST_FILES := run_fuse_test.sh TEST_GEN_FILES := memfd_test fuse_mnt fuse_test -fuse_mnt.o: CFLAGS += $(shell pkg-config fuse --cflags) -+fuse_mnt.o: CFLAGS += $(shell $(PKG-CONFIG) fuse --cflags) ++fuse_mnt.o: CFLAGS += $(shell x86_64-pc-linux-gnu-pkg-config fuse --cflags) include ../lib.mk -$(OUTPUT)/fuse_mnt: LDLIBS += $(shell pkg-config fuse --libs) -+$(OUTPUT)/fuse_mnt: LDLIBS += $(shell $(PKG-CONFIG) fuse --libs) ++$(OUTPUT)/fuse_mnt: LDLIBS += $(shell x86_64-pc-linux-gnu-pkg-config fuse --libs) diff -Nur a/tools/thermal/tmon/Makefile b/tools/thermal/tmon/Makefile --- a/tools/thermal/tmon/Makefile 2018-08-18 09:48:00.000000000 +0100 -+++ b/tools/thermal/tmon/Makefile 2018-10-14 21:10:55.517653672 +0100 ++++ b/tools/thermal/tmon/Makefile 2018-10-14 21:30:14.317709004 +0100 @@ -19,12 +19,12 @@ endif TMON_LIBS=-lm -lpthread -TMON_LIBS += $(shell pkg-config --libs $(STATIC) panelw ncursesw 2> /dev/null || \ - pkg-config --libs $(STATIC) panel ncurses 2> /dev/null || \ -+TMON_LIBS += $(shell $(PKG-CONFIG) --libs $(STATIC) panelw ncursesw 2> /dev/null || \ -+ $(PKG-CONFIG) --libs $(STATIC) panel ncurses 2> /dev/null || \ ++TMON_LIBS += $(shell x86_64-pc-linux-gnu-pkg-config --libs $(STATIC) panelw ncursesw 2> /dev/null || \ ++ x86_64-pc-linux-gnu-pkg-config --libs $(STATIC) panel ncurses 2> /dev/null || \ echo -lpanel -lncurses) -CFLAGS += $(shell pkg-config --cflags $(STATIC) panelw ncursesw 2> /dev/null || \ - pkg-config --cflags $(STATIC) panel ncurses 2> /dev/null) -+CFLAGS += $(shell $(PKG-CONFIG) --cflags $(STATIC) panelw ncursesw 2> /dev/null || \ -+ $(PKG-CONFIG) --cflags $(STATIC) panel ncurses 2> /dev/null) ++CFLAGS += $(shell x86_64-pc-linux-gnu-pkg-config --cflags $(STATIC) panelw ncursesw 2> /dev/null || \ ++ x86_64-pc-linux-gnu-pkg-config --cflags $(STATIC) panel ncurses 2> /dev/null) OBJS = tmon.o tui.o sysfs.o pid.o OBJS += diff -Nur a/tools/usb/ffs-aio-example/multibuff/host_app/Makefile b/tools/usb/ffs-aio-example/multibuff/host_app/Makefile --- a/tools/usb/ffs-aio-example/multibuff/host_app/Makefile 2018-08-18 09:48:00.000000000 +0100 -+++ b/tools/usb/ffs-aio-example/multibuff/host_app/Makefile 2018-10-14 21:10:35.307989238 +0100 ++++ b/tools/usb/ffs-aio-example/multibuff/host_app/Makefile 2018-10-14 21:29:48.324854509 +0100 @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 CC = gcc -LIBUSB_CFLAGS = $(shell pkg-config --cflags libusb-1.0) -LIBUSB_LIBS = $(shell pkg-config --libs libusb-1.0) -+LIBUSB_CFLAGS = $(shell $(PKG-CONFIG) --cflags libusb-1.0) -+LIBUSB_LIBS = $(shell $(PKG-CONFIG) --libs libusb-1.0) ++LIBUSB_CFLAGS = $(shell x86_64-pc-linux-gnu-pkg-config --cflags libusb-1.0) ++LIBUSB_LIBS = $(shell x86_64-pc-linux-gnu-pkg-config --libs libusb-1.0) WARNINGS = -Wall -Wextra CFLAGS = $(LIBUSB_CFLAGS) $(WARNINGS) LDFLAGS = $(LIBUSB_LIBS) diff -Nur a/tools/usb/ffs-aio-example/simple/host_app/Makefile b/tools/usb/ffs-aio-example/simple/host_app/Makefile --- a/tools/usb/ffs-aio-example/simple/host_app/Makefile 2018-08-18 09:48:00.000000000 +0100 -+++ b/tools/usb/ffs-aio-example/simple/host_app/Makefile 2018-10-14 21:10:45.212314862 +0100 ++++ b/tools/usb/ffs-aio-example/simple/host_app/Makefile 2018-10-14 21:29:55.668095911 +0100 @@ -1,6 +1,6 @@ CC = gcc -LIBUSB_CFLAGS = $(shell pkg-config --cflags libusb-1.0) -LIBUSB_LIBS = $(shell pkg-config --libs libusb-1.0) -+LIBUSB_CFLAGS = $(shell $(PKG-CONFIG) --cflags libusb-1.0) -+LIBUSB_LIBS = $(shell $(PKG-CONFIG) --libs libusb-1.0) ++LIBUSB_CFLAGS = $(shell x86_64-pc-linux-gnu-pkg-config --cflags libusb-1.0) ++LIBUSB_LIBS = $(shell x86_64-pc-linux-gnu-pkg-config --libs libusb-1.0) WARNINGS = -Wall -Wextra CFLAGS = $(LIBUSB_CFLAGS) $(WARNINGS) LDFLAGS = $(LIBUSB_LIBS) +diff -Nur a/tools/usb/usbip/README b/tools/usb/usbip/README +--- a/tools/usb/usbip/README 2018-08-18 09:48:00.000000000 +0100 ++++ b/tools/usb/usbip/README 2018-10-14 21:30:07.344479763 +0100 +@@ -40,7 +40,7 @@ + + - gcc >= 4.0 + +- - libtool, automake >= 1.9, autoconf >= 2.5.0, pkg-config ++ - libtool, automake >= 1.9, autoconf >= 2.5.0, x86_64-pc-linux-gnu-pkg-config + + [Optional] + - hwdata diff --git a/packages/sys-kernel/linux-image-redcore-lts/linux-image-redcore-lts-4.14.65.exheres-0 b/packages/sys-kernel/linux-image-redcore-lts/linux-image-redcore-lts-4.14.65.exheres-0 index 6a7cce6..c16a916 100644 --- a/packages/sys-kernel/linux-image-redcore-lts/linux-image-redcore-lts-4.14.65.exheres-0 +++ b/packages/sys-kernel/linux-image-redcore-lts/linux-image-redcore-lts-4.14.65.exheres-0 @@ -67,7 +67,7 @@ src_compile() { params=( CC="${CC}" HOSTCC="${CC}" - PKG-CONFIG="$(exhost --tool-prefix)pkg-config" + LD="${LD}" ) edo emake V=1 \ -- cgit v1.2.3