summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2021-02-03 15:17:44 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2021-02-03 15:17:44 +0000
commite7d6954e0c92881ba0ea418a71de439443252918 (patch)
treee83e4700f9ef5ffa98eba82fa666b33e011abf95
parent87ca17c32cb4763fe915ea522d6414915fe78b15 (diff)
downloadlh-bootstrap-e7d6954e0c92881ba0ea418a71de439443252918.tar.xz
fix 7/n: curl workarounds
-rwxr-xr-xmake9
-rw-r--r--sub/dev/Makefile.curl2
2 files changed, 9 insertions, 2 deletions
diff --git a/make b/make
index c2c53d2..b8648d0 100755
--- a/make
+++ b/make
@@ -28,6 +28,13 @@ RWFS_SIZE=${RWFS_SIZE:-512M}
USERFS_SIZE=${USERFS_SIZE:-512M}
LH_DEV=${DEVELOPMENT:-false}
+build=`${BUILD_BUILD_CC} -dumpmachine`
+if echo "$build" | grep -q -- '-.*-.*-' ; then
+ BUILD_QUADRUPLE="$build"
+else
+ BUILD_QUADRUPLE="${build%%-*}-none-${build#*-}"
+fi
+
if test -z "$BUILD_HOST_STATIC" ; then
case "$TRIPLE" in
*-*-musl*) BUILD_HOST_STATIC=true ;;
@@ -73,5 +80,5 @@ exec env -i $crossenv LH_MAKE_MARKER=1 "WD=$WD" "NORMALUSER=$NORMALUSER" "TRIPLE
"BUILD_HOST_STATIC=$BUILD_HOST_STATIC" "LIBC_SYSROOT=$LIBC_SYSROOT" "LIBC_COPY=$LIBC_COPY" "LH_DEV=$LH_DEV" \
"BUILD_HOST_CC=$BUILD_HOST_CC" "BUILD_HOST_CC_FULL=$BUILD_HOST_CC_FULL" "BUILD_HOST_SYSROOT=$BUILD_HOST_SYSROOT" "BUILD_HOST_PREFIX=$BUILD_HOST_PREFIX" \
"KERNEL_ARCH=$KERNEL_ARCH" "KERNEL_GENERIC_ARCH=$KERNEL_GENERIC_ARCH" "QEMU_ARCH=$QEMU_ARCH" "KERNEL_CONFIG=$KERNEL_CONFIG" \
- "BUILD_BUILD_CC=$BUILD_BUILD_CC" SHELL=/bin/sh "CONSOLE=$CONSOLE" "TERM=$TERM" \
+ "BUILD_QUADRUPLE=$BUILD_QUADRUPLE" "BUILD_BUILD_CC=$BUILD_BUILD_CC" SHELL=/bin/sh "CONSOLE=$CONSOLE" "TERM=$TERM" \
make "$@"
diff --git a/sub/dev/Makefile.curl b/sub/dev/Makefile.curl
index 32a5013..1b0ea66 100644
--- a/sub/dev/Makefile.curl
+++ b/sub/dev/Makefile.curl
@@ -105,7 +105,7 @@ $(OUTPUT)/build-host/.lh_curl_copied: $(OUTPUT)/build-host/.lh_curl_dled | $(OUT
exec setuidgid $(NORMALUSER) s6-touch $@
$(OUTPUT)/build-host/.lh_curl_configured: $(OUTPUT)/build-host/.lh_curl_copied $(OUTPUT)/build-host/.lh_bearssl_installed $(OUTPUT)/build-host/.lh_zlib_installed | $(OUTPUT)/build-build/.lh_skarnet_installed
- exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host/curl-$(CURL_VERSION) export CC "$(BUILD_HOST_CC)" ./configure --host=$(TRIPLE) --prefix=/opt/curl-$(CURL_VERSION) $(CURL_CONF_ARGS)
+ exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host/curl-$(CURL_VERSION) export CC "$(BUILD_HOST_CC)" ./configure --build=$(BUILD_QUADRUPLE) --host=$(TRIPLE) --prefix=/opt/curl-$(CURL_VERSION) $(CURL_CONF_ARGS)
exec setuidgid $(NORMALUSER) s6-touch $@
$(OUTPUT)/build-host/.lh_curl_built: $(OUTPUT)/build-host/.lh_curl_configured | $(OUTPUT)/build-build/.lh_skarnet_installed