From 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf Mon Sep 17 00:00:00 2001 From: takeshi_hoshina Date: Mon, 2 Nov 2020 11:07:33 +0900 Subject: basesystem-jj recipes --- ...e-hardcoded-CC-on-cross-compile-docker-ce.patch | 61 ++++++++++++++++++++++ .../recipes-containers/docker/files/docker.init | 4 +- 2 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 external/meta-virtualization/recipes-containers/docker/files/0001-imporve-hardcoded-CC-on-cross-compile-docker-ce.patch (limited to 'external/meta-virtualization/recipes-containers/docker/files') diff --git a/external/meta-virtualization/recipes-containers/docker/files/0001-imporve-hardcoded-CC-on-cross-compile-docker-ce.patch b/external/meta-virtualization/recipes-containers/docker/files/0001-imporve-hardcoded-CC-on-cross-compile-docker-ce.patch new file mode 100644 index 00000000..70fdaf83 --- /dev/null +++ b/external/meta-virtualization/recipes-containers/docker/files/0001-imporve-hardcoded-CC-on-cross-compile-docker-ce.patch @@ -0,0 +1,61 @@ +From 1263fdb50a540e9db742694b7cee08284ad986d0 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Wed, 17 Jul 2019 17:34:04 +0800 +Subject: [PATCH] imporve hardcoded CC on cross compile + +Since commit applied in moby [61a3285 Support cross-compile for arm] +it hardcoded var-CC to support cross-compile for arm + +Correct it with "${parameter:-word}" format, it is helpful for user +define toolchains + +(Use Default Values. If parameter is unset or null, the expansion of +word is substituted. Otherwise, the value of parameter is substituted.) + +Upstream-Status: Submitted [https://github.com/moby/moby/pull/39546] + +Signed-off-by: Hongxu Jia +--- + components/engine/hack/make/.binary | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/import/components/engine/hack/make/.binary b/src/import/components/engine/hack/make/.binary +index 53de6749e5..66f4ca05f3 100644 +--- a/src/import/components/engine/hack/make/.binary ++++ b/src/import/components/engine/hack/make/.binary +@@ -44,27 +44,27 @@ if [ "$(go env GOOS)/$(go env GOARCH)" != "$(go env GOHOSTOS)/$(go env GOHOSTARC + # must be cross-compiling! + case "$(go env GOOS)/$(go env GOARCH)" in + windows/amd64) +- export CC=x86_64-w64-mingw32-gcc ++ export CC="${CC:-x86_64-w64-mingw32-gcc}" + export CGO_ENABLED=1 + ;; + linux/arm) + case "${GOARM}" in + 5|"") +- export CC=arm-linux-gnueabi-gcc ++ export CC="${CC:-arm-linux-gnueabi-gcc}" + export CGO_ENABLED=1 + ;; + 7) +- export CC=arm-linux-gnueabihf-gcc ++ export CC="${CC:-arm-linux-gnueabihf-gcc}" + export CGO_ENABLED=1 + ;; + esac + ;; + linux/arm64) +- export CC=aarch64-linux-gnu-gcc ++ export CC="${CC:-aarch64-linux-gnu-gcc}" + export CGO_ENABLED=1 + ;; + linux/amd64) +- export CC=x86_64-linux-gnu-gcc ++ export CC="${CC:-x86_64-linux-gnu-gcc}" + export CGO_ENABLED=1 + ;; + esac +-- +2.23.0 + diff --git a/external/meta-virtualization/recipes-containers/docker/files/docker.init b/external/meta-virtualization/recipes-containers/docker/files/docker.init index 0aea8d01..24f8fea6 100644 --- a/external/meta-virtualization/recipes-containers/docker/files/docker.init +++ b/external/meta-virtualization/recipes-containers/docker/files/docker.init @@ -28,7 +28,7 @@ exec="/usr/bin/$prog" pidfile="/var/run/$prog.pid" lockfile="/var/lock/subsys/$prog" logfile="/var/log/$prog" -other_args="--registry-mirror=http://localhost:5000 --insecure-registry=http://localhost:5000 --raw-logs" +other_args="--pidfile $pidfile --registry-mirror=http://localhost:5000 --insecure-registry=http://localhost:5000 --raw-logs" [ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog @@ -40,7 +40,7 @@ start() { if ! [ -f $pidfile ]; then printf "Starting $prog:\t" echo -e "\n$(date)\n" >> $logfile - "$unshare" -m -- $exec $other_args &>> $logfile & + "$unshare" -m -- $exec $other_args >> $logfile 2>&1 & pid=$! touch $lockfile # wait up to 10 seconds for the pidfile to exist. see -- cgit 1.2.3-korg