On 5/14/19 11:12 PM, Helmut Grohne wrote:
superkb fails to cross build from source, because the upstream build
system hard codes build architecture build tools (gcc and pkg-config).
The attached patch makes these tools substitutable,

Hi, Helmut,

Thank you for the patch! I applied it upstream.

but it doesn't make
superkb cross buildable due to its use of help2man. This is harder to
solve and not fixed here. Please consider applying the attached patch
anyway and close this bug when doing so even though superkb will
continue to fail cross building.

I also implemented a help2man fix upstream. It's done in two commits:

First, in commit b364c89897 [1] I moved the help text outside of main.c into a separate header file.

Then, in commit 6ba0933bd0 [2] I added a help stub: a Bash script that when takes the -h option it just processes the help message from the separate message file and outputs the help message. This stub is called from help2man instead of the application binary.

However, I clean the Bash script in a later commit (b5a418cc40 [3]) to use cpp -E instead of sed to parse the .h file. This is better because cpp is the proper parser for an .h file. Please confirm that this use of cpp does not break cross-compilation.

Because this technique is architecture independent it should work for
cross-compilation without having to build twice.

The three patches are upstream. Because I have not applied those to the Debian package I will keep the report open.

Thank you,

[1] Moved the help text outside of main.c

[2] Add and use a help2man stub

[3] help2man/superkb: way cleaner method to use main-help-message.h

Reply via email to