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=hNRrbrPAwGN4/x2ytKAIaZEVcPEkj8h0qQa7KjlJqY8=; b=dQFCXzSmcFBxyf8cx2DhJwVmDz31iwujCoS0mn/blxv+sLSq62u5by35HURXmKLdxY lviNXCEACbWbmOaLJOtFUJR6AnZ8rNmlR0OJ+c3bHJCweL3RsCuog69ToUy7m5ESSgO9 xNYlYsSg1Woe90DMMbdU2vgVe+U1eZtQELJJ/gNNANc+Z4ZIXj75BLlnfj4ROLCh4XiM 7XPdnBT8Z/ipOOvquHkk20ftDSAr5GHtPejHO4O7z3RdtMfQ1dgj9PVJSLT/cYw8MTcy 3HMZ52SoXn5T0+e13LnvoqyEVaBxDc0cPxerVkOZMnDAPup9GfiuLPTT/ingJcBch79h TFeA== 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=hNRrbrPAwGN4/x2ytKAIaZEVcPEkj8h0qQa7KjlJqY8=; b=qOp8kNc/uI/pp2Kob1vv5slLWkYSSYsVqHeAC31Ikc8/OO90bLj438KtWn9xCs0gPc d7CThKnTt41abs+24EQ7DRmi1G9guablEPhGS3fGuIRR6irGf9QXhGrhb4xHr1+IXhH3 tF+OfcFZ3aZPmlLZheXr0sW3cnkXQqNMs9Jgh6nxtqQs9SrZhwfac4GKEBQLUiczT5oS ncI22JTxOnOjFl2POptXwgVqmxvh9dCRhumuZWT5rMGzc6A7d2ZAbRRHhfAc0wY4MKZz UxxMuCoNeHNgg7OqSIKpvqdUBDchSNaD3CW0M0Gn0hs216J15c25D1kEjMixpNRTIHSp rXOA== X-Gm-Message-State: AFqh2ko9B+VXcwaaP47yXRJ0cIrPxk/syJi6D2YmvnAOpb07bE+Cb8sZ /Y/EESngaJ1SoVzCFV8Adly0DkWfUPIMOT1YE05VzdKS X-Google-Smtp-Source: AMrXdXuJpeJpfRevHx2QSdApZuB7s85aUtj1cd+f/KHGHWsk9Be51P96Imgyyn9dKBYOAWYRPRFH+RIuQZQqZcum7aE= X-Received: by 2002:a05:600c:1d25:b0:3da:fa8a:8511 with SMTP id l37-20020a05600c1d2500b003dafa8a8511mr2538400wms.185.1674896922884; Sat, 28 Jan 2023 01:08:42 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <835ycravjo.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> From: "Ozkan Sezer (sezeroz AT gmail DOT com) [via djgpp AT delorie DOT com]" Date: Sat, 28 Jan 2023 12:08:42 +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 >> You mean, even if it won't be used, compute the libdir from either >> DXE_LD_LIBRARY_PATH or DJDIR and add it as -L ? > > AFAIK, DJDIR is always set in DJGPP. Not in cross- environments, but I hear you, > The original code used > DXE_LD_LIBRARY_PATH if it was defined, else fell back to DJDIR. I > think either keeping that, or maybe adding one more fallback, for when > neither DXE_LD_LIBRARY_PATH nor DJDIR is define, would be a > backward-compatible change. OK, can compute a libdir from those env vars and add as -Lxxx >> > I don't know. DJGPP is a very old project, and it is sometimes used >> > in strange and tricky configurations for perhaps unorthodox purposes. >> >> With those in mind, what do you think about compatibility with old >> gcc versions? I found that at least gcc-2.95 doesn't work after this >> patch possibly because it doesn't handle -T dxe.ld on the command >> line. > > I thought you said that if actually invoked from the shell prompt, it > did handle "-T dxe.ld"? > > If that is not true, can we use -Xlinker or -Wl instead, so as to > communicate this option directly to the linker? I tried doing the following, and it doesn't work even with my gcc-3.4.6 Am I doing something wrong? Index: dxe3gen.c =================================================================== RCS file: /cvs/djgpp/djgpp/src/dxe/dxe3gen.c,v retrieving revision 1.26 diff -u -p -r1.26 dxe3gen.c --- dxe3gen.c 27 Jan 2023 20:00:04 -0000 1.26 +++ dxe3gen.c 28 Jan 2023 09:04:57 -0000 @@ -198,7 +198,7 @@ #define IS_SLASH(path) (((path) == '/') || ((path) == '\\')) #define IS_DIR_SEPARATOR(path) (IS_SLASH(path) || ((path) == ':')) -#define NUMBER_OF_LINKER_ARGS 7 +#define NUMBER_OF_LINKER_ARGS 9 #define NUMBER_OF_ADDITIONAL_LOADED_LIBS 0 #define IS_VALID_CIE(id) ((id) == 0) @@ -438,8 +438,10 @@ static void process_args(int argc, char new_argv[2] = "-Wl,-X,-S,-r"; new_argv[3] = "-o"; new_argv[4] = TEMP_O_FILE; - new_argv[5] = "-T"; - new_argv[6] = dxe_sc; + new_argv[5] = "-Xlinker"; + new_argv[6] = "-T"; + new_argv[7] = "-Xlinker"; + new_argv[8] = dxe_sc; if (!strcmp(base_name(argv[0]), "dxegen"))