Mailing List Archive

[PATCH libgpg-error] syscfg: Add ARC architecture
From: Mylene Josserand <mylene.josserand@bootlin.com>

DesignWare ARC Processors are a family of 32-bit CPUs from Synopsys.
This change allows us to build for and use libgpg-error on ARC cores.

These values were obtained from a test application executed on ARC
in simulation this way:

1. Instructions for cross-compilation used are here:
http://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgpg-error.git;a=blob;f=README

2. Commands used on host:
# build="$(build-aux/config.guess)"
# ./configure --prefix=build/tmp-uclibc/sysroots/nsimhs/usr/ --host=arc-oe-linux-uclibc --build=$build
# cd src
# make gen-posix-lock-obj

3. Commands used on target:
# ./gen-posix-lock-obj

Signed-off-by: Mylene Josserand <mylene.josserand@bootlin.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
---
src/Makefile.am | 1 +
.../lock-obj-pub.arc-unknown-linux-gnu.h | 23 +++++++++++++++++++
2 files changed, 24 insertions(+)
create mode 100644 src/syscfg/lock-obj-pub.arc-unknown-linux-gnu.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 380ea7c09c04..bd00961c2f27 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -47,6 +47,7 @@ lock_obj_pub = \
syscfg/lock-obj-pub.aarch64-unknown-linux-gnu.h \
syscfg/lock-obj-pub.aarch64-apple-darwin.h \
syscfg/lock-obj-pub.alpha-unknown-linux-gnu.h \
+ syscfg/lock-obj-pub.arc-unknown-linux-gnu.h \
syscfg/lock-obj-pub.arm-unknown-linux-androideabi.h \
syscfg/lock-obj-pub.arm-unknown-linux-gnueabi.h \
syscfg/lock-obj-pub.arm-apple-darwin.h \
diff --git a/src/syscfg/lock-obj-pub.arc-unknown-linux-gnu.h b/src/syscfg/lock-obj-pub.arc-unknown-linux-gnu.h
new file mode 100644
index 000000000000..3b1a8fadf8a7
--- /dev/null
+++ b/src/syscfg/lock-obj-pub.arc-unknown-linux-gnu.h
@@ -0,0 +1,23 @@
+## lock-obj-pub.arc-oe-linux-uclibc.h
+## File created by gen-posix-lock-obj - DO NOT EDIT
+## To be included by mkheader into gpg-error.h
+
+typedef struct
+{
+ long _vers;
+ union {
+ volatile char _priv[24];
+ long _x_align;
+ long *_xp_align;
+ } u;
+} gpgrt_lock_t;
+
+#define GPGRT_LOCK_INITIALIZER {1,{{0,0,0,0,0,0,0,0, \
+ 0,0,0,0,0,0,0,0, \
+ 0,0,0,0,0,0,0,0}}}
+##
+## Local Variables:
+## mode: c
+## buffer-read-only: t
+## End:
+##
--
2.17.1


_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
Re: [PATCH libgpg-error] syscfg: Add ARC architecture [ In reply to ]
On Mon, 17 Sep 2018 07:14, Alexey.Brodkin@synopsys.com said:
> From: Mylene Josserand <mylene.josserand@bootlin.com>
>
> DesignWare ARC Processors are a family of 32-bit CPUs from Synopsys.
> This change allows us to build for and use libgpg-error on ARC cores.

Thanks for the info. The required object is actually identically to
i686-pc-linux-gnu so that we can use the alias table in the mkheader.c
tool.

config.sub knows about arc-oe-linux-uclibc (your value for --host) and
thus I will use that triplet becuase it seems to be more specific than
arc-unknown-linux-gnu. Okay?


Salam-Shalom,

Werner

--
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.
Re: [PATCH libgpg-error] syscfg: Add ARC architecture [ In reply to ]
Hi Werner,

On Tue, 2018-09-18 at 08:41 +0200, Werner Koch wrote:
> On Mon, 17 Sep 2018 07:14, Alexey.Brodkin@synopsys.com said:
> > From: Mylene Josserand <mylene.josserand@bootlin.com>
> >
> > DesignWare ARC Processors are a family of 32-bit CPUs from Synopsys.
> > This change allows us to build for and use libgpg-error on ARC cores.
>
> Thanks for the info. The required object is actually identically to
> i686-pc-linux-gnu so that we can use the alias table in the mkheader.c
> tool.

