From patchwork Mon Jun 22 05:25:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fabrice Fontaine X-Patchwork-Id: 11616949 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 716B792A for ; Mon, 22 Jun 2020 05:25:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 587C920732 for ; Mon, 22 Jun 2020 05:25:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XGZE+lUR" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726604AbgFVFZT (ORCPT ); Mon, 22 Jun 2020 01:25:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725934AbgFVFZT (ORCPT ); Mon, 22 Jun 2020 01:25:19 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC67DC061794 for ; Sun, 21 Jun 2020 22:25:18 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id j18so48145wmi.3 for ; Sun, 21 Jun 2020 22:25:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ei4IeGiF/xHWBYGOES/KCnqnvL8TMPiaWSrjU/xQfqI=; b=XGZE+lUR14lfPazXMsa6h+5IG3Vnlgdqt9hopEJVjTy1sn9xsd996rgnia2QNOoSTo e5g6OLDADurcjWMKby6zmRRlP/l/RMgiph+eBfDheU5vURlTjkcfzVfLlDJopY7AIkBK WzVwLHu5pYBA3XVlhcrvmg9YIbQ+hYqNE3eDI2xlxZfOUKawzAQl6UQ4fwYKWr8i5J9x q1yBYqslN0Qu5A5CluS+Jf/H2O20aT1XyzQ0AFsO7r2wcXyerMgXp5/Dfc2TJwUi4uIK iV6bsP03PJxX8DeGNG52pRvwGlEfJxifGuVHTjfctzrIcB1vNgsU7QAiXw9JMlxPumVL TTuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ei4IeGiF/xHWBYGOES/KCnqnvL8TMPiaWSrjU/xQfqI=; b=c1teov1wEO+/bLeWn8sXt1F1EWSP7glbVBSOaWbn0t5qGuBeJwOkF5U+3eN+1MuVMi CPOO2mJrKy5xub6bBZ1jjstCuK5opPh2IdjFQUHqwUv5FaiV8BlBl3fyMEHjSmVejYzi vpAxwDrKdxhkUNRhuAsh5gcxmg62LP8eA5Zu4uGC1sTpmI2QCJzclipufrdL5ix2GcsZ lyxgba0o2kVSGnr6E57Gg3tzU+lvTbUvAfuoZg/CzzGDctdw+aJxCDR152wuf7k0KKOs qOvGxDqBS5IBOAgbGvY1LdMdIAPRo2/IO5eb0u5FtotmVw4cbwqhajefeWGwG25RYJ0a hdTw== X-Gm-Message-State: AOAM533nHUsv0Uc4db0FRFB7kUBFwl2dX753YjAhOliSx6hbbpYa3N8V 1GIQmbh4t8RiyRhnicpn1wXEE10y X-Google-Smtp-Source: ABdhPJycukDY/zsxPeqfqdi+HfzMaFlEYJtbWgysjQ9S5YSDlprB/nwViv6/m8JjenGixWT0j7eeVQ== X-Received: by 2002:a1c:4343:: with SMTP id q64mr5016215wma.20.1592803517008; Sun, 21 Jun 2020 22:25:17 -0700 (PDT) Received: from kali.home (2a01cb0881b76d00c2afd0dfa851d2b9.ipv6.abo.wanadoo.fr. [2a01:cb08:81b7:6d00:c2af:d0df:a851:d2b9]) by smtp.gmail.com with ESMTPSA id d13sm2420489wrn.61.2020.06.21.22.25.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Jun 2020 22:25:16 -0700 (PDT) From: Fabrice Fontaine To: dash@vger.kernel.org Cc: Fabrice Fontaine , Peter Korsgaard Subject: [PATCH] Don't include config.h when building helpers using the native compiler Date: Mon, 22 Jun 2020 07:25:13 +0200 Message-Id: <20200622052513.1850288-1-fontaine.fabrice@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Sender: dash-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dash@vger.kernel.org config.h contains settings for the cross compiler (most importantly 32/64bit versions of functions), so don't include it when calling the native compiler to build the helpers. Otherwise we get build errors like: /usr/bin/gcc -include ../config.h -DBSD=1 -DSHELL -DIFS_BROKEN -g -O2 -Wall -o mkinit mkinit.c In file included from /usr/include/sys/stat.h:107, from /usr/include/fcntl.h:38, from mkinit.c:50: /usr/include/bits/stat.h:117: error: redefinition of ‘struct stat’ In file included from /usr/include/fcntl.h:38, from mkinit.c:50: /usr/include/sys/stat.h:504: error: redefinition of ‘stat’ /usr/include/sys/stat.h:455: note: previous definition of ‘stat’ was here Signed-off-by: Peter Korsgaard [Retrieved from: https://git.buildroot.net/buildroot/tree/package/dash/0001-no-config.h-for-helpers.patch] Signed-off-by: Fabrice Fontaine --- src/Makefile.am | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index 1732465..3b1b54e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -7,7 +7,6 @@ COMMON_CPPFLAGS = \ AM_CFLAGS = $(COMMON_CFLAGS) AM_CPPFLAGS = -include $(top_builddir)/config.h $(COMMON_CPPFLAGS) AM_CFLAGS_FOR_BUILD = -g -O2 $(COMMON_CFLAGS) -AM_CPPFLAGS_FOR_BUILD = $(COMMON_CPPFLAGS) COMPILE_FOR_BUILD = \ $(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(AM_CPPFLAGS_FOR_BUILD) \