> On 30 Mar 2025, at 15:07, Robert Dubner <rdub...@symas.com> wrote:
>
> Follow-up. I risked wrath from my family and grabbed a minute. Tried
> the -L thing and eliminated all the SED statements on the .h files.
>
> It worked.
>
> Are there reasons not to use it?
There were coments about having explicit paths in the sources being more
obvious to development - but these are currently copies made at build time
so perhaps those comments would apply more to the idea of making an
included common text.
I think, in the end, it is your call - so long as the end result is portable.
The latter is the priority (for me, at least), given we probably do not have
much time until GCC-15 branches
cheers
Iain
>
>> -----Original Message-----
>> From: Robert Dubner <rdub...@symas.com>
>> Sent: Sunday, March 30, 2025 09:52
>> To: Jakub Jelinek <ja...@redhat.com>; Iain Sandoe <i...@sandoe.co.uk>
>> Cc: James K. Lowden <jklow...@cobolworx.com>; Richard Biener
>> <rguent...@suse.de>; GCC Patches <gcc-patches@gcc.gnu.org>
>> Subject: RE: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules
>>
>> Folks: Am I missing something stupid here?
>>
>> I just tried putting
>>
>> CXXFLAGS_SAVE=$(CXXFLAGS)
>> override CXXFLAGS:=$(CXXFLAGS_SAVE) -I DUBNER_CXXFLAGS
>>
>> near the beginning of cobol/Make-lang.in, and
>>
>> override CXXFLAGS:=$(CXXFLAGS_SAVE)
>>
>> near the end.
>>
>> I don't have time right now to do a full check, but I am seeing
>> "DUBNER_CXXFLAGS in the output of the build.
>>
>> Is there some reason
>>
>> override CXXFLAGS:=$(CXXFLAGS_SAVE) -I $(srcdir)/../libgcobol
>>
>> won't solve the whole problem? That will give me the -I I need, and
>> presumably not pollute the Makefile space.
>>
>> <running out the door, or I would check it myself right now>
>>
>> Bob D.
>>
>>
>>> -----Original Message-----
>>> From: Jakub Jelinek <ja...@redhat.com>
>>> Sent: Saturday, March 29, 2025 12:12
>>> To: Iain Sandoe <i...@sandoe.co.uk>
>>> Cc: Robert Dubner <rdub...@symas.com>; James K. Lowden
>>> <jklow...@cobolworx.com>; Richard Biener <rguent...@suse.de>; GCC
>> Patches
>>> <gcc-patches@gcc.gnu.org>
>>> Subject: Re: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules
>>>
>>> On Sat, Mar 29, 2025 at 04:03:07PM +0000, Iain Sandoe wrote:
>>>>
>>>>
>>>>> On 29 Mar 2025, at 15:56, Jakub Jelinek <ja...@redhat.com> wrote:
>>>>>
>>>>> On Sat, Mar 29, 2025 at 03:50:54PM +0000, Iain Sandoe wrote:
>>>>>>> I'm not sure if sed -E is portable enough (sure, I know it is in
>>> POSIX, but
>>>>>>> that is not enough).
>>>>>>> How about just
>>>>>>> sed -e '/^#include/s,"\([^"]*.h\)","../../libgcobol/\1",' $& >
>>> $@
>>>>>>
>>>>>> This, unfortunately, works too well (with s/&/^) .. because it also
>>> processes #include “config.h”
>>>>>> which then points to a non-existent file. I think we want to
>> include
>>> config for both FE and
>>>>>> library (so we cannot get around it by indenting the config.h
>> include
>>> - well we could, but …)
>>>>>
>>>>> Neither libgcobol/charmaps.cc nor libgcobol/valconv.cc has config.h
>>> include.
>>>>
>>>> but it’s an approved patch (just waiting for the main config change to
>>> be reviewed) and needed
>>>> for the other lib changes. I’ll investigate if we could find a way to
>>> drop it fro those two files.
>>>
>>> config.h is the only header ending with g in there, so
>>> sed -e '/^#include/s,"\([^"]*[^g"].h\)","../../libgcobol/\1",' $^ >
>>> $@
>>> then?
>>>
>>> Jakub
>