Parcourir la source

fix the annoying bug, where c++ apps fail to link for mips n32 or x86_64 systems

Waldemar Brodkorb il y a 11 ans
Parent
commit
b24967f7f5

+ 0 - 1
package/DirectFB/Makefile

@@ -21,7 +21,6 @@ include $(TOPDIR)/mk/package.mk
 
 $(eval $(call PKG_template,DIRECTFB,directfb,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
 
-TARGET_LDFLAGS+=	-L$(STAGING_DIR)/usr/lib64 -L$(STAGING_DIR)/usr/lib32
 CONFIGURE_ARGS+=	--with-inputdrivers=linuxinput,keyboard,ps2mouse \
 			--with-gfxdrivers=none \
 			--without-tools \

+ 0 - 4
package/MesaLib/Makefile

@@ -26,9 +26,6 @@ include $(TOPDIR)/mk/package.mk
 
 $(eval $(call PKG_template,MESALIB,mesalib,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
 
-TARGET_CFLAGS:=         $(filter-out -flto,$(TARGET_CFLAGS))
-XAKE_FLAGS+=		GCC_HONOUR_COPTS=s
-
 ifeq (${ADK_TARGET_SYSTEM_IBM_X40},y)
 DRI_DRIVERS:=i915
 endif
@@ -36,7 +33,6 @@ endif
 CONFIGURE_ARGS+=	--disable-static \
 			--disable-gallium-llvm \
 			--with-gallium-drivers=swrast \
-			--with-driver=dri \
 			--disable-gles1 \
 			--disable-gles2 \
 			--with-dri-drivers=${DRI_DRIVERS},swrast

+ 0 - 1
package/beecrypt/Makefile

@@ -19,7 +19,6 @@ include $(TOPDIR)/mk/package.mk
 $(eval $(call PKG_template,BEECRYPT,beecrypt,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
 
 TARGET_CFLAGS:=         $(filter-out -flto,$(TARGET_CFLAGS))
-TARGET_LDFLAGS+=        -L$(STAGING_DIR)/usr/lib64
 CONFIGURE_ARGS+=	--without-cplusplus \
 			--without-python \
 			--without-java

+ 0 - 1
package/firefox/Makefile

@@ -104,7 +104,6 @@ CONFIGURE_ARGS+=	--enable-application=browser \
 			--disable-safe-browsing \
 			--disable-elf-hack 
 
-TARGET_LDFLAGS+=	-L$(STAGING_DIR)/usr/lib64 -L$(STAGING_DIR)/usr/lib32
 XAKE_FLAGS+=		OS_RELEASE="2.6" HOST_CC=$(CC_FOR_BUILD) HOST_LDFLAGS=$(LDFLAGS_FOR_BUILD)
 XAKE_FLAGS+=            ARCHFLAG="${TARGET_CFLAGS} ${TARGET_CPPFLAGS} ${TARGET_LDFLAGS} -lnss3 -lnssutil3 -lsmime3 -lssl3 -fPIC"
 

+ 1 - 1
package/gnutls/Makefile

@@ -46,7 +46,7 @@ CONFIGURE_ARGS+= 	--enable-cryptodev
 endif
 
 TARGET_CFLAGS:=         $(filter-out -flto,$(TARGET_CFLAGS))
-TARGET_LDFLAGS+=	-pthread -L$(STAGING_DIR)/usr/lib64
+TARGET_LDFLAGS+=	-pthread
 CONFIGURE_ARGS+=	--disable-rpath \
 			--without-libz-prefix \
 			--without-p11-kit

+ 0 - 2
package/harfbuzz/Makefile

@@ -22,8 +22,6 @@ include $(TOPDIR)/mk/package.mk
 
 $(eval $(call PKG_template,HARFBUZZ,harfbuzz,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
 
-TARGET_LDFLAGS+=	-L$(STAGING_DIR)/usr/lib64 -L$(STAGING_DIR)/usr/lib32
-
 harfbuzz-install:
 	$(INSTALL_DIR) $(IDIR_HARFBUZZ)/usr/lib
 	$(CP) $(WRKINST)/usr/lib/libharfbuzz*.so* \

+ 0 - 2
package/libsigc++/Makefile

@@ -19,8 +19,6 @@ include ${TOPDIR}/mk/package.mk
 
 $(eval $(call PKG_template,LIBSIGCXX,libsigc++,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
 
-TARGET_LDFLAGS+=	-L$(STAGING_DIR)/usr/lib64
-
 libsigc++-install:
 	${INSTALL_DIR} ${IDIR_LIBSIGCXX}/usr/lib
 	${CP} ${WRKINST}/usr/lib/libsigc-2.0.so* ${IDIR_LIBSIGCXX}/usr/lib/

+ 0 - 1
package/libtorrent/Makefile

@@ -22,7 +22,6 @@ include ${TOPDIR}/mk/package.mk
 $(eval $(call PKG_template,LIBTORRENT,libtorrent,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
 
 CONFIGURE_ARGS+=	--enable-aligned
-TARGET_LDFLAGS+=        -L$(STAGING_DIR)/usr/lib64
 
 libtorrent-install:
 	${INSTALL_DIR} ${IDIR_LIBTORRENT}/usr/lib

+ 0 - 2
package/log4cplus/Makefile

@@ -19,8 +19,6 @@ DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.tar.bz2
 
 include ${TOPDIR}/mk/package.mk
 
-TARGET_LDFLAGS+=        -L$(STAGING_DIR)/usr/lib64
-
 $(eval $(call PKG_template,LOG4CPLUS,log4cplus,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
 
 log4cplus-install:

+ 0 - 2
package/log4cxx/Makefile

@@ -24,8 +24,6 @@ include ${TOPDIR}/mk/package.mk
 
 $(eval $(call PKG_template,LOG4CXX,log4cxx,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
 
-TARGET_LDFLAGS+=	-L$(STAGING_DIR)/usr/lib64
-
 log4cxx-install:
 	${INSTALL_DIR} ${IDIR_LOG4CXX}/usr/lib
 	${CP} ${WRKINST}/usr/lib/*.so* ${IDIR_LOG4CXX}/usr/lib

+ 0 - 1
package/pango/Makefile

@@ -24,7 +24,6 @@ include ${TOPDIR}/mk/package.mk
 $(eval $(call PKG_template,PANGO,pango,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
 
 TARGET_CFLAGS:=         $(filter-out -flto,$(TARGET_CFLAGS))
-TARGET_LDFLAGS+=	-L$(STAGING_DIR)/usr/lib64 -L$(STAGING_DIR)/usr/lib32
 CONFIGURE_ENV+=		ac_cv_path_EGREP="grep -E"
 
 pango-install:

+ 0 - 1
package/pcre/Makefile

@@ -28,7 +28,6 @@ $(eval $(call PKG_template,LIBPCRE,libpcre,${PKG_VERSION}-${PKG_RELEASE},${PKG_D
 $(eval $(call PKG_template,LIBPCRECPP,libpcrecpp,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIBPCRECPP},${PKG_SECTION}))
 
 XAKE_FLAGS+=		${TARGET_CONFIGURE_OPTS}
-TARGET_LDFLAGS+=	-L$(STAGING_DIR)/usr/lib64 -L$(STAGING_DIR)/usr/lib32
 
 libpcre-install:
 	${INSTALL_DIR} ${IDIR_LIBPCRE}/usr/lib

+ 0 - 2
package/poppler/Makefile

@@ -19,8 +19,6 @@ include $(TOPDIR)/mk/package.mk
 
 $(eval $(call PKG_template,POPPLER,poppler,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
 
-TARGET_LDFLAGS+=	-L$(STAGING_DIR)/usr/lib64
-
 poppler-install:
 	$(INSTALL_DIR) $(IDIR_POPPLER)/usr/lib
 	$(CP) $(WRKINST)/usr/lib/libpoppler*.so* \

+ 0 - 2
package/squid/Makefile

@@ -67,8 +67,6 @@ endif
 
 include ${TOPDIR}/mk/package.mk
 
-TARGET_LDFLAGS+=	-L$(STAGING_DIR)/usr/lib64
-
 define PKG_mod_template
 
 INSTALL_MODS_$${ADK_PACKAGE_${1}}+=	${2}-install

+ 0 - 1
package/vlc/Makefile

@@ -23,7 +23,6 @@ include $(TOPDIR)/mk/package.mk
 $(eval $(call PKG_template,VLC,vlc,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
 TARGET_CFLAGS+=		-fPIC
-TARGET_LDFLAGS+=	-L$(STAGING_DIR)/usr/lib64
 CONFIGURE_ENV+=		ac_cv_func_sched_getaffinity=no
 CONFIGURE_ARGS+=	--disable-lua \
 			--disable-dbus \

+ 1 - 0
target/mips/sys-available/lemote-yeelong

@@ -13,6 +13,7 @@ config ADK_TARGET_SYSTEM_LEMOTE_YEELONG
 	select ADK_TARGET_WITH_INPUT
 	select ADK_TARGET_WITH_RTC
 	select ADK_TARGET_WITH_HDD
+	select ADK_TARGET_WITH_PCI
 	help
          System profile for Lemote Yeelong laptop.
 

+ 7 - 0
toolchain/gcc/Makefile

@@ -195,6 +195,13 @@ $(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
 		done;
 	# workaround for openjdk
 	cd $(STAGING_HOST_DIR)/$(REAL_GNU_TARGET_NAME)/bin ; cp * ..
+	# fix linking g++ apps with libtool
+	@-test -d $(STAGING_TARGET_DIR)/lib32 && \
+		cd $(STAGING_TARGET_DIR)/lib32 && \
+		ln -sf libstdc++.so.6.0.17 libstdc++.so
+	@-test -d $(STAGING_TARGET_DIR)/lib64 && \
+		cd $(STAGING_TARGET_DIR)/lib64 && \
+		ln -sf libstdc++.so.6.0.17 libstdc++.so
 	touch $@
 
 include ${TOPDIR}/mk/toolchain.mk