Skip to content

Commit

Permalink
Make mklibs-native buildable with GCC 4.7 or newer
Browse files Browse the repository at this point in the history
mklibs needs this small patch in oerder for GCC 4.7 to be able to build it.
Details: http://lists.debian.org/debian-boot/2012/04/msg00057.html

This adds the patch and modifies the mklibs-native_0.1.33.bb recipe.
  • Loading branch information
aperezdc committed Apr 20, 2012
1 parent dfc27fa commit 8c77cf9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
21 changes: 21 additions & 0 deletions meta/recipes-devtools/mklibs/files/include-unistd-h.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
With GCC 4.7 or newer the package would fail to build with this error:

elf.cpp:68:5: error: '::close' has not been declared

This adds the unistd.h header so the ::close() function is defined.

Diff:
http://lists.debian.org/debian-boot/2012/04/msg00057.html


diff -Nru mklibs-0.1.33/src/mklibs-readelf/elf.cpp mklibs-0.1.33+nmu1/src/mklibs-readelf/elf.cpp
--- mklibs-0.1.33/src/mklibs-readelf/elf.cpp 2011-01-18 00:41:29.000000000 +0000
+++ mklibs-0.1.33+nmu1/src/mklibs-readelf/elf.cpp 2012-04-05 00:15:09.000000000 +0000
@@ -25,6 +25,7 @@
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/stat.h>
+#include <unistd.h>

using namespace Elf;

1 change: 1 addition & 0 deletions meta/recipes-devtools/mklibs/mklibs-native_0.1.33.bb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ PR = "r0"
SRC_URI = "http://ftp.de.debian.org/debian/pool/main/m/mklibs/${BPN}_${PV}.tar.gz \
file://ac_init_fix.patch\
file://fix_STT_GNU_IFUNC.patch\
file://include-unistd-h.patch \
"

SRC_URI[md5sum] = "a462d9b802164993d247c1193116d78b"
Expand Down

0 comments on commit 8c77cf9

Please sign in to comment.