https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108480

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain D Sandoe <ia...@gcc.gnu.org>:

https://gcc.gnu.org/g:47b269caf87904fd0112e8c9e96884dd0313ed15

commit r13-5308-g47b269caf87904fd0112e8c9e96884dd0313ed15
Author: Iain Sandoe <i...@sandoe.co.uk>
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 initialisation,
    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 <i...@sandoe.co.uk>

            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 preprocessor
            invocation.

Reply via email to