Ok I didn't know about that possibility so please go ahead and use
this alas table :)

> config.sub knows about arc-oe-linux-uclibc (your value for --host) and
> thus I will use that triplet becuase it seems to be more specific than
> arc-unknown-linux-gnu. Okay?

Well I was under impression that config.sub typically doesn't care about
vendor field in the tuple, i.e. what makes sense is "arc-*".

And "oe" vendor (which is used for OpenEmbeddeed toolchains) is just
a corner case together with others (even more often used ones):
- arc-buildroot-linux-uclibc-
- arc-snps-linux-
- arc-linux- etc.

That said I'd keep "arc-unknown-linux-" if possible.

Thanks for your prompt reply!

-Alexey
_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
Re: [PATCH libgpg-error] syscfg: Add ARC architecture [ In reply to ]
On Tue, 18 Sep 2018 09:09, Alexey.Brodkin@synopsys.com said:

> And "oe" vendor (which is used for OpenEmbeddeed toolchains) is just
> a corner case together with others (even more often used ones):
> - arc-buildroot-linux-uclibc-
> - arc-snps-linux-
> - arc-linux- etc.

I reviewed how we use the vendor field and changed the system so that we
always use "unknown" for the vendor field if a CPU-VENDOR-KERNEL-SYSTEM
"triplet" is given. We don't dothis for CPU-VENDOR-OS triplet. The
effect is that all triplets matching the glob pattern

arc-*-linux-uclibc

will work. I have kept the uclibc at the end because that seems to be
important.


Shalom-Salam,

Werner

--
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.
Re: [PATCH libgpg-error] syscfg: Add ARC architecture [ In reply to ]
Hi Werner,

On Tue, 2018-09-18 at 15:02 +0200, Werner Koch wrote:
> On Tue, 18 Sep 2018 09:09, Alexey.Brodkin@synopsys.com said:
>
> > And "oe" vendor (which is used for OpenEmbeddeed toolchains) is just
> > a corner case together with others (even more often used ones):
> > - arc-buildroot-linux-uclibc-
> > - arc-snps-linux-
> > - arc-linux- etc.
>
> I reviewed how we use the vendor field and changed the system so that we
> always use "unknown" for the vendor field if a CPU-VENDOR-KERNEL-SYSTEM
> "triplet" is given. We don't dothis for CPU-VENDOR-OS triplet. The
> effect is that all triplets matching the glob pattern
>
> arc-*-linux-uclibc
>
> will work. I have kept the uclibc at the end because that seems to be
> important.

But what about "arc-*-linux-gnu" (i.e. Glibc-based tools)?
And another question is about big-endian ARC flavors i.e. arceb-xxx -
will it work as well?

-Alexey
_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
Re: [PATCH libgpg-error] syscfg: Add ARC architecture [ In reply to ]
On Tue, 18 Sep 2018 16:29, Alexey.Brodkin@synopsys.com said:

> But what about "arc-*-linux-gnu" (i.e. Glibc-based tools)?

Is that really the same object? It depends on the pthread
implementation. I guess for Linux it is the same but I am not sure. If
you can confirm that they use the same ABI related to the locks we can
alias them.

> And another question is about big-endian ARC flavors i.e. arceb-xxx -
> will it work as well?

Initialization might be different; creating a syscfg header for
comparing would be useful.


Salam-Shalom,

Werner

--
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.
Re: [PATCH libgpg-error] syscfg: Add ARC architecture [ In reply to ]
Hi Werner, Vineet,

On Tue, 2018-09-18 at 17:50 +0200, Werner Koch wrote:
> On Tue, 18 Sep 2018 16:29, Alexey.Brodkin@synopsys.com said:
>
> > But what about "arc-*-linux-gnu" (i.e. Glibc-based tools)?
>
> Is that really the same object? It depends on the pthread
> implementation.
> I guess for Linux it is the same but I am not sure. If
> you can confirm that they use the same ABI related to the locks we can
> alias them.

@Vineet could you please answer this question?

> > And another question is about big-endian ARC flavors i.e. arceb-xxx -
> > will it work as well?
>
> Initialization might be different; creating a syscfg header for
> comparing would be useful.

