From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from 93-97-173-237.zone5.bethere.co.uk ([93.97.173.237] helo=tim.rpsys.net) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1SwU9L-0000JB-1u for openembedded-core@lists.openembedded.org; Wed, 01 Aug 2012 10:19:23 +0200 Received: from localhost (localhost [127.0.0.1]) by tim.rpsys.net (8.13.6/8.13.8) with ESMTP id q7187il7028238 for ; Wed, 1 Aug 2012 09:07:44 +0100 Received: from tim.rpsys.net ([127.0.0.1]) by localhost (tim.rpsys.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 26046-05 for ; Wed, 1 Aug 2012 09:07:40 +0100 (BST) Received: from [192.168.3.10] ([192.168.3.10]) (authenticated bits=0) by tim.rpsys.net (8.13.6/8.13.8) with ESMTP id q7187Xw1028232 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 1 Aug 2012 09:07:35 +0100 Message-ID: <1343808455.9756.51.camel@ted> From: Richard Purdie To: openembedded-core Date: Wed, 01 Aug 2012 09:07:35 +0100 X-Mailer: Evolution 3.2.2- Mime-Version: 1.0 X-Virus-Scanned: amavisd-new at rpsys.net Subject: [PATCH] gcc-configure-target: Set native-system-header-dir for target gcc X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Patches and discussions about the oe-core layer List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2012 08:19:23 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Without this set, in the case host=target (which it does for on-target gcc), the native header directory is set to the target sysroot with no prefix. This means it would look for sdt.h on the build system instead of in the target headers and this can lead to build failures and is host contamination of the build. The correct fix is to explicitly set the native header directory to the correct location and then the headers get detected correctly. Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-devtools/gcc/gcc-configure-target.inc b/meta/recipes-devtools/gcc/gcc-configure-target.inc index b2f91b7..f41301f 100644 --- a/meta/recipes-devtools/gcc/gcc-configure-target.inc +++ b/meta/recipes-devtools/gcc/gcc-configure-target.inc @@ -3,4 +3,5 @@ require gcc-configure-common.inc EXTRA_OECONF_PATHS = " \ --with-sysroot=/ \ --with-build-sysroot=${STAGING_DIR_TARGET} \ + --with-native-system-header-dir=${STAGING_DIR_TARGET}${target_includedir} \ --with-gxx-include-dir=${includedir}/c++/"