]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Modula-2: Support '-isysroot [...]'
authorThomas Schwinge <thomas@codesourcery.com>
Tue, 5 Dec 2023 08:54:54 +0000 (09:54 +0100)
committerThomas Schwinge <thomas@codesourcery.com>
Wed, 6 Dec 2023 11:36:15 +0000 (12:36 +0100)
In GCC cross configurations (tested '--target=amdgcn-amdhsa' and
'--target=nvptx-none') with a sysroot configured, the 'gm2' driver invocations
are passed '--sysroot=[...]', which is translated into '-isysroot [...]' for
the 'cc1gm2' compiler invocation.  The latter, however gets complained about:

    cc1gm2: warning: command-line option â€˜-isysroot [...]’ is valid for C/C++/D/Fortran/ObjC/ObjC++ but not for Modula-2

..., and therefore a ton of FAILs.

Reproducer (also for non-cross, native configurations):

    $ build-gcc/gcc/gm2 -Bbuild-gcc/gcc -v --sysroot=/tmp -x modula-2 /dev/null
    [...]
     build-gcc/gcc/cc1gm2 [...] -isysroot [...]/tmp [...]
    cc1gm2: warning: command-line option â€˜-isysroot /tmp’ is valid for C/C++/D/Fortran/ObjC/ObjC++ but not for Modula-2
    [...]

gcc/m2/
* lang.opt (-isysroot): New.

gcc/m2/lang.opt

index 24f3c6594b9611c5ef9c796ed3a462d66c7fefaf..a60c03e69d4738df39d2cd972543dea9ce169c67 100644 (file)
@@ -405,6 +405,10 @@ iquote
 Modula-2
 ; Documented in c.opt
 
+isysroot
+Modula-2
+; Documented in c.opt
+
 isystem
 Modula-2
 ; Documented in c.opt