I'll try to get the header sometime soon but for now it would be
good enough to proceed with little-endian for starters.

-Alexey
_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
Re: [PATCH libgpg-error] syscfg: Add ARC architecture [ In reply to ]
On Tue, 18 Sep 2018 21:34, Vineet.Gupta1@synopsys.com said:

> I'm not exactly clear what the question is ? What is specific in ABI related to
> locks ?

Libgpg-error abstracts the native lock interface and thus needs to get
some information on the actual implementation. It can very well be the
case that the big-endian ABI is different from the little endian ABI.
In particular the static initialization may be different; this is
implemented in libgpg-error using a macro which may look like this

#define GPGRT_LOCK_INITIALIZER {1,{{167,171,170,50,0,0,0,0, \
0,0,0,0,0,0,0,0, \
0,0,0,0,0,0,0,0, \
0,0,0,0,0,0,0,0, \
0,0,0,0,0,0,0,0, \
0,0,0,0,0,0,0,0, \
0,0,0,0,0,0,0,0, \
0,0,0,0,0,0,0,0}}}

This is an memory image and we can't make use of C data types because
we don't know them.


Shalom-Salam,

Werner

--
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.
Re: [PATCH libgpg-error] syscfg: Add ARC architecture [ In reply to ]
Hi Werner,

I tried to cheery-pick your patch that among other things adds
ARC support on top of 1.32 release and now cannot compile it.

That's how libgpg-error is configured:
--------------------------->8----------------------------
../libgpg-error-1.32/configure --build=x86_64-linux --host=arc-oe-linux --target=arc-oe-linux --prefix=/usr --exec_prefix=/usr --bindir=/usr/bin --
sbindir=/usr/sbin --libexecdir=/usr/libexec --datadir=/usr/share --sysconfdir=/etc --sharedstatedir=/com --localstatedir=/var --libdir=/usr/lib --
includedir=/usr/include --oldincludedir=/usr/include --infodir=/usr/share/info --mandir=/usr/share/man --disable-silent-rules --disable-dependency-
tracking --with-libtool-sysroot=/SCRATCH/abrodkin/Projects/sources/oe/build/tmp-glibc/work/archs-oe-linux/libgpg-error/1.32-r0/recipe-sysroot --
enable-nls
...
libgpg-error v1.32-unknown has been configured as follows:

Revision: 0000000 (0)
Platform: arc-oe-linux-gnu
--------------------------->8----------------------------

And that's how compilation fails pretty early:
--------------------------->8----------------------------
cp gpg-error-config gpgrt-config
cat ../../libgpg-error-1.32/src/gpg-error.def.in >_gpg-error.def.h
echo "/*dummy*/" > mkw32errmap.map.c
arc-oe-linux-gcc -E --sysroot=/SCRATCH/abrodkin/Projects/sources/oe/build/tmp-glibc/work/archs-oe-linux/libgpg-error/1.32-r0/recipe-sysroot -mcpu=hs
-mll64 -mmpy-option=mpy -P -P _mkerrcodes.h | grep GPG_ERR_ | \
gawk -f ../../libgpg-error-1.32/src/mkerrcodes.awk >mkerrcodes.h
arc-oe-linux-gcc -E --sysroot=/SCRATCH/abrodkin/Projects/sources/oe/build/tmp-glibc/work/archs-oe-linux/libgpg-error/1.32-r0/recipe-sysroot -mcpu=hs
-mll64 -mmpy-option=mpy -I. -I../../libgpg-error-1.32/src -I.. _gpg-error.def.h | \
grep -v '^#' >gpg-error.def
rm _gpg-error.def.h
rm _mkerrcodes.h
gcc -I. -I../../libgpg-error-1.32/src -o mkerrcodes ../../libgpg-error-1.32/src/mkerrcodes.c
./mkerrcodes | gawk -f ../../libgpg-error-1.32/src/mkerrcodes2.awk >code-from-errno.h
if test -f lock-obj-pub.native.h; then rm lock-obj-pub.native.h; fi
./mkheader linux-gnu arc-oe-linux-gnu ../../libgpg-error-1.32/src/gpg-error.h.in \
../config.h 1.32-unknown 0x012000 >gpg-error.h
../../libgpg-error-1.32/src/gpg-error.h.in:491: error including `../../libgpg-error-1.32/src/syscfg/lock-obj-pub.linux-gnu.h': No such file or
directory
make[2]: *** [gpg-error.h] Error 1
make[2]: Leaving directory `/SCRATCH/abrodkin/Projects/sources/oe/build/tmp-glibc/work/archs-oe-linux/libgpg-error/1.32-r0/build/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/SCRATCH/abrodkin/Projects/sources/oe/build/tmp-glibc/work/archs-oe-linux/libgpg-error/1.32-r0/build'
make: *** [all] Error 2
--------------------------->8----------------------------

