]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
cobol: Remove %I spec master trunk
authorXavier Del Campo Romero <xdelcampo@symas.com>
Mon, 15 Jun 2026 20:53:48 +0000 (22:53 +0200)
committerJames K. Lowden <jklowden@cobolworx.com>
Mon, 22 Jun 2026 17:01:41 +0000 (13:01 -0400)
Remove %I from the spec string because gcobol does not use the C
preprocessor library and does not search include/ or include-fixed/
directories.  Instead, system copybooks (as they're called) follow the
runtime library and are installed into the LIBSUBDIR, similarly to
Modula-2's .def files.

For compilations relying on non-standard paths (i.e., outside the
installation prefix), -B is already handled by the cobol1 compiler.

gcc/cobol/ChangeLog:

* gcobol.1: Document -B.
* lang-specs.h: Remove %I spec.
* lang.opt: Remove options injected by %I.
* lang.opt.urls: Likewise.

gcc/cobol/gcobol.1
gcc/cobol/lang-specs.h
gcc/cobol/lang.opt
gcc/cobol/lang.opt.urls

index 97426966b525a5bba3127b8fec80e874d074db0d..3442f898177d61a76eff6c376137653397b253a0 100644 (file)
@@ -11,6 +11,7 @@
 .Nm
 .Op Fl D Ns Ar name Ns Oo Li = Ns Ar value Oc
 .Op Fl E
 .Nm
 .Op Fl D Ns Ar name Ns Oo Li = Ns Ar value Oc
 .Op Fl E
+.Op Fl B
 .Op Fl fdefaultbyte Ns Li = Ns Ar value
 .Op Fl fsyntax-only
 .Op Fl I Ns Ar copybook-path
 .Op Fl fdefaultbyte Ns Li = Ns Ar value
 .Op Fl fsyntax-only
 .Op Fl I Ns Ar copybook-path
@@ -144,6 +145,38 @@ See below for examples showing the use of
 .Fl main
 and
 .Fl nomain.
 .Fl main
 and
 .Fl nomain.
+.It Fl B Ar prefix
+Add a search location for the system copybooks, so they can be found with the
+.Sy COPY
+statement. For each location, the
+.Sy cobol1
+compiler shall search for copybooks inside the following subdirectories,
+relative to
+.Ar prefix :
+.Pp
+.Bl -tag -compact
+.It Sy compat/gnu/lib/
+.It Sy compat/gnu/cpy/
+.It Sy compat/gnu/udf/
+.It Sy posix/cpy/
+.It Sy posix/udf/
+.It Sy cobol/compat/gnu/lib/
+.It Sy cobol/compat/gnu/cpy/
+.It Sy cobol/compat/gnu/udf/
+.It Sy cobol/posix/cpy/
+.It Sy cobol/posix/udf/
+.El
+.Pp
+Additionally,
+.Sy cobol1
+shall append the configured
+.Sy LIBSUBDIR
+as an additional search location, where
+.Sy LIBSUBDIR
+is typically configured to
+.Ar machine/version/ ,
+relative to the configured
+.Ar libdir .
 .It Fl D Ar name Ns Op Li = Ns Ar expr
 Define a CDF name (for use with
 .Sy >>IF )
 .It Fl D Ar name Ns Op Li = Ns Ar expr
 Define a CDF name (for use with
 .Sy >>IF )
index 9fbc15d1cb9d25af89c4f7003c43de4e28a6af67..84dd1757152b022ae22853016ef9421e26d0dfa4 100644 (file)
@@ -34,7 +34,6 @@
     {".CBL", "@cobol", 0, 0, 0},
     {"@cobol",
         "cobol1 %i %(cc1_options) "
     {".CBL", "@cobol", 0, 0, 0},
     {"@cobol",
         "cobol1 %i %(cc1_options) "
-        "%I "
         "%{B*} %{D*} %{E} %{I*} %{M} %{fmax-errors*} %{fsyntax-only*} "
         "%{idirafter}"
         "%{fcobol-exceptions*} "
         "%{B*} %{D*} %{E} %{I*} %{M} %{fmax-errors*} %{fsyntax-only*} "
         "%{idirafter}"
         "%{fcobol-exceptions*} "
index f629a0447e994235049bffacd8ad947ce5bdddfe..8abd816ae64c6c6caed0a2ef1d99d88d56c85a70 100644 (file)
@@ -390,22 +390,10 @@ preprocess
 Cobol Joined Separate Var(cobol_preprocess)
 Preprocess <source_filter> before compiling.
 
 Cobol Joined Separate Var(cobol_preprocess)
 Preprocess <source_filter> before compiling.
 
-iprefix
-Cobol Joined Separate
-; Documented in C
-
 include
 Cobol Joined Separate
 ; Documented in C
 
 include
 Cobol Joined Separate
 ; Documented in C
 
-isysroot
-Cobol Joined Separate
-; Documented in C
-
-isystem
-Cobol Joined Separate
-; Documented in C
-
 idirafter
 Cobol Joined Separate
 ; Documented in c.opt
 idirafter
 Cobol Joined Separate
 ; Documented in c.opt
index db78cc00164bb371dbc0cc374193e9674df58e46..f6c27a577f7ee628ca866e827f400367c9be9b5d 100644 (file)
@@ -28,18 +28,9 @@ LangUrlSuffix_Fortran(gfortran/Fortran-Dialect-Options.html#index-ffree-form)
 preprocess
 UrlSuffix(gcc/Overall-Options.html#index-preprocess)
 
 preprocess
 UrlSuffix(gcc/Overall-Options.html#index-preprocess)
 
-iprefix
-UrlSuffix(gcc/Directory-Options.html#index-iprefix) LangUrlSuffix_D(gdc/Directory-Options.html#index-iprefix) LangUrlSuffix_Fortran(gfortran/Preprocessing-Options.html#index-iprefix)
-
 include
 UrlSuffix(gcc/Preprocessor-Options.html#index-include)
 
 include
 UrlSuffix(gcc/Preprocessor-Options.html#index-include)
 
-isysroot
-UrlSuffix(gcc/Directory-Options.html#index-isysroot) LangUrlSuffix_Fortran(gfortran/Preprocessing-Options.html#index-isysroot)
-
-isystem
-UrlSuffix(gcc/Directory-Options.html#index-isystem) LangUrlSuffix_Fortran(gfortran/Preprocessing-Options.html#index-isystem)
-
 idirafter
 UrlSuffix(gcc/Directory-Options.html#index-idirafter) LangUrlSuffix_Fortran(gfortran/Preprocessing-Options.html#index-idirafter)
 
 idirafter
 UrlSuffix(gcc/Directory-Options.html#index-idirafter) LangUrlSuffix_Fortran(gfortran/Preprocessing-Options.html#index-idirafter)