From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 11A843858D33; Mon, 23 Jan 2023 17:29:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 11A843858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674494945; bh=anpVE2pMwffhDshykqYomLugWfsalt77gTs3aull5p4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=oUJ42Gw3Eze7IquDahMPz+ck+GanW6Od0cYSgHYd9JzAZ6UiCcpOxRy8TMwA8jtv/ pf+itJ5qNVmuof698pRj+tiEbX9cdpkYhT5iVAtonBCC6qw3zYtwItu8R3OHmdy2CI hexaQ5MlzTUynDCnr4muFYbcy8A3i1rVeeaI0k10= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/108182] gm2 driver mishandles target and multilib options Date: Mon, 23 Jan 2023 17:29:03 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: modula2 X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: iains at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108182 --- Comment #17 from CVS Commits --- The master branch has been updated by Iain D Sandoe : https://gcc.gnu.org/g:47b269caf87904fd0112e8c9e96884dd0313ed15 commit r13-5308-g47b269caf87904fd0112e8c9e96884dd0313ed15 Author: Iain Sandoe Date: Wed Jan 11 10:22:34 2023 +0000 modula-2, driver, Front end: Revise handling of I and L paths [PR108182= ]. The adds the includes in the FE as done in other GCC languages. It also revises the library handling to avoid additional -L options from hiding LIBDIR. For the include/import paths as presented to the front end initialisati= on, we capture them and then arrange to emit the 'standard library' paths in the same order as specified for C. The specs are tidied up. The use of the internal prefix also fixes searching in a relocated compiler. Signed-off-by: Iain Sandoe PR modula2/108182 PR modula2/108480 gcc/m2/ChangeLog: * Make-lang.in: Pass libsubdir to the language init build. * gm2-lang.cc (INCLUDE_VECTOR): Define. (add_one_import_path): New. (add_m2_import_paths): New. (gm2_langhook_post_options): Arrange to add the include paths (and add the system ones) in the same order as C uses. * gm2spec.cc (build_archive_path): Remove. (add_default_combination): Remove. (add_default_archives): Remove. (add_default_libs): We no longer need a '-L' option, just emit the -l and each library in use. (build_include_path): Remove. (add_include): Remove. (add_default_includes): Remove. (library_installed): Remove. (check_valid_library): Remove. (check_valid_list): Remove. (convert_abbreviation): Diagnose unhandled cases. (lang_specific_driver): Skip options where we will add back a validated version. * lang-specs.h (M2CPP): Reformat, append %I when -fcpp is not in use. Revise the cc1gm2 spec to omit mentioning options that are handled in the c pre-processor line. * lang.opt: Allow preprocessing and path options as input to the cc1gm2 invocation, so that they can be passed to the preprocess= or invocation.=