Do I miss anything?

-Alexey
_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
Re: [PATCH libgpg-error] syscfg: Add ARC architecture [ In reply to ]
Hi Werner,

On Wed, 2018-09-19 at 15:21 +0300, Alexey Brodkin wrote:
> Hi Werner,
>
> I tried to cheery-pick your patch that among other things adds
> ARC support on top of 1.32 release and now cannot compile it.
>
> That's how libgpg-error is configured:
> --------------------------->8----------------------------
> ../libgpg-error-1.32/configure --build=x86_64-linux --host=arc-oe-linux --target=arc-oe-linux --prefix=/usr --exec_prefix=/usr --bindir=/usr/bin --
> sbindir=/usr/sbin --libexecdir=/usr/libexec --datadir=/usr/share --sysconfdir=/etc --sharedstatedir=/com --localstatedir=/var --libdir=/usr/lib --
> includedir=/usr/include --oldincludedir=/usr/include --infodir=/usr/share/info --mandir=/usr/share/man --disable-silent-rules --disable-dependency-
> tracking --with-libtool-sysroot=/SCRATCH/abrodkin/Projects/sources/oe/build/tmp-glibc/work/archs-oe-linux/libgpg-error/1.32-r0/recipe-sysroot --
> enable-nls
> ...
> libgpg-error v1.32-unknown has been configured as follows:
>
> Revision: 0000000 (0)
> Platform: arc-oe-linux-gnu
> --------------------------->8----------------------------
>
> And that's how compilation fails pretty early:
> --------------------------->8----------------------------
> cp gpg-error-config gpgrt-config
> cat ../../libgpg-error-1.32/src/gpg-error.def.in >_gpg-error.def.h
> echo "/*dummy*/" > mkw32errmap.map.c
> arc-oe-linux-gcc -E --sysroot=/SCRATCH/abrodkin/Projects/sources/oe/build/tmp-glibc/work/archs-oe-linux/libgpg-error/1.32-r0/recipe-sysroot -
> mcpu=hs
> -mll64 -mmpy-option=mpy -P -P _mkerrcodes.h | grep GPG_ERR_ | \
> gawk -f ../../libgpg-error-1.32/src/mkerrcodes.awk >mkerrcodes.h
> arc-oe-linux-gcc -E --sysroot=/SCRATCH/abrodkin/Projects/sources/oe/build/tmp-glibc/work/archs-oe-linux/libgpg-error/1.32-r0/recipe-sysroot -
> mcpu=hs
> -mll64 -mmpy-option=mpy -I. -I../../libgpg-error-1.32/src -I.. _gpg-error.def.h | \
> grep -v '^#' >gpg-error.def
> rm _gpg-error.def.h
> rm _mkerrcodes.h
> gcc -I. -I../../libgpg-error-1.32/src -o mkerrcodes ../../libgpg-error-1.32/src/mkerrcodes.c
> ./mkerrcodes | gawk -f ../../libgpg-error-1.32/src/mkerrcodes2.awk >code-from-errno.h
> if test -f lock-obj-pub.native.h; then rm lock-obj-pub.native.h; fi
> ./mkheader linux-gnu arc-oe-linux-gnu ../../libgpg-error-1.32/src/gpg-error.h.in \
> ../config.h 1.32-unknown 0x012000 >gpg-error.h
> ../../libgpg-error-1.32/src/gpg-error.h.in:491: error including `../../libgpg-error-1.32/src/syscfg/lock-obj-pub.linux-gnu.h': No such file or
> directory
> make[2]: *** [gpg-error.h] Error 1
> make[2]: Leaving directory `/SCRATCH/abrodkin/Projects/sources/oe/build/tmp-glibc/work/archs-oe-linux/libgpg-error/1.32-r0/build/src'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/SCRATCH/abrodkin/Projects/sources/oe/build/tmp-glibc/work/archs-oe-linux/libgpg-error/1.32-r0/build'
> make: *** [all] Error 2
> --------------------------->8----------------------------

