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.
.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 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
+.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 )
{".CBL", "@cobol", 0, 0, 0},
{"@cobol",
"cobol1 %i %(cc1_options) "
{".CBL", "@cobol", 0, 0, 0},
{"@cobol",
"cobol1 %i %(cc1_options) "
"%{B*} %{D*} %{E} %{I*} %{M} %{fmax-errors*} %{fsyntax-only*} "
"%{idirafter}"
"%{fcobol-exceptions*} "
"%{B*} %{D*} %{E} %{I*} %{M} %{fmax-errors*} %{fsyntax-only*} "
"%{idirafter}"
"%{fcobol-exceptions*} "
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
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)