X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=HLdqkCgUhz7wgBuAVqkC2aO6hzIa2kv7BZt1JD+V0wM=; b=KCf8KIqGOpIx1h4orx/IV70yGgTh8lOM1fygAkHSn4wmXycJ+Fns2SJcohtLazgJiE lExNZl1Kx29xDd2kA2hVb3P2ivtMRyBWcXUhX1YUwHs32dQIuplUHYssYlkLANYhvNoi 1pjDq5n02BA8f/YlxfsR4QmRiRZ8LZ1q0gLGdXsS2WZf6uZ0BbtlRSUoUXHPF2MZQBJG fsYkIqOKjLd/+b66uJpAt+NiMzBC/5VZAUFSHDXzL2wS2L426z946qM7DmbIJGCASoWz 71bJDIrfqytXZoG88q4E6nMB6MTqteevfkJ7bNZE9eXnh8AQ5PAvoG5nmk0o9CIEdNx+ sF6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=HLdqkCgUhz7wgBuAVqkC2aO6hzIa2kv7BZt1JD+V0wM=; b=gyoGZFZFslCdviymp1FZXgBUU1uOzf5P77PAniOngCoZojMGDWBzoVX6gTgQAq3sT7 g+PBWNkvPT0YWoLdSO8DFdUFycNynhSrJ2Hvj17gDGP2bnOdstw/oqRcsHH3OflmNd1F Q0zKTP1xz8zII5aSWoNgzLkEIgud1QXAma6McqpuPSwCngCochZjmf7zrz/JZIzJgniw YE4gH+1CDf9CXyG2U1Z5qfBdUvn+NuOchiAKXFxvU9st7X0JqT4CBDvd4xK8lj6/vX9P oV3/kZvNmkxXODCQIFEeg5b/KlbHNmWx6fTfeiUzLgvC5N3d/uY9hLKiz3GVnqjM9i+L syEQ== X-Gm-Message-State: AO0yUKX3p5WeBtDfM3cSxbDDL5OiCj7L94MoA6nHtQrIKesk0V+nVQk6 HEUu4gSCQ1ELhQx7vNwusAGtTKFIzPZ5hw== X-Google-Smtp-Source: AK7set99TbYTysjgByAcl5leIraKR+uaV4ifbHXnlRM8UUxR4ZZ7mrRwQNRRBVg4kwrZRF2Fy9l6AA== X-Received: by 2002:a05:6402:2b97:b0:4a2:fa0:e9f0 with SMTP id fj23-20020a0564022b9700b004a20fa0e9f0mr9274873edb.32.1675017317074; Sun, 29 Jan 2023 10:35:17 -0800 (PST) Message-ID: Date: Sun, 29 Jan 2023 19:35:15 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH v3] dxe3gen: invoke ld/as via gcc To: djgpp AT delorie DOT com References: <83r0vd78cu DOT fsf AT gnu DOT org> <83o7qh74td DOT fsf AT gnu DOT org> Content-Language: en-US From: "J.W. Jagersma (jwjagersma AT gmail DOT com) [via djgpp AT delorie DOT com]" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On 2023-01-29 16:20, Ozkan Sezer (sezeroz AT gmail DOT com) [via djgpp AT delorie DOT com] wrote: >>>>> How about the following suggestion? >>>> >>>> Is this really needed? IOW, can it really happen that the compiler >>>> fails to find libgcc unless explicitly told to look in the right >>>> directory? >>> >>> gcc can, but ld can not: my suggested patch is not on top of JW's patch >>> it is against cvs where we invoke ld, not gcc. (Remember that the whole >>> purpose of JW's patch is that dxe3gen can find libgcc automatically w/o >>> any user effort..) >> >> So it's an alternative patch? > > Yes > >> If so, what do you suggest to do with >> libstdc++, which AFAIU was the original motivation for the change? > > Aren't all gcc-provided versioned libraries residing in the same dir? > My patch just relies on that. It is probably possible to configure different directories for libstdc++ and libgcc. The native gpp*b.zip packages on ftp seem to do that. But another benefit of using gcc to invoke the linker, is that additional default library paths can be added via the specs file. For example, with my toolchain packages for Debian, linking via gcc will search: /usr/i386-pc-msdosdjgpp/local/lib (libraries compiled by user) /usr/lib/gcc/i386-pc-msdosdjgpp/x.x.x (gcc / libstdc++ libraries) /usr/i386-pc-msdosdjgpp/lib (libraries installed via package manager) And of course, users will no longer need to set any environment vars to run dxe3gen. It will just work "out of the box". That wasn't the initial goal, but I think it's a welcome side-effect.