Ok so that's exactly what I was thinking about: xxx-uclibc vs xxx-glibc.

See what happens for "arc-oe-linux-gnu":
--------------------------->8----------------------------
# ./mkheader linux-gnu arc-oe-linux-gnu ../../libgpg-error-1.32/src/gpg-error.h.in ../config.h 1.33-unknown 0x012100 > /dev/null
../../libgpg-error-1.32/src/gpg-error.h.in:491: error including `../../libgpg-error-1.32/src/syscfg/lock-obj-pub.linux-gnu.h': No such file or
directory
--------------------------->8----------------------------

...and for "arc-oe-linux-uclibc":
--------------------------->8----------------------------
# ./mkheader linux-gnu arc-oe-linux-uclibc ../../libgpg-error-1.32/src/gpg-error.h.in ../config.h 1.33-unknown 0x012100 > /dev/null
../../libgpg-error-1.32/src/gpg-error.h.in:491: note: including '../../libgpg-error-1.32/src/syscfg/lock-obj-pub.i686-unknown-linux-gnu.h'
--------------------------->8----------------------------

Any thoughts how "gnu" case should be handled?

-Alexey

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
Re: [PATCH libgpg-error] syscfg: Add ARC architecture [ In reply to ]
Hi Vineet, Werner,

On Wed, 2018-09-19 at 18:46 +0000, Vineet Gupta wrote:
> On 09/19/2018 04:44 AM, Werner Koch wrote:
> > On Tue, 18 Sep 2018 21:34, Vineet.Gupta1@synopsys.com said:
> >
> > > I'm not exactly clear what the question is ? What is specific in ABI related to
> > > locks ?
> >
> > Libgpg-error abstracts the native lock interface and thus needs to get
> > some information on the actual implementation. It can very well be the
> > case that the big-endian ABI is different from the little endian ABI.
> > In particular the static initialization may be different; this is
> > implemented in libgpg-error using a macro which may look like this
> >
> > #define GPGRT_LOCK_INITIALIZER {1,{{167,171,170,50,0,0,0,0, \
> > 0,0,0,0,0,0,0,0, \
> > 0,0,0,0,0,0,0,0, \
> > 0,0,0,0,0,0,0,0, \
> > 0,0,0,0,0,0,0,0, \
> > 0,0,0,0,0,0,0,0, \
> > 0,0,0,0,0,0,0,0, \
> > 0,0,0,0,0,0,0,0}}}
> >
> > This is an memory image and we can't make use of C data types because
> > we don't know them.
>
> Well BE will certainly be different than LE.
> Back to the original discussion, was the question about glibc vs. uClibc pthread
> ABI ? Since they are different / independent implementations (even if uClibc is
> sort of copy over from glibc) we can't guarantee that these would the same so each
> would need a specific initializer I guess.

That's what I've got for glibc case:
-------------------------->8-------------------------
## lock-obj-pub.arc-buildroot-linux-gnu.h
## File created by gen-posix-lock-obj - DO NOT EDIT
## To be included by mkheader into gpg-error.h

typedef struct
{
long _vers;
union {
volatile char _priv[24];
long _x_align;
long *_xp_align;
} u;
} gpgrt_lock_t;

#define GPGRT_LOCK_INITIALIZER {1,{{0,0,0,0,0,0,0,0, \
0,0,0,0,0,0,0,0, \
0,0,0,0,0,0,0,0}}}
##
## Local Variables:
## mode: c
## buffer-read-only: t
## End:
##
-------------------------->8-------------------------

I'd say it looks similar to uClibc version which is below
as a reference:
-------------------------->8-------------------------
## lock-obj-pub.arc-buildroot-linux-uclibc.h
## File created by gen-posix-lock-obj - DO NOT EDIT
## To be included by mkheader into gpg-error.h

typedef struct
{
long _vers;
union {
volatile char _priv[24];
long _x_align;
long *_xp_align;
} u;
} gpgrt_lock_t;

#define GPGRT_LOCK_INITIALIZER {1,{{0,0,0,0,0,0,0,0, \
0,0,0,0,0,0,0,0, \
0,0,0,0,0,0,0,0}}}
##
## Local Variables:
## mode: c
## buffer-read-only: t
## End:
##
-------------------------->8-------------------------

-Alexey
_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
Re: [PATCH libgpg-error] syscfg: Add ARC architecture [ In reply to ]
On Wed, 19 Sep 2018 17:56, Alexey.Brodkin@synopsys.com said:

>> ../../libgpg-error-1.32/src/gpg-error.h.in:491: error including `../../libgpg-error-1.32/src/syscfg/lock-obj-pub.linux-gnu.h': No such file or

