From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) by sourceware.org (Postfix) with ESMTPS id 597173858D20 for ; Thu, 9 Mar 2023 18:45:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 597173858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-io1-xd32.google.com with SMTP id b5so1103383iow.0 for ; Thu, 09 Mar 2023 10:45:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678387546; h=content-transfer-encoding:in-reply-to:from:cc:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=JmhHuMHUQOsFkyCe0NHCocR9XGLGXEcfs31tJACqEZo=; b=gKEG8eXrQ87lkwGKy2e2c+D9nu2KDJezDIR8NaC24L217DOgnBeoDljT9hRz8gLtQG k3eZcdBPz3N85+coRcnVxjFSXgWr6KZY44Znfh3eMS9pSZHpBsKWjq8hPGeIhS8/KLPt vprjXUiuIclAtEabl6pHKLWh11YavVPRf7/6/SgjfpOUrDFkZfPAT6W3cY/wJ9rIgQpy 7Y6+550vOGoCAarJwdEJFn25zAIs8jnlYhxUM2ogAqxBkgHxum55B7QnSB5INBpTF7Gp FO5LrfVneDnsS4G4F8pgzy1M8KTuL9N5Ca+gcDsACF2pxPe+COMqkCkiWHFdpMNfkOxY NM8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678387546; h=content-transfer-encoding:in-reply-to:from:cc:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JmhHuMHUQOsFkyCe0NHCocR9XGLGXEcfs31tJACqEZo=; b=q62CShtXOfYEx1O3fEVUVbipJL3xDeMqr2twZKp6ku4wvDvTtp3V+1yI4OIOqkBTTg k+MxoQD0Z1HqgY7tLSAXL7bXQIsUQHThFzl44URCl4o+HOGBT52b1HSZOCivJ+7sRljr USZh53sFf+OSbDg/VX5dEFOCSqlTvjVLZRaRFHZ9blAUpWFE/fXt8Lmh7W44AhanchJC 89jPadLEJM7QHNnBy0Q2isLBAhdjBpWi3TFV/zzpKghmzoTiGrXFhxCQIUULn4b+2mo/ 096weGgxqwMWPJFvW4Qu+odxYaaj7VBZrLw/xFZBqNz0hCBaXKczA9jwPiu/o6cKf2Cr 9dVg== X-Gm-Message-State: AO0yUKUBBhbsL5vrTyAd4xD2cpOvo63MxcI2ZtsQ3PwZyfTgHOReRkDP hFQLtV4xADC4EcHMVI9mxnKB4A7Ve2k= X-Google-Smtp-Source: AK7set/zwsExPGA8C0tDxJ3GcrAvFUP0WbifcCV+RHiZMwCFP9xhgbBqm/Ie2msyouGTKmbV2+WuHw== X-Received: by 2002:a5d:9588:0:b0:74c:8807:120d with SMTP id a8-20020a5d9588000000b0074c8807120dmr1428631ioo.9.1678387546641; Thu, 09 Mar 2023 10:45:46 -0800 (PST) Received: from [10.0.1.25] (198.27.14-65.ip.mltn.standardbroadband.ca. [198.27.14.65]) by smtp.gmail.com with ESMTPSA id l4-20020a056e0205c400b00317f477b039sm5216ils.4.2023.03.09.10.45.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Mar 2023 10:45:46 -0800 (PST) Message-ID: Date: Thu, 9 Mar 2023 13:45:44 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: Unable to build GDB 13.1 on Solaris 11.3 Sparc Content-Language: en-CA To: Rainer Orth References: Cc: gdb@sourceware.org From: Nemo Nusquam In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,NICE_REPLY_A,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: On 2023-03-08 17:19, Rainer Orth wrote (in part): > Nemo Nusquam via Gdb writes: > > > > I am trying (and failing) to build GDB 13.1 on Solaris 11.3 Sparc. > > > > > > Here is my configuration script. > > > > > > CXXFLAGS='-g3 -O0' \ > > > CFLAGS='-g3 -O0' \ > > Why?  Do you want/need to debug the resulting gdb itself? Otherwise, > just leave the defaults (-g -O2). These options are those specified on the GDB Wiki (https://sourceware.org/gdb/wiki/BuildingNatively). > > > NM=/usr/bin/gnm \ > > > SHELL=/usr/bin/bash \ > > Probably rather CONFIG_SHELL.  Btw., it's often best to have > /usr/gnu/bin before /usr/bin in $PATH: configure scripts sometimes > assume the GNU tools and fail in weird ways with the native ones. > > > > AR=/usr/bin/gar \ > > > AS=/usr/bin/as \ > > Unnecessary for gdb. The gar options are different than the ar options.  Specifying AR seems necessary. > Even when building gcc, use --with-as=/usr/bin/as > --without-gnu-as as documented in the installation guide. Relying on > $PATH is risky and fragile. Noted though I have built dozens of different versions of GCC this way. > > > CC=/home/build/gcc/git/bin/gcc \ > > > CXX=/home/build/gcc/git/bin/g++ \ > > I suppose this is a 32-bit-default gcc (i.e. configured for > sparc-sun-solaris2.11, not sparcv9-sun-solaris2.11)?  Any reason not to > use the bundled gcc 7.3.0?  That one is 64-bit-default. Solaris 11.3 came bundled with gcc-4.8.2.  I relied on config.guess, which specifies sparc-sun-solaris2.11.  I shall try sparcv9-sun-solaris2.11. > > > ../configure \ > > > --with-mpc=/usr/local \ > > > --with-gmp=/usr/local \ > > > --with-mpfr=/usr/local \ > > > --enable-64-bit-bfd \ > > > --enable-tui \ > > > --with-curses \ > > > --disable-bootstrap \ > > This is gcc only, thus unnecessary for a gdb build. Noted. > > > --disable-binutils \ > > > --disable-ld \ > > > --disable-gprof \ > > > --disable-gprofng \ > > > --disable-gold \ > > > --disable-gas \ > > > --disable-sim > > If you're building from the gdb 13.1 tarball, you can omit those. Again, the options were taken from the GDB Wiki. > Btw., > --disable-binutils is harmful: gdb depends on libbfd and won't link > without, as you've discovered. Again, the option was taken from the GDB Wiki. > > > (Some flags taken from https://sourceware.org/gdb/wiki/BuildingNatively .) > > In general, please start with the bare minimum of configure flags (like > the --with-* stuff).  Unless you known 200% what you're doing, > additional flags usually cause more harm then anything. Noted. > Hope this helps. > >     Rainer > Thank you. Sincerely, N.