From patchwork Tue Jul 26 16:30:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 1660870 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lsj9556TCz9s2R for ; Wed, 27 Jul 2022 02:31:37 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 0635D41198; Tue, 26 Jul 2022 16:31:35 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 0635D41198 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wIvZUTxDeRuF; Tue, 26 Jul 2022 16:31:34 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id 33C1B411A8; Tue, 26 Jul 2022 16:31:33 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 33C1B411A8 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 755561BF9B5 for ; Tue, 26 Jul 2022 16:31:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 26F574016A for ; Tue, 26 Jul 2022 16:31:18 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 26F574016A X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GMsOYLgu1_sf for ; Tue, 26 Jul 2022 16:31:17 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org D71A74014B Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) by smtp2.osuosl.org (Postfix) with ESMTPS id D71A74014B for ; Tue, 26 Jul 2022 16:31:16 +0000 (UTC) Received: (Authenticated sender: thomas.petazzoni@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id D9F26240005; Tue, 26 Jul 2022 16:31:14 +0000 (UTC) To: buildroot@buildroot.org Date: Tue, 26 Jul 2022 18:30:59 +0200 Message-Id: <20220726163102.2107923-2-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220726163102.2107923-1-thomas.petazzoni@bootlin.com> References: <20220726163102.2107923-1-thomas.petazzoni@bootlin.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1658853075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eLWmkQBapBUr5Pa80/5poNU1mXhAfXE1KoHWBhtG5cE=; b=gFRlHDwJQ0JTO0Hb/mUpDkyVLlI0VaoH8d97ScKryH/lXuT8tWMOOfylJqa/XgeeIEjPlz hwYnec7whUxxMiE19fveCi0Gh+dx4WMuzDxDQ/E1lQQiYbdcNytDy0iZYF8bWpn4/jwnXe De4e63lrFATjkJJ+DurUfUTtHAerTmvU8SG7BnbSMeuFEO1wCBCw2VVmNgfy9f7fVtWur7 l0Kz9HoaxHaJtqsUEtBLUm1RjQsuiwt3Huui5spUkyle8MitM4WlpjjLyB/rKLsKwbINkR O3QSerAQY6hsRzEpvNzIo5y3E3/hxiW4bhhkujP9nMJ8hn0c8G5wdoEctswaVQ== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=gm1 header.b=gFRlHDwJ Subject: [Buildroot] [PATCH 2/4] package/Makefile.in: add detection for the lack of C library X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Thomas Petazzoni via buildroot From: Thomas Petazzoni Reply-To: Thomas Petazzoni Cc: Thomas Petazzoni Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" We recently had several cases of architecture configurations for which no C library was available, leading to a build failure during the gcc build. In order to more easily detect those bogus configurations, let's bail out very early by detecting the lack of C library selection. Signed-off-by: Thomas Petazzoni --- package/Makefile.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/package/Makefile.in b/package/Makefile.in index 508ea7c366..f8920c87a4 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -47,6 +47,12 @@ else TARGET_OS = linux endif +# This happens if there is a bug in Buildroot that allows an +# architecture configuration that isn't supported by any library. +ifeq ($(BR2_TOOLCHAIN_USES_GLIBC)$(BR2_TOOLCHAIN_USES_UCLIBC)$(BR2_TOOLCHAIN_USES_MUSL),) +$(error No C library enabled, this is not possible.) +endif + ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) LIBC = uclibc else ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)