From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2610:1c1:1:606c::19:2]) by sourceware.org (Postfix) with ESMTPS id B776E3858417 for ; Fri, 10 Mar 2023 20:01:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B776E3858417 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=FreeBSD.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits)) (Client CN "mx1.freebsd.org", Issuer "R3" (verified OK)) by mx2.freebsd.org (Postfix) with ESMTPS id 4PYH432s07z3gCN; Fri, 10 Mar 2023 20:01:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PYH4324rPz4LNh; Fri, 10 Mar 2023 20:01:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678478467; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mAyOYDpZk8C3eurhEbiOXOTDljUsfhKtp/adJP2PsbA=; b=OjGBsrNr7E2+Dl9VeBCey895KHFyD5YJBRr845/gCCDb1voHJyK47jzcjtAw7vkizf40Wj ilt1JaWplITQD7aqbGXEPqHM6vPtvUyIXX1f7mXVg/aGvX5OwxVEXuDjJLKx3rvB4cVMDk HqnVagqW3Bfv4EalbcjHVzSD1zsuxHq8z9RGrFDfo2FBhNof/rbY2dOzuhKlPn9nagmHpW R0fH7/oRw1qQy81UYfU30TA/FFz5o8IRaRD70TE+N/vcAnpdiudre/NAvk4icn/LbkGTI6 6BoFKKYkSAZyd1kmEuFb3EOa5vE3Bm4Lb0XsZBptzI8inPjcaKkJzxRMBYqZug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678478467; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mAyOYDpZk8C3eurhEbiOXOTDljUsfhKtp/adJP2PsbA=; b=aOrqGW1VXmDZsSZVEk9ZJhsjRROxZrrcLdvxxYhSOYcmbpwbl4Pzq/NiOzm7qNFOgiSTaL 6Kkv1IS3P/uz9SfXhR2VfoFKbudl7Vrkv+0XaAWYxQPpLljnp0c7KuVhPpRaPSdC5zWV1W o9HB93LQAzQdzWeqLBjeAisZU2qNse8JWmOy2l0H13RrLhMfYepj/iOlZ1aMB8lm8qNSc2 VksvgCjPXjxfIQ+dxHinCKZDOkUc4NwPyD8RCpeSE8yPLvSy18NO5W5kJtNB6jOSJl1zJc DwlkdfxmAYbPfpUVez5AVFycA0EHBWu6bZhUnzAQrI7vT6Lx18uh/sR5KxWwow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678478467; a=rsa-sha256; cv=none; b=sy6M+p6eNQvgnaIcbnccH159mTsPU5YD2Vq8IxHiNqwiZVOEAZkpcyVX+3CFiiijiqhAmo r37gSinqNKQjY2cjiJXbIFRLLLTXy5qI1xzU2O+fMFHbTUVoSCfzKvFigBkWtxV3L5qxcC SDsjcZplM9DhaURLu8mlLx7ZRsn4kuaftipljqZAIInWi/mbkhBozQF2j0+Z8LZsLfHUEs iXOZWf++Db4aZjEEl+p6Vunl2cDqEY2jwn2+HcD6oFZszN8g1LL9FP0C6BwIfnX+zbNON8 M7+MsOP8kIL659eXpBziKjHRrkJOGYqbLfLD10PH/f1JgwxqKDBA9JmDMVnyCg== Received: from [IPV6:2601:648:8680:16b0:8935:95bf:f86b:350e] (unknown [IPv6:2601:648:8680:16b0:8935:95bf:f86b:350e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4PYH426Gwtz16R5; Fri, 10 Mar 2023 20:01:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Fri, 10 Mar 2023 12:01:05 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH] PR gdb/30214: Prefer local include paths to system include paths Content-Language: en-US To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20230309212341.55302-1-jhb@FreeBSD.org> <87lek4mzty.fsf@tromey.com> From: John Baldwin In-Reply-To: <87lek4mzty.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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: On 3/10/23 6:43 AM, Tom Tromey wrote: >>>>>> "John" == John Baldwin writes: > > John> Some systems may install binutils headers into a system location > John> (e.g. /usr/local/include on FreeBSD) which may also include headers > John> for other external packages used by GDB such as zlib or zstd. If a > John> system include path such as /usr/local/include is added before local > John> include paths to directories within a clone or release tarball, then > John> headers from the external binutils package are used which can result > John> in build failures if the external binutils package is out of sync with > John> the version of GDB being built. > > It seems a little weird that configure would ever end up with > -I/usr/local/include but maybe that's some pkg-config weirdness or maybe > some platforms don't include that by default so it's needed. On FreeBSD it is the latter. Compilers on FreeBSD only include the base system (/usr/include and /usr/lib) by default and require explicit -I and -L to find "external" packages (which all end up under /usr/local). AFAIK, the other BSD's are similar in this regard. -- John Baldwin