[LIBGPG-ERROR PATCH] doc: use compiler flags for yat2m when not cross-built.
Werner Koch
wk at gnupg.org
Tue Feb 6 18:14:28 CET 2018
On Tue, 6 Feb 2018 03:53, dkg at fifthhorseman.net said:
> We ship yat2m when not cross-building. This means that yat2m ought to
> be built with the same flags that other native tools are built with.
> yat2m: yat2m.c
> +if CROSS_COMPILING
> $(CC_FOR_BUILD) -DPACKAGE_VERSION="\"$(PACKAGE_VERSION)\"" \
> -o $@ $(srcdir)/yat2m.c
> +else
> + $(CC_FOR_BUILD) $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) -DPACKAGE_VERSION="\"$(PACKAGE_VERSION)\"" \
> + -o $@ $(srcdir)/yat2m.c
> +endif
The last line should be
$(COMPILE) -DPACKAGE_VERSION="\"$(PACKAGE_VERSION)\"" \
-o $@ $(srcdir)/yat2m.c
so that all flags (in particular AM_CFLAGS) as used as usually. More
elegant would be to insert
--8<---------------cut here---------------start------------->8---
if CROSS_COMPILING
COMPILE_NATIVE_OR_CROSS = $(CC_FOR_BUILD)
else
COMPILE_NATIVE_OR_CROSS = $(COMPILE)
endif
--8<---------------cut here---------------end--------------->8---
at the top and use
--8<---------------cut here---------------start------------->8---
yat2m: yat2m.c
$(COMPILE_NATIVE_OR_CROSS) -DPACKAGE_VERSION="\"$(PACKAGE_VERSION)\"" \
-o $@ $(srcdir)/yat2m.c
--8<---------------cut here---------------end--------------->8---
Shalom-Salam,
Werner
--
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gnupg-devel/attachments/20180206/803220c6/attachment.sig>
More information about the Gnupg-devel
mailing list