Re: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules

2025-04-07 Thread Jakub Jelinek
On Wed, Apr 02, 2025 at 04:24:30PM -0500, Robert Dubner wrote: > Solutions have been put in place that don't involve modifying the source > code of the copied files. I haven't made an opportunity to understand how > they work, but I am choosing to drop the matter. In order to unbreak Darwin, I'v

Re: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules

2025-04-05 Thread Jakub Jelinek
On Sat, Mar 29, 2025 at 04:03:07PM +, Iain Sandoe wrote: > > > > On 29 Mar 2025, at 15:56, Jakub Jelinek wrote: > > > > On Sat, Mar 29, 2025 at 03:50:54PM +, Iain Sandoe wrote: > >>> I'm not sure if sed -E is portable enough (sure, I know it is in POSIX, > >>> but > >>> that is not eno

Re: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules

2025-04-05 Thread Iain Sandoe
Hi Jakub Thanks for doing this... > On 28 Mar 2025, at 14:39, Jakub Jelinek wrote: > > +cobol/charmaps.cc cobol/valconv.cc: cobol/%.cc: $(LIB_SOURCE)/%.cc > + -l='ec\|common-defs\|io\|gcobolio\|libgcobol\|gfileio\|charmaps'; \ > + l=$$l'\|valconv\|exceptl'; \ > + sed -e '/^#include/

RE: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules

2025-04-05 Thread Robert Dubner
> -Original Message- > From: Iain Sandoe > Sent: Wednesday, April 2, 2025 15:34 > To: Robert Dubner > Cc: Jakub Jelinek ; James K. Lowden > ; Richard Biener ; GCC Patches > > Subject: Re: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules > >

Re: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules

2025-04-02 Thread Iain Sandoe
s K. Lowden ; Richard Biener >> ; GCC Patches >> 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 CXX

RE: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules

2025-03-30 Thread Robert Dubner
akub Jelinek ; Iain Sandoe > Cc: James K. Lowden ; Richard Biener > ; GCC Patches > 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 CXX

RE: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules

2025-03-30 Thread Robert Dubner
--Original Message- > From: Jakub Jelinek > Sent: Saturday, March 29, 2025 12:12 > To: Iain Sandoe > Cc: Robert Dubner ; James K. Lowden > ; Richard Biener ; GCC Patches > > Subject: Re: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules > > On Sat, Mar 29

Re: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules

2025-03-29 Thread Iain Sandoe
> On 29 Mar 2025, at 16:12, Jakub Jelinek wrote: > > On Sat, Mar 29, 2025 at 04:03:07PM +, Iain Sandoe wrote: >> >> >>> On 29 Mar 2025, at 15:56, Jakub Jelinek wrote: >>> >>> On Sat, Mar 29, 2025 at 03:50:54PM +, Iain Sandoe wrote: > I'm not sure if sed -E is portable enough (s

Re: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules

2025-03-29 Thread Iain Sandoe
> On 29 Mar 2025, at 15:56, Jakub Jelinek wrote: > > On Sat, Mar 29, 2025 at 03:50:54PM +, 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\)","../../libgco

Re: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules

2025-03-29 Thread Jakub Jelinek
On Sat, Mar 29, 2025 at 03:50:54PM +, 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

Re: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules

2025-03-29 Thread Iain Sandoe
> On 29 Mar 2025, at 15:28, Jakub Jelinek wrote: > > On Sat, Mar 29, 2025 at 03:18:20PM +, Iain Sandoe wrote: >> Hi Jakub >> >> Thanks for doing this... >> >>> On 28 Mar 2025, at 14:39, Jakub Jelinek wrote: >>> >>> +cobol/charmaps.cc cobol/valconv.cc: cobol/%.cc: $(LIB_SOURCE)/%.cc >>>

Re: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules

2025-03-29 Thread Jakub Jelinek
On Sat, Mar 29, 2025 at 03:18:20PM +, Iain Sandoe wrote: > Hi Jakub > > Thanks for doing this... > > > On 28 Mar 2025, at 14:39, Jakub Jelinek wrote: > > > > +cobol/charmaps.cc cobol/valconv.cc: cobol/%.cc: $(LIB_SOURCE)/%.cc > > + -l='ec\|common-defs\|io\|gcobolio\|libgcobol\|gfileio\|ch

Re: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules

2025-03-28 Thread Iain Sandoe
Hi Bob note that the sed -i does not work on Darwin’s BDS-derived sed without also using ‘-e’ to inroduce the scripts… so I am looking for a solution we all like too. > On 28 Mar 2025, at 16:40, Robert Dubner wrote: > > I am not fully following what's going on. > > The way this grew is becaus

RE: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules

2025-03-28 Thread Robert Dubner
I am not fully following what's going on. The way this grew is because Jim and I once had a solution in Make-lang.in that put a "-I ../libgcobol" into CPPFLAGS. Then it turned out I couldn't use CPPFLAGS, because it wasn't available on all architectures. But I nonetheless needed to use valconv.c

Re: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules

2025-03-28 Thread Simon Sobisch
Thanks, I agree that the explicit include of library headers from frontend should include the library folder explicitly.

Re: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules

2025-03-28 Thread Jakub Jelinek
On Fri, Mar 28, 2025 at 04:28:53PM +0100, Simon Sobisch wrote: > +cobol/charmaps.cc cobol/valconv.cc: cobol/%.cc: $(LIB_SOURCE)/%.cc > + -l='ec\|common-defs\|io\|gcobolio\|libgcobol\|gfileio\|charmaps'; \ > + l=$$l'\|valconv\|exceptl'; \ > + sed -e '/^#include/s,"\('$$l'\)\.h","../../li

Re: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules

2025-03-28 Thread Simon Sobisch
+cobol/charmaps.cc cobol/valconv.cc: cobol/%.cc: $(LIB_SOURCE)/%.cc + -l='ec\|common-defs\|io\|gcobolio\|libgcobol\|gfileio\|charmaps'; \ + l=$$l'\|valconv\|exceptl'; \ + sed -e '/^#include/s,"\('$$l'\)\.h","../../libgcobol/\1.h",' $^ > $@ The proposed rule is much better than

Re: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules

2025-03-28 Thread Richard Biener
On Fri, 28 Mar 2025, Jakub Jelinek wrote: > Hi! > > sed -i is not portable, it is supported by GNU sed and perhaps some BSDs, > but not elsewhere. > Furthermore, I think it is far better to always use > #include "../../libgcobol/something.h" > paths rather than something depending on the build di