Due to huge amount of bots taking interest in registering here registration is now invite-only. Any user can make an invite, you need to create it here and give resulting link to someone to register.
avatar
mikhailnov has added 10fc8925fc
Add -fPIC by default

-fPIC can be disabled easily as
%global _fpic_cflags %nil

view file @ 10fc8925fc
... ... --- /dev/null
... ... +++ b/0001-Add-fPIC-by-default.patch
... ... @@ -0,0 +1,37 @@
1
From 1007460cf7917a86532145e37b0792c961a87d38 Mon Sep 17 00:00:00 2001
2
From: Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
3
Date: Sun, 8 Mar 2020 17:20:39 +0300
4
Subject: [PATCH] Add -fPIC by default
5
6
-fPIC can be disabled easily as
7
%global _fpic_cflags %nil
8
---
9
 user/openmandriva/macros | 8 +++++++-
10
 1 file changed, 7 insertions(+), 1 deletion(-)
11
12
diff --git a/user/openmandriva/macros b/user/openmandriva/macros
13
index 04d3a41..15e4614 100644
14
--- a/user/openmandriva/macros
15
+++ b/user/openmandriva/macros
16
@@ -154,11 +154,17 @@ Provides:	%{1} = %{?2}%{!?2:%{EVRD}} \
17
 
18
 %_fortify_cflags -D_FORTIFY_SOURCE=2
19
 
20
+# Enable -fPIC by default (as it was in ROSA/Mandriva's RPM5
21
+# to avoid problems when an -fPIC-enabled shared object is linked against a static non-fPIC library,
22
+# e.g. Heimdal sets -fPIC itself and tries to link against a static libcrypt.a
23
+# https://wiki.gentoo.org/wiki/Project:AMD64/Fixing_-fPIC_Errors_Guide
24
+%_fpic_cflags -fPIC
25
+
26
 # cf http://wiki.mandriva.com/en/Development/Packaging/Problems#format_not_a_string_literal_and_no_format_arguments
27
 %Werror_cflags -Wformat -Werror=format-security
28
 
29
 %_ssp_cflags -fstack-protector-strong --param=ssp-buffer-size=4 %{?_serverbuild_flags: %_serverbuild_flags}
30
-%__common_cflags -O2 -fomit-frame-pointer %{debugcflags} -pipe %{Werror_cflags} %{?_fortify_cflags}
31
+%__common_cflags -O2 -fomit-frame-pointer %{debugcflags} -pipe %{Werror_cflags} %{?_fortify_cflags} %{?_fpic_cflags}
32
 %__common_cflags_with_ssp %{__common_cflags} %{?_ssp_cflags}
33
 
34
 # Servers opt flags.
35
-- 
36
2.20.1
37
view file @ 10fc8925fc
... ... --- a/rpm-openmandriva-setup.spec
... ... +++ b/rpm-openmandriva-setup.spec
... ... @@ -5,7 +5,7 @@
5 5
6 6
Name:		rpm-openmandriva-setup
7 7
Version:	0.4.1
8
Release:	0.14
8
Release:	0.15
9 9
Group:		System/Configuration/Packaging
10 10
Summary:	Macros and scripts for OpenMandriva specific rpm behavior
11 11
License:	MIT
... ... @@ -59,6 +59,8 @@ Patch0509: rpm-openmandriva-setup-0.4.1-Revert-Disable-debugsource-subpackages.p
59 59
Patch0510:	0001-Fix-kmod-regexp.patch
60 60
# Remove depreceation warnings, simplify macro mapping
61 61
Patch0511:	0001-Remove-depreceation-warnings.patch
62
# Add -fPIC by default, %%_fpic_cflags
63
Patch0512:	0001-Add-fPIC-by-default.patch
62 64
63 65
# ROSA branding change
64 66
Patch1000:	1000-OMA-to-ROSA.patch

Comments