Browse Source

fix header install

Waldemar Brodkorb 14 years ago
parent
commit
feb5218462
2 changed files with 64 additions and 18 deletions
  1. 36 9
      package/eglibc/Makefile
  2. 28 9
      package/glibc/Makefile

+ 36 - 9
package/eglibc/Makefile

@@ -14,6 +14,32 @@ include $(TOPDIR)/mk/package.mk
 $(eval $(call PKG_template,EGLIBC,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
 $(eval $(call PKG_template,EGLIBC_DEV,$(PKG_NAME)-dev,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
 
+EGLIBC_CONFOPTS:=	\
+			--build=$(GNU_HOST_NAME) \
+			--host=$(REAL_GNU_TARGET_NAME) \
+			--with-headers=$(TOOLCHAIN_SYSROOT)/usr/include \
+			--disable-nls \
+			--without-cvs \
+			--disable-profile \
+			--disable-debug \
+			--enable-kernel=2.6.0 \
+			--without-gd \
+			--with-__thread \
+			--with-tls \
+			--enable-add-ons
+
+EGLIBC_ENV:=		PATH='${TARGET_PATH}' \
+			BUILD_CC=${HOSTCC} \
+			CFLAGS="$(TARGET_CFLAGS)" \
+			CC=${REAL_GNU_TARGET_NAME}-gcc \
+			CXX=${REAL_GNU_TARGET_NAME}-g++ \
+			AR=${REAL_GNU_TARGET_NAME}-ar \
+			RANLIB=${REAL_GNU_TARGET_NAME}-ranlib \
+			libc_cv_forced_unwind=yes \
+			libc_cv_c_cleanup=yes \
+			libc_cv_gnu99_inline=yes \
+			libc_cv_slibdir="/lib" 
+
 do-extract:
 
 # do nothing, eglibc is already build in toolchain directory
@@ -35,14 +61,15 @@ endif
 	$(MAKE) -C $(TOOLCHAIN_BUILD_DIR)/linux-$(KERNEL_VERSION) ARCH=$(ARCH) V=1 \
 		INSTALL_HDR_PATH=$(IDIR_EGLIBC_DEV)/usr \
 		headers_install
-	$(MAKE) -C $(TOOLCHAIN_BUILD_DIR)/${PKG_NAME}-${PKG_VERSION} \
-		PREFIX=$(IDIR_EGLIBC_DEV)/ \
-		DEVEL_PREFIX=/usr/ \
-		RUNTIME_PREFIX=$(IDIR_EGLIBC_DEV)/ \
-		HOSTCC="$(HOSTCC)" \
-		CPU_CFLAGS="$(TARGET_CFLAGS)" \
-		install_headers
-	@find $(IDIR_EGLIBC_DEV) -name .install -delete
-	@find $(IDIR_EGLIBC_DEV) -name ..install.cmd -delete
+	(cd $(WRKBUILD); \
+		${EGLIBC_ENV} \
+		$(TOOLCHAIN_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/libc/configure \
+			--prefix=$(IDIR_EGLIBC_DEV)/usr \
+			--with-headers=$(IDIR_EGLIBC_DEV)/usr/include \
+			${EGLIBC_CONFOPTS} \
+	);
+	PATH='${TARGET_PATH}' \
+	$(MAKE) -C $(WRKBUILD) \
+		install-headers install-bootstrap-headers=yes
 
 include ${TOPDIR}/mk/pkg-bottom.mk

+ 28 - 9
package/glibc/Makefile

@@ -11,6 +11,22 @@ PKG_OPTS:=		noremove
 
 include $(TOPDIR)/mk/package.mk
 
+GLIBC_CONFOPTS:=          \
+			--build=$(GNU_HOST_NAME) \
+			--host=$(REAL_GNU_TARGET_NAME) \
+			--with-headers=$(TOOLCHAIN_SYSROOT)/usr/include \
+			--disable-nls \
+			--disable-sanity-checks \
+			--disable-nls \
+			--without-cvs \
+			--disable-profile \
+			--disable-debug \
+			--without-gd \
+			--with-__thread \
+			--with-tls \
+			--enable-kernel="2.6.0" \
+			--enable-add-ons
+
 $(eval $(call PKG_template,GLIBC,glibc,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
 
 do-extract:
@@ -35,14 +51,17 @@ endif
 	$(MAKE) -C $(TOOLCHAIN_BUILD_DIR)/linux-$(KERNEL_VERSION) ARCH=$(ARCH) V=1 \
 		INSTALL_HDR_PATH=$(IDIR_GLIBC_DEV)/usr \
 		headers_install
-	$(MAKE) -C $(TOOLCHAIN_BUILD_DIR)/${PKG_NAME}-${PKG_VERSION} \
-		PREFIX=$(IDIR_GLIBC_DEV)/ \
-		DEVEL_PREFIX=/usr/ \
-		RUNTIME_PREFIX=$(IDIR_GLIBC_DEV)/ \
-		HOSTCC="$(HOSTCC)" \
-		CPU_CFLAGS="$(TARGET_CFLAGS)" \
-		install_headers
-	@find $(IDIR_GLIBC_DEV) -name .install -delete
-	@find $(IDIR_GLIBC_DEV) -name ..install.cmd -delete
+	(cd $(WRKBUILD); \
+		$(TOOLCHAIN_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/configure \
+		--prefix=/usr \
+		--with-sysroot=$(IDIR_GLIBC_DEV) \
+		${GLIBC_CONFOPTS} \
+	);
+	$(MAKE) -C $(WRKBUILD) \
+		cross-compiling=yes \
+		install_root=$(IDIR_GLIBC_DEV) \
+		install-headers
+	touch $(IDIR_GLIBC_DEV)/usr/include/gnu/stubs.h
+	touch $(IDIR_GLIBC_DEV)/usr/include/bits/stdio_lim.h
 
 include ${TOPDIR}/mk/pkg-bottom.mk