Browse Source

add devel subpackage with linker scripts

Waldemar Brodkorb 14 years ago
parent
commit
eaac9112e5

+ 15 - 2
package/libpthread/Makefile

@@ -12,6 +12,10 @@ endif
 ifeq ($(ADK_TARGET_LIB_UCLIBC),y)
 include ${TOPDIR}/toolchain/uClibc/Makefile.inc
 endif
+ifeq ($(ADK_NATIVE),y)
+PKG_VERSION:=		1.0
+PKG_RELEASE:=		1
+endif
 
 PKG_NAME:=		libpthread
 PKG_DESCR:=		POSIX threading library
@@ -19,6 +23,8 @@ PKG_SECTION:=		libs
 
 NO_DISTFILES:=		1
 
+PKG_SUBPKGS:=		LIBPTHREAD LIBPTHREAD_DEV
+
 ifeq ($(ADK_STATIC),y)
 PKG_OPTS:=		libonly
 endif
@@ -26,16 +32,23 @@ endif
 include ${TOPDIR}/mk/package.mk
 
 $(eval $(call PKG_template,LIBPTHREAD,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
+$(eval $(call PKG_template,LIBPTHREAD_DEV,${PKG_NAME}-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
 
 CONFIG_STYLE:=		manual
 BUILD_STYLE:=		manual
 INSTALL_STYLE:=		manual
 
-do-install:
+libpthread-install:
 ifeq ($(ADK_NATIVE),)
 	${INSTALL_DIR} ${IDIR_LIBPTHREAD}/lib
 	${CP} ${STAGING_TARGET_DIR}/lib/libpthread*.so* ${IDIR_LIBPTHREAD}/lib
-	cd $(IDIR_LIBPTHREAD)/lib && ln -sf libpthread.so.0 libpthread.so
+endif
+
+libpthread-dev-install:
+ifeq ($(ADK_NATIVE),)
+	${INSTALL_DIR} ${IDIR_LIBPTHREAD}/usr/lib
+	${CP} ./files/libpthread.so.$(ARCH) ${IDIR_LIBPTHREAD}/usr/lib/libpthread.so
+	${CP} ${STAGING_TARGET_DIR}/usr/lib/libpthread_nonshared.a ${IDIR_LIBPTHREAD}/usr/lib
 endif
 
 include ${TOPDIR}/mk/pkg-bottom.mk

+ 5 - 0
package/libpthread/files/libpthread.so.x86

@@ -0,0 +1,5 @@
+/* GNU ld script
+   Use the shared library, but some functions are only in
+   the static library, so try that secondarily.  */
+OUTPUT_FORMAT(elf32-i386)
+GROUP ( /lib/libpthread.so.0 /usr/lib/libpthread_nonshared.a )

+ 5 - 0
package/libpthread/files/libpthread.so.x86_64

@@ -0,0 +1,5 @@
+/* GNU ld script
+   Use the shared library, but some functions are only in
+   the static library, so try that secondarily.  */
+OUTPUT_FORMAT(elf64-x86-64)
+GROUP ( /lib/libpthread.so.0 /usr/lib/libpthread_nonshared.a )