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=to:subject:message-id:date:from:references:in-reply-to:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=Asjvv9TNZof+vvTYJIfPLwNq4Vu/C9MPjMW9vHZlqnw=; b=TKCdJy6reF5GvVKwl1ppCJiymKgTfImwgbxTL074feeCD3/kpthGjzAfe4ka+gc/E2 kF9M0NS0jMXdELZ3sqg6tm4sy0R082mQVqx+UjeM+7yIN+lIPGtNgMuLRr7mVECPZlxA aVwm8wQANy7ChUFxnb12n/ILDtrzbulVeXoS9pAleRRvOCqDP5Qgtzscz2+St2cndQQe c+S/rf4rEr+jtfo7/XWiDxo4dxeeUpLS+Jpx+M6c+yXd3A2raz/Gv/asTuMb0MfvQsUZ /irzziw65WIcyiAI8vNObxHXX1P7J9sGNUGA+1qyiQMYg7V9HkRx9grKhq55KMh8wxFN 3mdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:references:in-reply-to:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Asjvv9TNZof+vvTYJIfPLwNq4Vu/C9MPjMW9vHZlqnw=; b=lGmFTzvMNBAf9+Z1zei9plNPldr8wciP2QiF34WURJXvmDMXY9gQNdK9P+ao26HcQ6 ZKlAIheGji6IkfBcljJlPD7HkDh09HK/ESa7I8cpQj1aBLAuqs38QBA08Rk75uzJZg/k AGlPypuRoT2yKkY7RENRJYMXR5xNVRR5vC40NaI4wF5CBJZWrU15Bg8wMnvQNGy16olb Ik9Wp5Q2PNg8bFChhBxiqz9mcAj1YSZ/A/SQAU8i5yzbu57umGGlcgG4uHua1x/lWr7Y BVMcP10JMHbKqavPdht2pgP3suGCCQt+h8fIx/TmyCzRjeUdOa2Zme7oY3PjGWWWjSs/ V7TQ== X-Gm-Message-State: AFqh2kpsZb9n9nnnORaEAdzzwLaYxcYVlly2nSl5A7Tpy+9LDWnooYbf 5vaWFd6+F9QZijXHNmkrI9d8vn2PbpFZVR2BaxQsRpqj X-Google-Smtp-Source: AMrXdXuQJPUJcxFXn8POZdRPQqHgBojuuQUsY+gw9iS9UFcNjdkmuCswawHFWUoSjvX30DrJUce68KqONLYAG4yaiKQ= X-Received: by 2002:a5d:5185:0:b0:2bd:d222:68b3 with SMTP id k5-20020a5d5185000000b002bdd22268b3mr944128wrv.95.1674911334048; Sat, 28 Jan 2023 05:08:54 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <83lelmakwk.fsf@gnu.org> References: <3b8f674c-bca3-c679-952e-f8ba5af196e7 AT gmail DOT com> <500850be-fd64-3f82-a1e1-929903084e9b AT gmail DOT com> <3d9271ae-266d-ee7b-853b-984857ced1c8 AT gmail DOT com> <83sffvbux1 DOT fsf AT gnu DOT org> <83mt63azwi DOT fsf AT gnu DOT org> <835ycravjo DOT fsf AT gnu DOT org> <83zga39fil DOT fsf AT gnu DOT org> <83v8kr9bye DOT fsf AT gnu DOT org> <83lelmakwk DOT fsf AT gnu DOT org> From: "Ozkan Sezer (sezeroz AT gmail DOT com) [via djgpp AT delorie DOT com]" Date: Sat, 28 Jan 2023 16:08:52 +0300 Message-ID: Subject: Re: DXE3 with std::vector To: djgpp AT delorie DOT com Content-Type: text/plain; charset="UTF-8" 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 >>> Note that additional "-Tdjgpp-x.djl" at the end which screws up >>> everything. >>> >>> What if you use both -T and -Xlinker -T? IOW, pass -T both to GCC and >>> to the linker directly? >> >> That works with gcc-3.4.6, but not with gcc-2.95: adding -v to command >> line shows that gcc295 invokes ld with -Tdjgpp.djl -T dxe.ld >> >>> If this still doesn't work, can you show the output of "gcc -dumpspecs" >>> from GCC 2.95? >> >> Attached as 295SPECS.TXT [EDIT: really attached it this time.] > > OK, I see the problem now. So this means people who use GCC 2.95 will > have to use the previous version of dxe3gen. In that case, I think > I'm okay with documenting this and ignoring the problem with GCC 2.95. I still don't know what other gcc versions would have an issue with the new version, e.g. gcc 3.0, 3.1, 3.2 or 3.3: I only tested with 3.4, so I am not 100% comfortable with the patch being in. (Also see down below.) >>>>> OK, but still: there should be no problem with having both on the >>>>> command line, right? >>>> >>>> No, no problems. But detecting and correctly using -lgcc was the >>>> original goal. >>> >>> But -L doesn't contradict that goal, does it? >> >> I'm trying to understand your question and how you see things: >> What I'm saying is, needing to add an additional -L/some/path for >> -lgcc is really counter-intuitive and unexpected. I guess someone >> has to run gcc -print-libgcc-file-name to manually detect it and >> than add it to his own command line. > > Sure, but we are already talking about someone who does something very > non-standard. For the record, -lgcc is not non-standart, > I just prefer that we leave those hypothetical people a > way of keeping their setups, whatever they are, and I think supporting > DJDIR and DXE_LD_LIBRARY_PATH for adding -L options to the command > line cannot do any harm to people who use the standard directories, > right? Was the discussion in this section only about DXE_LD_LIBRARY_PATH and/ or DJDIR support? (I knew we were speaking about different things :) No, I am not against restoring DXE_LD_LIBRARY_PATH and/or DJDIR env vars recognition. BTW, if I revert the patch and go back to the previous version, -lgcc problem can be easily worked around when using a makefile, like: LIBGCCDIR = $(dir $(shell $(CC) -print-libgcc-file-name)) my.dxe: dxe3gen -o my.dxe -E _sym -U $(OBJS) -L$(LIBGCCDIR) -lgcc I even created a documentation patch to dxegen.txi for it. Should we really keep the patch in, or revert it?