Browse Source

fix some eglibc adk buildsystem problems

Waldemar Brodkorb 14 years ago
parent
commit
71c91ce903

+ 1 - 1
mk/package.mk

@@ -196,7 +196,7 @@ endif
 		    'ramdisk location:' >&2; \
 		echo "$$$$x" | sed 's/^/- /' >&2; \
 	    fi; \
-	    if [ "${PKG_NAME}" != "uClibc" -a "${PKG_NAME}" != "glibc" -a "${PKG_NAME}" != "libpthread" -a "${PKG_NAME}" != "libstdcxx" -a "${PKG_NAME}" != "libthread-db" ];then \
+	    if [ "${PKG_NAME}" != "uClibc" -a "${PKG_NAME}" != "glibc" -a "${PKG_NAME}" != "eglibc" -a "${PKG_NAME}" != "libpthread" -a "${PKG_NAME}" != "libstdcxx" -a "${PKG_NAME}" != "libthread-db" ];then \
 	    find lib \( -name lib\*.so\* -o -name lib\*.a \) \
 	    	-exec echo 'WARNING: $${IPKG_$(1)} installs files in /lib -' \
 		' fix this!' >&2 \; -quit 2>/dev/null; fi; \

+ 2 - 2
package/Depends.mk

@@ -52,7 +52,7 @@ git-compile: openssl-compile curl-compile expat-compile
 gkrellmd-compile: glib-compile
 glib-compile: gettext-compile libiconv-compile
 gmediaserver-compile: id3lib-compile libupnp-compile
-gnutls-compile: libgcrypt-compile liblzo-compile libtasn1-compile opencdk-compile zlib-compile
+gnutls-compile: libgcrypt-compile liblzo-compile libtasn1-compile opencdk-compile zlib-compile ncurses-compile
 ifeq (${ADK_COMPILE_GPSD_WITH_UCLIBCXX},y)
 gpsd-compile: uclibc++-compile
 endif
@@ -105,7 +105,7 @@ libtirpc-compile: libgssglue-compile
 endif
 libtorrent-compile: openssl-compile libsigc++-compile
 libvorbis-compile: libogg-compile
-libvirt-compile: libxml2-compile gnutls-compile
+libvirt-compile: libxml2-compile gnutls-compile python-compile
 libfontenc-compile: xproto-compile zlib-compile
 libICE-compile: xtrans-compile
 libSM-compile: libICE-compile

+ 1 - 0
package/bzip2/Makefile

@@ -16,6 +16,7 @@ include ${TOPDIR}/mk/package.mk
 
 $(eval $(call PKG_template,BZIP2,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
+TCFLAGS+=		-fPIC
 XAKE_FLAGS+=		PREFIX=${WRKINST}/usr
 BUILD_STYLE:=		auto
 INSTALL_STYLE:=		auto

+ 8 - 4
package/eglibc/Makefile

@@ -44,19 +44,23 @@ do-extract:
 
 # do nothing, eglibc is already build in toolchain directory
 do-install:
-	${INSTALL_DIR} $(IDIR_EGLIBC)/lib $(IDIR_EGLIBC)/etc
+	${INSTALL_DIR} $(IDIR_EGLIBC)/lib $(IDIR_EGLIBC)/etc $(IDIR_EGLIBC)/usr/lib
 	# install /etc/localtime from host system (FIXME)
 	${CP} /etc/localtime $(IDIR_EGLIBC)/etc
 ifeq ($(ADK_SSP),y)
 	$(CP) $(STAGING_DIR)/lib/libssp.so* $(IDIR_EGLIBC)/lib/
 endif
+	$(CP) $(STAGING_DIR)/lib/ld-* $(IDIR_EGLIBC)/lib/
 	$(CP) $(STAGING_DIR)/lib/libgcc_s.so* $(IDIR_EGLIBC)/lib/
-	-for file in libc ld libcrypt libdl libm libresolv librt libutil libnss_compat libnss_dns libnss_files; do \
+	-for file in libc libcrypt libdl libm libresolv librt libutil libnss_compat libnss_dns libnss_files; do \
 		$(CP) $(STAGING_DIR)/lib/$$file.so* $(IDIR_EGLIBC)/lib/; \
 		$(CP) $(STAGING_DIR)/lib/$$file-$(PKG_VERSION).so $(IDIR_EGLIBC)/lib/; \
 	done
-	# create ld.so link for x86 linker and gcc
-	cd $(IDIR_EGLIBC)/lib && ln -sf ld-$(PKG_VERSION).so ld-linux.so.2
+	# install linker script
+	-cp ./files/libc.so.$(CPU_ARCH) $(IDIR_EGLIBC)/usr/lib/libc.so
+	cd $(IDIR_EGLIBC)/lib && ln -sf libm.so.6 libm.so
+	cd $(IDIR_EGLIBC)/lib && ln -sf libutil.so.1 libutil.so
+	cd $(IDIR_EGLIBC)/lib && ln -sf librt.so.1 librt.so
 	# header package
 	$(MAKE) -C $(TOOLCHAIN_BUILD_DIR)/linux-$(KERNEL_VERSION) ARCH=$(ARCH) V=1 \
 		INSTALL_HDR_PATH=$(IDIR_EGLIBC_DEV)/usr \

+ 5 - 0
package/eglibc/files/libc.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/libc.so.6 /usr/lib/libc_nonshared.a  AS_NEEDED ( /lib/ld-linux-x86-64.so.2 ) )

+ 1 - 0
package/gcc/Makefile

@@ -46,6 +46,7 @@ ifeq ($(ADK_TARGET_LIB_UCLIBC),y)
 	${CP} ${STAGING_DIR}/lib/crt* ${IDIR_GCC}/usr/lib
 else
 	${CP} ${STAGING_DIR}/usr/lib/crt* ${IDIR_GCC}/usr/lib
+	${CP} ${STAGING_DIR}/usr/lib/libc_nonshared.a ${IDIR_GCC}/usr/lib
 endif
 	rm -rf ${IDIR_GCC}/usr/lib/gcc/*/*/install-tools
 

+ 5 - 1
package/libpthread/Makefile

@@ -5,7 +5,11 @@ include ${TOPDIR}/rules.mk
 
 ifeq ($(ADK_TARGET_LIB_GLIBC),y)
 include ${TOPDIR}/toolchain/glibc/Makefile.inc
-else
+endif
+ifeq ($(ADK_TARGET_LIB_EGLIBC),y)
+include ${TOPDIR}/toolchain/eglibc/Makefile.inc
+endif
+ifeq ($(ADK_TARGET_LIB_UCLIBC),y)
 include ${TOPDIR}/toolchain/uClibc/Makefile.inc
 endif
 

+ 2 - 2
package/microperl/files/uconfig.h.x86_64

@@ -3865,13 +3865,13 @@
  *	This symbol, if defined, indicates that the strlcat () routine is
  *	available to do string concatenation.
  */
-#define HAS_STRLCAT		/**/
+/*#define HAS_STRLCAT		/* */
 
 /* HAS_STRLCPY:
  *	This symbol, if defined, indicates that the strlcpy () routine is
  *	available to do string copying.
  */
-#define HAS_STRLCPY		/**/
+/*#define HAS_STRLCPY		/* */
 
 /* HAS_STRTOLD:
  *	This symbol, if defined, indicates that the strtold routine is

+ 1 - 1
package/ncurses/Makefile

@@ -38,7 +38,7 @@ CONFIGURE_ARGS+=	--without-cxx \
 			--enable-const \
 			--enable-echo
 BUILD_STYLE=		auto
-INSTALL_STYLE=		auto confprog
+INSTALL_STYLE=		auto
 ALL_TARGET:=		libs
 INSTALL_TARGET:=	install.libs install.data
 

+ 1 - 1
toolchain/gcc/patches/no-lib64.patch

@@ -6,7 +6,7 @@ diff -Nur gcc-4.4.1.orig/gcc/config/i386/linux64.h gcc-4.4.1/gcc/config/i386/lin
  
  #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
 -#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
-+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux-x86-64.so.2"
  
  #undef ASM_SPEC
  #define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} \