From patchwork Fri Feb 16 00:56:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Mayer X-Patchwork-Id: 874247 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zjFL666RGz9ryk for ; Fri, 16 Feb 2018 12:05:02 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4B4E687453; Fri, 16 Feb 2018 01:05:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vkTKEKbJYFb9; Fri, 16 Feb 2018 01:05:00 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id AD9B4877F3; Fri, 16 Feb 2018 01:05:00 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id C4EEF1C0AD8 for ; Fri, 16 Feb 2018 01:04:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id C0BE8307CC for ; Fri, 16 Feb 2018 01:04:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZPrvlEJxCGy3 for ; Fri, 16 Feb 2018 01:04:59 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) by silver.osuosl.org (Postfix) with ESMTPS id 0A5D330774 for ; Fri, 16 Feb 2018 01:04:59 +0000 (UTC) Received: from triton.mmayer.net ([96.48.174.102]) by shaw.ca with ESMTP id mUKWe4w8mppe1mUKZemnkk; Thu, 15 Feb 2018 17:56:51 -0700 X-Authority-Analysis: v=2.3 cv=Bo6zP7f5 c=1 sm=1 tr=0 a=IfKG9KDHjPrX0SZ8gMoyrg==:117 a=IfKG9KDHjPrX0SZ8gMoyrg==:17 a=Op4juWPpsa0A:10 a=Q-fNiiVtAAAA:8 a=mHJtBT_O1KTNUE6Zx1UA:9 a=Fp8MccfUoT0GBdDC_Lng:22 Received: by triton.mmayer.net (Postfix, from userid 501) id 822612025E4B7C; Thu, 15 Feb 2018 16:56:48 -0800 (PST) From: Markus Mayer To: buildroot@buildroot.org Date: Thu, 15 Feb 2018 16:56:09 -0800 Message-Id: <20180216005612.69593-4-mmayer@broadcom.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180216005612.69593-1-mmayer@broadcom.com> References: <20180216005612.69593-1-mmayer@broadcom.com> X-CMAE-Envelope: MS4wfHoYRvmcX0c356uqqZTWcVI+0n3vuaYHc+oPXhlarwDEYFM20GUBOKnovguL4S37hMVDxhHbNSUhsZnjZklxwsB6UO/Bd/Ivj9oRER1wWYNCEWGNIybu brDZSqtVpJWriwXecDvTKKfUGrh0HvcF3hV5l8cq0vOeD0Bvlu21NfY0ubvoFl6pBfUzjjwMP2kg1zQ4l0eaPJBScr+lRuNAaGY= Subject: [Buildroot] [RFC 3/6] core: system and toolchain: 32-bit run-time support on 64-bit platform X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Markus Mayer MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Set up library symlinks only if we don't want to support 32-bit libraries on 64-bit platforms. We cannot set up sym-links such as "lib64" -> "lib" if we want to support 32-bit binaries on a 64-bit platform. Instead, we need to keep 32-bit and 64-bit libraries in separate directories, so we must skip generating sym-links that would prevent this. Signed-off-by: Markus Mayer --- system/system.mk | 11 ++++++++++- toolchain/toolchain-external/pkg-toolchain-external.mk | 6 ++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/system/system.mk b/system/system.mk index ca6bf1388f39..e0d45356fe66 100644 --- a/system/system.mk +++ b/system/system.mk @@ -55,6 +55,14 @@ define SYSTEM_RSYNC $(1)/ $(2)/ endef +ifeq ($(BR2_ROOTFS_RUNTIME32),y) + +define SYSTEM_LIB_SYMLINK + @echo "SYSTEM_LIB_SYMLINK: nothing to do" +endef + +else + # Make a symlink lib32->lib or lib64->lib as appropriate. # MIPS64/n32 requires lib32 even though it's a 64-bit arch. # $(1): base dir (either staging or target) @@ -68,7 +76,8 @@ define SYSTEM_LIB_SYMLINK ln -snf lib $(1)/lib32 ln -snf lib $(1)/usr/lib32 endef -endif +endif # BR2_ARCH_IS_64 +endif # BR2_ROOTFS_RUNTIME32 SYSTEM_GETTY_PORT = $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT)) SYSTEM_GETTY_BAUDRATE = $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE)) diff --git a/toolchain/toolchain-external/pkg-toolchain-external.mk b/toolchain/toolchain-external/pkg-toolchain-external.mk index 3bf9fac4121c..d7cf97d170ca 100644 --- a/toolchain/toolchain-external/pkg-toolchain-external.mk +++ b/toolchain/toolchain-external/pkg-toolchain-external.mk @@ -448,6 +448,7 @@ define TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS $(call copy_toolchain_sysroot,$${SYSROOT_DIR},$${ARCH_SYSROOT_DIR},$${ARCH_SUBDIR},$${ARCH_LIB_DIR},$${SUPPORT_LIB_DIR}) endef +ifeq ($(BR2_ROOTFS_RUNTIME32),) # Create a symlink from (usr/)$(ARCH_LIB_DIR) to lib. # Note: the skeleton package additionally creates lib32->lib or lib64->lib # (as appropriate) @@ -462,6 +463,11 @@ create_lib_symlinks = \ ln -snf $${relpath}lib "$${DESTDIR}/usr/$${ARCH_LIB_DIR}" ; \ fi +else +create_lib_symlinks = \ + @echo "BR2_ROOTFS_RUNTIME32 is set, skipping lib symlinks creation" +endif + define TOOLCHAIN_EXTERNAL_CREATE_STAGING_LIB_SYMLINK $(call create_lib_symlinks,$(STAGING_DIR)) endef