mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
nfs-utils: build tools with target compiler
Some tools were built with CC_FOR_BUILD which points to the target compiler. The current patch avoided issues by deleting some of the binaries during install. This patch replaces the CC_FOR_BUILD with CC so the tools are built with the target compiler. This means the binaries no longer need to be deleted. I stumbled upon this by trying to globally add "--ffile-prefix-map", which is not supported by my host GCC, to get rid of some "buildpaths" QA Warnings. Cc: Robert Yang <liezhi.yang@windriver.com> (From OE-Core rev: ea98fd17ae38efca13ce97c2e0eaacb8cfde597d) Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
d76ab279e6
commit
a08083aee5
@@ -0,0 +1,40 @@
|
||||
From 79019d976584c598f8d0a9d8de43c989946f974b Mon Sep 17 00:00:00 2001
|
||||
From: Pascal Bach <pascal.bach@siemens.com>
|
||||
Date: Wed, 13 Feb 2019 09:28:07 +0100
|
||||
Subject: [PATCH] Don't build tools with CC_FOR_BUILD
|
||||
|
||||
The tools are intended for the target not for the host.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
|
||||
---
|
||||
tools/locktest/Makefile.am | 1 -
|
||||
tools/rpcgen/Makefile.am | 1 -
|
||||
2 files changed, 2 deletions(-)
|
||||
|
||||
diff --git a/tools/locktest/Makefile.am b/tools/locktest/Makefile.am
|
||||
index 3156815..87d0bac 100644
|
||||
--- a/tools/locktest/Makefile.am
|
||||
+++ b/tools/locktest/Makefile.am
|
||||
@@ -1,6 +1,5 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
-CC=$(CC_FOR_BUILD)
|
||||
LIBTOOL = @LIBTOOL@ --tag=CC
|
||||
|
||||
noinst_PROGRAMS = testlk
|
||||
diff --git a/tools/rpcgen/Makefile.am b/tools/rpcgen/Makefile.am
|
||||
index 8a9ec89..3e092c9 100644
|
||||
--- a/tools/rpcgen/Makefile.am
|
||||
+++ b/tools/rpcgen/Makefile.am
|
||||
@@ -1,6 +1,5 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
-CC=$(CC_FOR_BUILD)
|
||||
LIBTOOL = @LIBTOOL@ --tag=CC
|
||||
|
||||
noinst_PROGRAMS = rpcgen
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
nfs-utils: Do not pass CFLAGS to gcc while building
|
||||
|
||||
Do not pass CFLAGS/LDFLAGS to gcc while building, The needed flags has
|
||||
been passed by xxx_CFLAGS=$(CFLAGS_FOR_BUILD).
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
|
||||
---
|
||||
tools/locktest/Makefile.am | 2 ++
|
||||
tools/rpcgen/Makefile.am | 2 ++
|
||||
2 files changed, 4 insertions(+)
|
||||
|
||||
diff --git a/tools/locktest/Makefile.am b/tools/locktest/Makefile.am
|
||||
index 3156815..1729fd1 100644
|
||||
--- a/tools/locktest/Makefile.am
|
||||
+++ b/tools/locktest/Makefile.am
|
||||
@@ -1,6 +1,8 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
CC=$(CC_FOR_BUILD)
|
||||
+CFLAGS=
|
||||
+LDFLAGS=
|
||||
LIBTOOL = @LIBTOOL@ --tag=CC
|
||||
|
||||
noinst_PROGRAMS = testlk
|
||||
diff --git a/tools/rpcgen/Makefile.am b/tools/rpcgen/Makefile.am
|
||||
index 8a9ec89..8bacdaa 100644
|
||||
--- a/tools/rpcgen/Makefile.am
|
||||
+++ b/tools/rpcgen/Makefile.am
|
||||
@@ -1,6 +1,8 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
CC=$(CC_FOR_BUILD)
|
||||
+CFLAGS=
|
||||
+LDFLAGS=
|
||||
LIBTOOL = @LIBTOOL@ --tag=CC
|
||||
|
||||
noinst_PROGRAMS = rpcgen
|
||||
--
|
||||
1.7.9.5
|
||||
|
||||
@@ -26,7 +26,6 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.x
|
||||
file://nfs-mountd.service \
|
||||
file://nfs-statd.service \
|
||||
file://proc-fs-nfsd.mount \
|
||||
file://nfs-utils-Do-not-pass-CFLAGS-to-gcc-while-building.patch \
|
||||
file://nfs-utils-debianize-start-statd.patch \
|
||||
file://bugfix-adjust-statd-service-name.patch \
|
||||
file://nfs-utils-musl-limits.patch \
|
||||
@@ -35,6 +34,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.x
|
||||
file://clang-format-string.patch \
|
||||
file://0001-Makefile.am-update-the-path-of-libnfs.a.patch \
|
||||
file://0001-Makefile.am-fix-undefined-function-for-libnsm.a.patch \
|
||||
file://0001-Don-t-build-tools-with-CC_FOR_BUILD.patch \
|
||||
"
|
||||
SRC_URI_append_libc-glibc = " file://0001-configure.ac-Do-not-fatalize-Wmissing-prototypes.patch"
|
||||
SRC_URI_append_libc-musl = " file://nfs-utils-musl-res_querydomain.patch"
|
||||
@@ -147,11 +147,6 @@ do_install_append () {
|
||||
chown -R rpcuser:rpcuser ${D}${localstatedir}/lib/nfs/statd
|
||||
chmod 0644 ${D}${localstatedir}/lib/nfs/statd/state
|
||||
|
||||
# the following are built by CC_FOR_BUILD
|
||||
rm -f ${D}${sbindir}/rpcdebug
|
||||
rm -f ${D}${sbindir}/rpcgen
|
||||
rm -f ${D}${sbindir}/locktest
|
||||
|
||||
# Make python tools use python 3
|
||||
sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${sbindir}/mountstats ${D}${sbindir}/nfsiostat
|
||||
|
||||
|
||||
Reference in New Issue
Block a user