Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re mk cross compile fixes #62

Merged
merged 2 commits into from
Dec 22, 2020

Conversation

cspiel1
Copy link
Collaborator

@cspiel1 cspiel1 commented Dec 22, 2020

These days again we are playing around with optimizing/simplifying our yocto recipes. Same for a very old buildroot system. We always run in problems that libre is detected on the build/devel host and paths are set in-correctly.

This two commits repair two possibilities to set the paths to libre, which we think solve cross compilation problems.

  1. LIBRE_PATH could be set externally. If it is not set, nothing changes the old behavior. So it should not break anything.
  2. LIBRE_INC, LIBRE_SO could be used if headers and libre.so is lying on different places. Same here: If it is not set externally, nothing changes.

If the user previously set one of these variables, it had no result.

With this patches it may often be enough to set CC and SYSROOT correctly for cross compilation. Maybe in addition SYSROOT_ALT. Also DESTDIR for the install target dir.

One solution for cross-compiling rem and baresip is to specify LIBRE_INC and
LIBRE_SO. The problem was that re.mk always cleared these variables, then
detected re.h/libre.so in /usr/local or /usr and set LIBRE_INC and LIBRE_SO to
these system paths.
A simpler way for cross compilation could be to set LIBRE_PATH externally. This
commit prevents that LIBRE_PATH is overwritten by re.mk and sets LIBRE_INC
and LIBRE_SO correctly by means of LIBRE_PATH. These variables are added to the
CFLAGS resp. to the "-L" argument of the linker command in baresip and rem
Makefile.
@sreimers sreimers merged commit 563ed6d into baresip:master Dec 22, 2020
@cspiel1 cspiel1 deleted the re_mk_cross_compile_fixes branch December 23, 2020 07:50
@sreimers sreimers added the bug Something isn't working label Apr 9, 2021
@sreimers sreimers added this to the v2.0.0 milestone Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants