sys-apps/flashrom: append -fPIC to compiler flags
authorMarek Szuba <marecki@gentoo.org>
Mon, 27 Apr 2020 18:14:44 +0000 (19:14 +0100)
committerMarek Szuba <marecki@gentoo.org>
Mon, 27 Apr 2020 18:14:44 +0000 (19:14 +0100)
libflashrom.a is useless without this.

Signed-off-by: Marek Szuba <marecki@gentoo.org>
sys-apps/flashrom/flashrom-1.2-r1.ebuild [moved from sys-apps/flashrom/flashrom-1.2.ebuild with 97% similarity]

similarity index 97%
rename from sys-apps/flashrom/flashrom-1.2.ebuild
rename to sys-apps/flashrom/flashrom-1.2-r1.ebuild
index b51635e3ad80b62bf330eeb65685e045dbeeb97b..e732f06f297283d9219afeef17e163b9fc5d1c6c 100644 (file)
@@ -3,7 +3,8 @@
 
 EAPI=7
 
-inherit toolchain-funcs
+inherit flag-o-matic toolchain-funcs
+
 if [[ ${PV} == "9999" ]] ; then
        EGIT_REPO_URI="https://review.coreboot.org/flashrom.git"
        inherit git-r3
@@ -103,6 +104,13 @@ flashrom_enable() {
        for u ; do _flashrom_enable "${u}" ; done
 }
 
+src_prepare() {
+       # To make libflashrom.a actually useful
+       append-flags -fPIC
+
+       default
+}
+
 src_compile() {
        # Help keep things in sync.
        local sprogs=$(echo $(