Skip to content

Commit

Permalink
Try to fix cross-building on ARM
Browse files Browse the repository at this point in the history
Signed-off-by: Uilian Ries <uilianries@gmail.com>
  • Loading branch information
uilianries committed Jan 23, 2023
1 parent 9ff013f commit 27dc308
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion recipes/gnutls/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def generate(self):
if not cross_building(self):
env = VirtualRunEnv(self)
env.generate(scope="build")

yes_no = lambda v: "yes" if v else "no"
autotoolstc = AutotoolsToolchain(self)
autotoolstc.configure_args.extend([
Expand Down Expand Up @@ -103,7 +104,12 @@ def generate(self):
"--enable-tools={}".format(yes_no(self.options.enable_tools)),
"--enable-openssl-compatibility={}".format(yes_no(self.options.enable_openssl_compatibility)),
])
autotoolstc.generate()
env = autotoolstc.environment()
if cross_building(self):
# INFO: Undefined symbols for architecture Mac arm64 rpl_malloc and rpl_realloc
env.define("ac_cv_func_malloc_0_nonnull", "yes")
env.define("ac_cv_func_realloc_0_nonnull", "yes")
autotoolstc.generate(env)
autodeps = AutotoolsDeps(self)
autodeps.generate()
pkgdeps = PkgConfigDeps(self)
Expand Down

0 comments on commit 27dc308

Please sign in to comment.