diff --git a/recipes/libs/ncurses/recipe.toml b/recipes/libs/ncurses/recipe.toml index ad0affd889..3927d5e6c9 100644 --- a/recipes/libs/ncurses/recipe.toml +++ b/recipes/libs/ncurses/recipe.toml @@ -8,7 +8,7 @@ patches = [ [build] template = "custom" script = """ -DYNAMIC_INIT +DYNAMIC_STATIC_INIT COOKBOOK_CONFIGURE_FLAGS+=( --disable-db-install --disable-stripping @@ -26,6 +26,8 @@ if [ "${COOKBOOK_DYNAMIC}" == "1" ] then COOKBOOK_CONFIGURE_FLAGS+=(--with-shared) fi +export CFLAGS="${CFLAGS} -fPIC" +export CXXFLAGS="${CXXFLAGS} -fPIC" cookbook_configure """ diff --git a/recipes/libs/ncursesw/recipe.toml b/recipes/libs/ncursesw/recipe.toml index 355d9d127a..cd65db1ddc 100644 --- a/recipes/libs/ncursesw/recipe.toml +++ b/recipes/libs/ncursesw/recipe.toml @@ -8,7 +8,7 @@ same_as = "../ncurses" [build] template = "custom" script = """ -DYNAMIC_INIT +DYNAMIC_STATIC_INIT COOKBOOK_CONFIGURE_FLAGS+=( --disable-db-install --disable-ext-colors @@ -24,6 +24,9 @@ COOKBOOK_CONFIGURE_FLAGS+=( cf_cv_func_mkstemp=yes cf_cv_wint_t=yes ) +# Force PIC compilation - --with-pic alone doesn't always work for static libs +export CFLAGS="${CFLAGS} -fPIC" +export CXXFLAGS="${CXXFLAGS} -fPIC" cookbook_configure """