That looks like my patch was faulty. I'll look at it and will do some
more tests. Sorry, for the trouble and thanks for the test output.


Salam-Shalom,

Werner

--
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.
Re: [PATCH libgpg-error] syscfg: Add ARC architecture [ In reply to ]
Hi Werner,

On Thu, 2018-09-20 at 10:01 +0200, Werner Koch wrote:
> On Wed, 19 Sep 2018 17:56, Alexey.Brodkin@synopsys.com said:
>
> > > ../../libgpg-error-1.32/src/gpg-error.h.in:491: error including `../../libgpg-error-1.32/src/syscfg/lock-obj-pub.linux-gnu.h': No such file or
>
> That looks like my patch was faulty. I'll look at it and will do some
> more tests. Sorry, for the trouble and thanks for the test output.

Maybe we just need to add another alias for ARC gnu toolchain (given GPG headers are the same,
see my another email I sent yesterday)?

-Alexey
_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
Re: [PATCH libgpg-error] syscfg: Add ARC architecture [ In reply to ]
On Wed, 19 Sep 2018 22:53, Alexey.Brodkin@synopsys.com said:

> I'd say it looks similar to uClibc version which is below
> as a reference:

Ack. I added it to the list.


Shalom-Salam,

Werner

--
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.
Re: [PATCH libgpg-error] syscfg: Add ARC architecture [ In reply to ]
On Wed, 19 Sep 2018 17:56, Alexey.Brodkin@synopsys.com said:

> Ok so that's exactly what I was thinking about: xxx-uclibc vs xxx-glibc.

Meanwhile added. See other mail.

> --------------------------->8----------------------------
> # ./mkheader linux-gnu arc-oe-linux-gnu ../../libgpg-error-1.32/src/gpg-error.h.in ../config.h 1.33-unknown 0x012100 > /dev/null
> ../../libgpg-error-1.32/src/gpg-error.h.in:491: error including `../../libgpg-error-1.32/src/syscfg/lock-obj-pub.linux-gnu.h': No such file or
> directory
> --------------------------->8----------------------------

The problem here is that a lock-obj-pub.linux-gnu.h exists and mkheader
prefers that becuase it assumes it is a native build. The Makefile
deletes such a file first but if you call mkheader directly it may still
exist. To make this more explicit, I added an option --cross to disable
this feature. I can now do

--8<---------------cut here---------------start------------->8---
./mkheader --cross arc-oe-linux-uclibc ~/s/libgpg-error/src/gpg-error.h.in ../config.h 1.33-unknown 0x012100 >/dev/null
/home/wk/s/libgpg-error/src/gpg-error.h.in:491: note: including '/home/wk/s/libgpg-error/src/syscfg/lock-obj-pub.i686-unknown-linux-gnu.h'
--8<---------------cut here---------------end--------------->8---

and that works even if a native files exists. Note that the first arg
to mkheader was removed becuase it is easier to derive it from the
triplet. And -gnu works too:

--8<---------------cut here---------------start------------->8---
./mkheader --cross arc-oe-linux-gnu ~/s/libgpg-error/src/gpg-error.h.in ../config.h 1.33-unknown 0x012100 >/dev/null
/home/wk/s/libgpg-error/src/gpg-error.h.in:491: note: including '/home/wk/s/libgpg-error/src/syscfg/lock-obj-pub.i686-unknown-linux-gnu.h'
--8<---------------cut here---------------end--------------->8---


Salam-Shalom,

Werner


--
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.