From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by sourceware.org (Postfix) with ESMTPS id 407083857371 for ; Fri, 30 Sep 2022 07:03:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 407083857371 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-wr1-x433.google.com with SMTP id f11so2702046wrm.6 for ; Fri, 30 Sep 2022 00:03:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; h=to:cc:date:message-id:subject:mime-version:from:from:to:cc:subject :date; bh=J7TTAhSQGVgQp6aJe9eGVFjceaFPIcfP+xf4/2Sl2Wg=; b=IzUpOLkpX9hbEri7qD5YP2xEdiWO8Q6p5wlmmLum3b3e5Ed71+i6RE11sa0aGHiO2k Ywb/wTSs/FbRm3o1j/CTMm/SjV2rhwLoWA/UNThj9Hg1fsJKxpF7taxx/OZ8SDKRNga9 LYmIH3n+eOL9IH/pDu7Ms2o7XpVp9FbONArajCI0x+xlfxmnXtLki19/WwvUWgkB93e+ SokgcsIfCtOfMHP4WcHN39JDQfmAzCnyD0JwldlfhcFfk8eMBXcZaP4Ap5nWuROZXlhj 8MrXl/A3Ob5bPaZjQrk9IsL4YkOAAh9q6b1txLk2gsZcHZ1cZjLWJHSQQ6tvzBeAJhmY 4a4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:cc:date:message-id:subject:mime-version:from:x-gm-message-state :from:to:cc:subject:date; bh=J7TTAhSQGVgQp6aJe9eGVFjceaFPIcfP+xf4/2Sl2Wg=; b=2RJ4fbI/VjjDB7LsOJU9tANBKQySbe6HVCX3b6hZqQOn8MCKHygKDvEeG07G1Y49oJ jDsLNCWK3eGbC5Zd2zefvsOf+qEP2nzvN+rUKynsR69X/ANwNuw9vFUDScGM6zg/rA8A /Vna9Ge7EWtLnnuP0sK2TBYOxs4zJ0SLkLWvHs582hpStAUN6oPbQiY+Y/2hp+/qD1Fi dyJ5C8A0a7QdzRGi2o8xSc3yoanIiYG8hGuJ+VuOE7QfPKE5sEJtPkHURPhLkZFMS7HP vruJ/stoT+eYYhLELCKcSUdxhMcgTi9eEivAvDEskr5Ek4yVXz50KWQKBk7oupjnBwbB oLIQ== X-Gm-Message-State: ACrzQf3GpKWkQvJ3QRPHYq2FAN6svFd3xsyvZ7t2G88VR9GNqG6T2XhO 8KAqRX3GF0mjc+YJtAgNMp/rS8hDidWPTg== X-Google-Smtp-Source: AMsMyM48KTU53j73oy9gAKjZ6rQMZQxnIDODQkuX/mjD8OKiMkRb/ki8kC22K5GGk5wc/Cd0vvOCiA== X-Received: by 2002:a5d:47c5:0:b0:22a:6d4c:f21e with SMTP id o5-20020a5d47c5000000b0022a6d4cf21emr4766303wrc.417.1664521397860; Fri, 30 Sep 2022 00:03:17 -0700 (PDT) Received: from smtpclient.apple (2a01cb098020fdd6b5c4d5862e0d1299.ipv6.abo.wanadoo.fr. [2a01:cb09:8020:fdd6:b5c4:d586:2e0d:1299]) by smtp.gmail.com with ESMTPSA id p8-20020adf9d88000000b002252884cc91sm1239752wre.43.2022.09.30.00.03.16 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Sep 2022 00:03:17 -0700 (PDT) From: Olivier Hainque Content-Type: multipart/mixed; boundary="Apple-Mail=_064690B9-C485-4F78-883B-32DCD7BF8C06" Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: =?utf-8?Q?=5Bpatch=5D=C2=A0Adjust_LIBGCC2=5FINCLUDES_for_VxWorks_?= =?utf-8?Q?and_augment_comment?= Message-Id: <09AD4101-3F7A-4C1F-B4ED-406C94AFD4CF@adacore.com> Date: Fri, 30 Sep 2022 09:03:15 +0200 Cc: Olivier Hainque To: gcc-patches X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --Apple-Mail=_064690B9-C485-4F78-883B-32DCD7BF8C06 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Hello, Investigating the reasons for libgcc build failures in a canadian context, orthogonally to the recent update of vxcrtstuff, exposed interesting differences in the way include search paths are managed between a regular Linux->VxWorks cross build and a canadian setup building a Windows->VxWorks toolchain in a Linux environment. This change augments the comment attached to LIBGCC2_INCLUDE in libgcc/config/t-vxworks to better describe the parameters at play. It also adjusts the addition of options for gcc/include and gcc/include-fixed to minimize the actual differences for libgcc in the two kinds of configurations. Will commit to mainline shortly. Cheers, Olivier 2022-03-06 Olivier Hainque libgcc/ * config/t-vxworks (LIBGCC2_INCLUDE): Augment comment. Move -I options for gcc/include and gcc/include-fixed at the end and make them -isystem. --Apple-Mail=_064690B9-C485-4F78-883B-32DCD7BF8C06 Content-Disposition: attachment; filename=0014-Adjust-LIBGCC2_INCLUDES-for-VxWorks-and-augment-comm.patch Content-Type: application/octet-stream; x-unix-mode=0640; name="0014-Adjust-LIBGCC2_INCLUDES-for-VxWorks-and-augment-comm.patch" Content-Transfer-Encoding: quoted-printable =46rom=2004c9835b2ccdb519d5cc4dc3167460f4cd172568=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Olivier=20Hainque=20=0A= Date:=20Mon,=207=20Mar=202022=2010:55:29=20+0000=0ASubject:=20[PATCH=20= 14/18]=20Adjust=20LIBGCC2_INCLUDES=20for=20VxWorks=20and=20augment=20= comment=0A=0AInvestigating=20the=20reasons=20for=20libgcc=20build=20= failures=20in=20a=20canadian=0Acontext,=20orthogonally=20to=20the=20= recent=20update=20of=20vxcrtstuff,=20exposed=0Ainteresting=20differences=20= in=20the=20way=20include=20search=20paths=20are=20managed=0Abetween=20a=20= regular=20Linux->VxWorks=20cross=20build=20and=20a=20canadian=20setup=0A= building=20a=20Windows->VxWorks=20toolchain=20in=20a=20Linux=20= environment.=0A=0AThis=20change=20augments=20the=20comment=20attached=20= to=20LIBGCC2_INCLUDE=20in=0Alibgcc/config/t-vxworks=20to=20better=20= describe=20the=20parameters=20at=20play.=0A=0AIt=20also=20adjusts=20the=20= addition=20of=20options=20for=20gcc/include=20and=0Agcc/include-fixed=20= to=20minimize=20the=20actual=20differences=20for=20libgcc=0Ain=20the=20= two=20kinds=20of=20configurations.=0A=0A2022-03-06=20=20Olivier=20= Hainque=20=20=0A=0Alibgcc/=0A=09*=20= config/t-vxworks=20(LIBGCC2_INCLUDE):=20Augment=20comment.=20Move=0A=09= -I=20options=20for=20gcc/include=20and=20gcc/include-fixed=20at=20the=20= end=0A=09and=20make=20them=20-isystem.=0A---=0A=20= libgcc/config/t-vxworks=20|=2036=20++++++++++++++++++++++++++++--------=0A= =201=20file=20changed,=2028=20insertions(+),=208=20deletions(-)=0A=0A= diff=20--git=20a/libgcc/config/t-vxworks=20b/libgcc/config/t-vxworks=0A= index=2018a0b1ee469..81a4deab073=20100644=0A---=20= a/libgcc/config/t-vxworks=0A+++=20b/libgcc/config/t-vxworks=0A@@=20-5,17=20= +5,37=20@@=20LIBGCC2_DEBUG_CFLAGS=20=3D=0A=20#=20VxWorks=20specific=20= entry=20point.=0A=20LIB2FUNCS_EXCLUDE=20+=3D=20_clear_cache=0A=20=0A-#=20= This=20ensures=20that=20the=20correct=20target=20headers=20are=20used;=20= some=20VxWorks=0A-#=20system=20headers=20have=20names=20that=20collide=20= with=20GCC's=20internal=20(host)=0A-#=20headers,=20e.g.=20regs.h.=20Make=20= sure=20the=20local=20libgcc=20headers=20still=0A-#=20prevail=20(e.g.=20= unwind.h),=20and=20that=20gcc=20provided=20header=20files=20intended=0A= -#=20to=20be=20user=20visible=20eventually=20are=20visible=20as=20well.=0A= +#=20Arrange=20to=20have=20the=20correct=20target=20headers=20used=20= when=20compiling=0A+#=20libgcc.=20=20We=20specifically=20need=20to=20= handle=20VxWorks=20system=20headers=0A+#=20having=20names=20that=20= collide=20with=20GCC's=20internal=20headers.=0A+#=0A+#=20For=20example,=20= compiling=20gthr-vxworks.c=20#includes=20=0A+#=20which=20in=20= turn=20#includes=20,=20which=20exists=20both=20in=20the=20gcc=0A= +#=20source=20tree=20and=20as=20a=20VxWorks=20system=20header.=20=20We=20= need=20that=0A+#=20#include=20to=20get=20the=20VxWorks=20version,=20not=20= the=20compiler=20one.=0A+#=0A+#=20We=20still=20need=20to=20make=20sure=20= that=20the=20local=20libgcc=20headers=20prevail=0A+#=20(e.g.=20= ./unwind.h),=20and=20that=20gcc=20provided=20header=20files=20intended=0A= +#=20to=20be=20user=20visible=20eventually=20are=20visible=20as=20well=20= (gcc/include=0A+#=20and=20gcc/include-fixed).=0A+#=0A+#=20The=20latter=20= are=20added=20unconditionally=20as=20-isystem=20during=20regular=0A+#=20= cross=20builds=20via=20the=20%I=20spec=20processing=20and=20search=20= paths=20introduced=0A+#=20by=20-B=20options.=20These=20take=20priority=20= over=20whatever=20we=20can=20add=20here,=0A+#=20even=20with=20-nostdinc,=20= and=20end=20up=20at=20the=20tail=20of=20the=20search=20chain.=0A+#=0A+#=20= We=20keep=20explicit=20options=20nevertheless,=20to=20accommodate=20= canadian=0A+#=20setups=20where=20the=20libraries=20are=20built=20with=20= an=20installed=20cross=20compiler,=0A+#=20without=20-B.=20=20Also=20= note,=20incidentally,=20that=20the=20detection=20of=20duplicate=0A+#=20= paths=20differs=20between=20Windows=20and=20Linux=20hosts=20as=20the=20= latter=20can=20perform=0A+#=20inode=20based=20checks=20while=20the=20= former=20may=20only=20rely=20on=20name=20comparisons.=0A+=0A=20= LIBGCC2_INCLUDES=20=3D=20-nostdinc=20-I.=20\=0A-=20=20= -I$(MULTIBUILDTOP)../../gcc/include-fixed$(MULTISUBDIR)=20\=0A-=20=20= -I$(MULTIBUILDTOP)../../gcc/include=20\=0A=20=20=20$(if=20$(findstring=20= vxworks7,=20$(target_noncanonical)),=20\=0A=20=20=20=20=20-I$(VSB_DIR)/h=20= -I$(VSB_DIR)/share/h=20-I=3D/system=20-I=3D/public,=20\=0A-=20=20=20=20= -I=3D/=20-I=3D/wrn/coreip)=0A+=20=20=20=20-I=3D/=20-I=3D/wrn/coreip)=20\=0A= +=20=20-isystem=20$(MULTIBUILDTOP)../../gcc/include-fixed$(MULTISUBDIR)=20= \=0A+=20=20-isystem=20$(MULTIBUILDTOP)../../gcc/include=0A=20=0A=20#=20= Use=20these=20also=20for=20the=20vxcrstuff=20objects=20(.e.g=20for=20= version.h),=20on=20top=20of=0A=20#=20the=20options=20possibly=20already=20= set=20specifically=20for=20the=20target:=0A--=20=0A2.25.1=0A=0A= --Apple-Mail=_064690B9-C485-4F78-883B-32DCD7BF8C06--