Skip to contentSkip to conversation

snappy: add -fPIC flags

PATCH In review Dengke Du 2 participants 3 messages Aug 28, 2018 – Aug 29, 2018

lore
Share & tools
lore

Dengke Du

author
#0 lore raw

PATCH 1/1 snappy: add -fPIC flags

Let the libsnappy.a be position independent code, so other packages can use it to make shared PIC library, such as ceph.

---
 meta-oe/recipes-extended/snappy/snappy_1.1.7.bb | 1 +
 1 file changed, 1 insertion(+)
meta-oe/recipes-extended/snappy/snappy_1.1.7.bb +1 -0
index 6f1978a..70223be 100644
@@ -19,3 +19,4 @@ inherit cmake pkgconfig
 
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[lzo] = "-DHAVE_LIBLZO2=1,-DHAVE_LIBLZO2=0,lzo,"
+TARGET_CFLAGS += "-fPIC"
Signature · 1 line
2.7.4
#1 lore raw
Quoted 14 lines · Dengke Du

Let the libsnappy.a be position independent code, so other packages can use it to make shared PIC library, such as ceph.

---
 meta-oe/recipes-extended/snappy/snappy_1.1.7.bb | 1 +
 1 file changed, 1 insertion(+)
meta-oe/recipes-extended/snappy/snappy_1.1.7.bb +0 -0
index 6f1978a..70223be 100644

meta-oe/recipes-extended/snappy/snappy_1.1.7.bb inherit cmake pkgconfig · line 22

Quoted 4 lines
meta-oe/recipes-extended/snappy/snappy_1.1.7.bb +1 -0
@@ -19,3 +19,4 @@ inherit cmake pkgconfig
 
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[lzo] = "-DHAVE_LIBLZO2=1,-DHAVE_LIBLZO2=0,lzo,"
+TARGET_CFLAGS += "-fPIC"

perhaps adding the -fPIC flag to CPPFLAGS is better since adding to it would mean it applies to C and C++ compilers equally

Quoted 8 lines

--
2.7.4

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

author
#2 lore raw
Quoted 15 lines · Khem Raj
Quoted 14 lines · Dengke Du

Let the libsnappy.a be position independent code, so other packages can use it to make shared PIC library, such as ceph.

---
  meta-oe/recipes-extended/snappy/snappy_1.1.7.bb | 1 +
  1 file changed, 1 insertion(+)
meta-oe/recipes-extended/snappy/snappy_1.1.7.bb +0 -0
index 6f1978a..70223be 100644
@@ -19,3 +19,4 @@ inherit cmake pkgconfig
 
Quoted 5 lines

meta-oe/recipes-extended/snappy/snappy_1.1.7.bb inherit cmake pkgconfig · line 22

Quoted 3 lines
meta-oe/recipes-extended/snappy/snappy_1.1.7.bb +1 -0
  PACKAGECONFIG ??= ""
  PACKAGECONFIG[lzo] = "-DHAVE_LIBLZO2=1,-DHAVE_LIBLZO2=0,lzo,"
+TARGET_CFLAGS += "-fPIC"

perhaps adding the -fPIC flag to CPPFLAGS is better since adding to it would mean it applies to C and C++ compilers equally

Thanks!

Quoted 10 lines
Quoted 10 lines

--
2.7.4

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel