With respect, this is another example of "I have been unable to make it
work."

The gcc/Makefile.in has this line in it:

$(foreach file,$(ALL_HOST_FRONTEND_OBJS),$(eval CFLAGS-$(file) +=
-DIN_GCC_FRONTEND))

At the point where gcc/cobol files are compiled, the environment variable
has this value:

        CFLAGS-cobol/genapi.o is -DIN_GCC_FRONTEND

An attempt to override that with

        make CFLAGS-cobol/genapi.o=-DHARMLESS

has no effect on the value of the CFLAGS-cobol/genapi.o

I commented out the $(foreach... line and tried to set the variable with
the make command.  

Even then, CFLAGS-cobol/genapi.o did not seem to be set as a result.  

I do not know why my attempts to set CFLAGS-cobol/genapi.o are failing.


> -----Original Message-----
> From: Andreas Schwab <sch...@suse.de>
> Sent: Wednesday, July 9, 2025 03:23
> To: Robert Dubner <rdub...@symas.com>
> Cc: Rainer Orth <r...@cebitec.uni-bielefeld.de>; gcc-patches@gcc.gnu.org
> Subject: Re: [PATCH] cobol: Implement CXXFLAGS_FOR_COBOL.
> 
> On Jul 08 2025, Robert Dubner wrote:
> 
> > Are you suggesting that I can somehow apply a specific set of flags
when
> > compiling, for example,
> >
> >     gcc/cobol/genapi.cc
> >
> > If so, how could I do that?
> 
> There are some examples in gcc/Makefile.in.
> 
> CFLAGS-cobol/genapi.o = ...
> 
> --
> Andreas Schwab, SUSE Labs, sch...@suse.de
> GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
> "And now for something completely different."

Reply via email to