summaryrefslogtreecommitdiff
path: root/recipes
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2022-11-10 19:23:22 +0530
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2022-11-15 01:09:08 +0000
commit721c96308e42f5d7b65eab776041efaad25abfb5 (patch)
tree0b0a2029abb1e657324dabc4138bbc6f87035969 /recipes
parent9a66a5abd000c8d071acdb0d3ba4207c764b4fe5 (diff)
openssl.recipe: Fix compile errors on upgrades
Because of the CFLAGS that we are adding, openssl's build system ends up picking up the headers in the install prefix over the headers in the source tree. Leads to build failures when new prototypes, defines, enums, etc are added. Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1019>
Diffstat (limited to 'recipes')
-rw-r--r--recipes/openssl.recipe7
1 files changed, 5 insertions, 2 deletions
diff --git a/recipes/openssl.recipe b/recipes/openssl.recipe
index f756077e..76b9acf3 100644
--- a/recipes/openssl.recipe
+++ b/recipes/openssl.recipe
@@ -113,7 +113,10 @@ class Recipe(recipe.Recipe):
def prepare(self):
self.openssl_platform = self._get_openssl_platform()
- cflags = self.get_env('CFLAGS')
+ # Need this include first, otherwise on compilation openssl will prefer
+ # the headers in the prefix over those in its sources dir
+ srcdir_include = f'-I{self.config_src_dir}/include '
+ cflags = srcdir_include + self.get_env('CFLAGS')
ldflags = self.get_env('LDFLAGS')
if self.using_msvc():
@@ -137,7 +140,7 @@ class Recipe(recipe.Recipe):
# build, and we can't pass arguments via Configure because on Darwin,
# Configure reads the `-arch x86_64` as meaning that you want to use
# `x86_64` as the platform, and errors out about a redefined platform.
- cc = self.get_env('CC') + ' ' + self.get_env('CFLAGS')
+ cc = self.get_env('CC') + ' ' + srcdir_include + self.get_env('CFLAGS')
ld = self.get_env('LD') + ' ' + self.get_env('LDFLAGS')
# NOTE: CFLAG and LDFLAG are not typos!
self.make += ['AR=' + ar, 'RANLIB=' + ranlib, 'CC=' + cc, 'LD=' + ld,